libwww-perl / WWW-Mechanize

Handy web browsing in a Perl object
https://metacpan.org/pod/WWW::Mechanize
Other
68 stars 52 forks source link

LocalServer.pm: Shutdown sequence not working on FreeBSD #211

Open spazm opened 7 years ago

spazm commented 7 years ago

rfl...@acsalaska.net reported on Apr 6, 2012

What steps will reproduce the problem?
1.env PERL_DL_NONLAZY=1 /usr/local/bin/perl5.12.4 "-MExtUtils::Command::MM" "-e" "test_harness(1, 'blib/lib', 'blib/arch')" t/local/back.t

What is the expected output? What do you see instead?
Test to finish.
Instead it hangs because servers are not dying.

What version of the product are you using? On what operating system?
1.72 on FreeBSD 8.2

Please provide any additional information below.
The actual hang is in $self->stop at line 157. The file handle doesn't close and SIGINFO shows perl to be stuck in accept.

As a work around, I'm using:
--- t/local/LocalServer.pm.orig 2011-08-05 12:48:08.000000000 -0800
+++ t/local/LocalServer.pm      2012-04-06 14:37:36.000000000 -0800
@@ -152,7 +152,7 @@
 sub stop {
     my ($self) = @_;
     get( $self->quit_server );
-    undef $self->{_server_url};
+    $self->kill();
     if ( $self->{_fh} ) {
         close $self->{_fh};
         delete $self->{_fh};

Details

Imported from Google Code issue 234 via archive