[Bug 1161640] [NEW] LWP::UserAgent hangs on SSL connections with keep-alive enabled

Michael Spratte 1161640 at bugs.launchpad.net
Thu Mar 28 22:34:45 UTC 2013


Public bug reported:

When using LWP::UserAgent on SSL connections with keep-alive enabled the
connection will hang or terminate with an error.  This bug was
introduced between 10.04 and 12.04.

The attached program ssl-keep-alive.pl run on 12.04 demonstrates the
problem.  An example run with keep-alive disabled produces the following
output (where the first argument is the URL and the second is 0 to
disable keep-alive or 1 to enable it):

$ ./ssl-keep-alive.pl https://bugs.launchpad.net/ubuntu/+source/libnet-http-perl/+bug/1057609 0
starting GET ... done (elapsed time so far: 2 seconds)
starting GET ... done (elapsed time so far: 4 seconds)
starting GET ... done (elapsed time so far: 5 seconds)
starting GET ... done (elapsed time so far: 6 seconds)
starting GET ... done (elapsed time so far: 8 seconds)
$

Enabling keep-alive produces differing output:

$ ./ssl-keep-alive.pl https://bugs.launchpad.net/ubuntu/+source/libnet-http-perl/+bug/1057609 1
starting GET ... done (elapsed time so far: 2 seconds)
starting GET ... done (elapsed time so far: 2 seconds)
starting GET ... done (elapsed time so far: 3 seconds)
starting GET ... done (elapsed time so far: 3 seconds)
starting GET ... done (elapsed time so far: 3 seconds)
$ ./ssl-keep-alive.pl https://bugs.launchpad.net/ubuntu/+source/libnet-http-perl/+bug/1057609 1
starting GET ... done (elapsed time so far: 17 seconds)
starting GET ...
500 Server closed connection without sending any data back
$

Using the latest Net::HTTP::Method module (version 6.06) fixes the
problem.  See https://rt.cpan.org/Public/Bug/Display.html?id=81237 for
details of this bug.  Upgrading package libnet-http-perl to the latest
upstream version 6.06 not only will fix this problem but also address
bug 1057609 (https://bugs.launchpad.net/ubuntu/+source/libnet-http-
perl/+bug/1057609).

** Affects: libnet-http-perl (Ubuntu)
     Importance: Undecided
         Status: New

** Attachment added: "ssl-keep-alive.pl"
   https://bugs.launchpad.net/bugs/1161640/+attachment/3604833/+files/ssl-keep-alive.pl

-- 
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to libnet-http-perl in Ubuntu.
https://bugs.launchpad.net/bugs/1161640

Title:
  LWP::UserAgent hangs on SSL connections with keep-alive enabled

Status in “libnet-http-perl” package in Ubuntu:
  New

Bug description:
  When using LWP::UserAgent on SSL connections with keep-alive enabled
  the connection will hang or terminate with an error.  This bug was
  introduced between 10.04 and 12.04.

  The attached program ssl-keep-alive.pl run on 12.04 demonstrates the
  problem.  An example run with keep-alive disabled produces the
  following output (where the first argument is the URL and the second
  is 0 to disable keep-alive or 1 to enable it):

  $ ./ssl-keep-alive.pl https://bugs.launchpad.net/ubuntu/+source/libnet-http-perl/+bug/1057609 0
  starting GET ... done (elapsed time so far: 2 seconds)
  starting GET ... done (elapsed time so far: 4 seconds)
  starting GET ... done (elapsed time so far: 5 seconds)
  starting GET ... done (elapsed time so far: 6 seconds)
  starting GET ... done (elapsed time so far: 8 seconds)
  $

  Enabling keep-alive produces differing output:

  $ ./ssl-keep-alive.pl https://bugs.launchpad.net/ubuntu/+source/libnet-http-perl/+bug/1057609 1
  starting GET ... done (elapsed time so far: 2 seconds)
  starting GET ... done (elapsed time so far: 2 seconds)
  starting GET ... done (elapsed time so far: 3 seconds)
  starting GET ... done (elapsed time so far: 3 seconds)
  starting GET ... done (elapsed time so far: 3 seconds)
  $ ./ssl-keep-alive.pl https://bugs.launchpad.net/ubuntu/+source/libnet-http-perl/+bug/1057609 1
  starting GET ... done (elapsed time so far: 17 seconds)
  starting GET ...
  500 Server closed connection without sending any data back
  $

  Using the latest Net::HTTP::Method module (version 6.06) fixes the
  problem.  See https://rt.cpan.org/Public/Bug/Display.html?id=81237 for
  details of this bug.  Upgrading package libnet-http-perl to the latest
  upstream version 6.06 not only will fix this problem but also address
  bug 1057609 (https://bugs.launchpad.net/ubuntu/+source/libnet-http-
  perl/+bug/1057609).

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/libnet-http-perl/+bug/1161640/+subscriptions




More information about the foundations-bugs mailing list