Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

t/local/back.t hang indefinitely on Win10x64 [rt.cpan.org #117893] #101

Open
oalders opened this issue Mar 31, 2017 · 3 comments
Open

t/local/back.t hang indefinitely on Win10x64 [rt.cpan.org #117893] #101

oalders opened this issue Mar 31, 2017 · 3 comments

Comments

@oalders
Copy link
Member

oalders commented Mar 31, 2017

Migrated from rt.cpan.org#117893 (status was 'open')

Requestors:

From jpierce@cpan.org on 2016-09-16 18:47:42:

Running make test
"C:\Strawberry\perl\bin\perl.exe" "-MExtUtils::Command::MM" "-MTest::Harness" "-e" "undef *Test::Harness::Switches; test_harness(0, 'blib\lib', 'blib\arch')" t/*.t t/live/*.t t/local/*.t t/mech-dump/*.t
t/00-load.t .............. 1/2 # Testing WWW::Mechanize 1.78, with LWP 6.15, Perl 5.024000, C:\Strawberry\perl\bin\perl.exe
# Test::Memory::Cycle is not installed.
t/00-load.t .............. ok
t/add_header.t ........... ok
t/aliases.t .............. ok
t/area_link.t ............ ok
t/author-pod-coverage.t .. skipped: these tests are for testing by the author
t/autocheck.t ............ ok
t/bad-request.t .......... ok
t/clone.t ................ ok
t/content.t .............. ok
t/cookies.t .............. skipped: HTTP::Server::Simple does not support Windows yet.
t/credentials-api.t ...... ok
t/credentials.t .......... ok
t/die.t .................. ok
t/dump.t ................. ok
t/field.t ................ ok
t/find_frame.t ........... ok
t/find_image.t ........... ok
t/find_inputs.t .......... ok
t/find_link-warnings.t ... ok
t/find_link.t ............ ok
t/find_link_id.t ......... ok
t/form-parsing.t ......... ok
t/form_with_fields.t ..... 1/? There are 2 forms with the named fields.  The first one was used. at t/form_with_fields.t line 27.
t/form_with_fields.t ..... ok
t/frames.t ............... ok
t/image-new.t ............ ok
t/image-parse.t .......... ok
t/link-base.t ............ ok
t/link-relative.t ........ ok
t/link.t ................. ok
t/live/encoding.t ........ ok
t/live/wikipedia.t ....... ok
t/local/back.t ........... 1/47 Error GETing http://localhost:52248/: Can't connect to localhost:52248 at t/local/back.t line 53.

From olaf@wundersolutions.com on 2016-09-16 18:50:23:

On Fri Sep 16 14:47:42 2016, JPIERCE wrote:
> Running make test
> "C:\Strawberry\perl\bin\perl.exe" "-MExtUtils::Command::MM" "-
> MTest::Harness" "-e" "undef *Test::Harness::Switches; test_harness(0,
> 'blib\lib', 'blib\arch')" t/*.t t/live/*.t t/local/*.t t/mech-dump/*.t
> t/00-load.t .............. 1/2 # Testing WWW::Mechanize 1.78, with LWP
> 6.15, Perl 5.024000, C:\Strawberry\perl\bin\perl.exe
> # Test::Memory::Cycle is not installed.
> t/00-load.t .............. ok
> t/add_header.t ........... ok
> t/aliases.t .............. ok
> t/area_link.t ............ ok
> t/author-pod-coverage.t .. skipped: these tests are for testing by the
> author
> t/autocheck.t ............ ok
> t/bad-request.t .......... ok
> t/clone.t ................ ok
> t/content.t .............. ok
> t/cookies.t .............. skipped: HTTP::Server::Simple does not
> support Windows yet.
> t/credentials-api.t ...... ok
> t/credentials.t .......... ok
> t/die.t .................. ok
> t/dump.t ................. ok
> t/field.t ................ ok
> t/find_frame.t ........... ok
> t/find_image.t ........... ok
> t/find_inputs.t .......... ok
> t/find_link-warnings.t ... ok
> t/find_link.t ............ ok
> t/find_link_id.t ......... ok
> t/form-parsing.t ......... ok
> t/form_with_fields.t ..... 1/? There are 2 forms with the named
> fields.  The first one was used. at t/form_with_fields.t line 27.
> t/form_with_fields.t ..... ok
> t/frames.t ............... ok
> t/image-new.t ............ ok
> t/image-parse.t .......... ok
> t/link-base.t ............ ok
> t/link-relative.t ........ ok
> t/link.t ................. ok
> t/live/encoding.t ........ ok
> t/live/wikipedia.t ....... ok
> t/local/back.t ........... 1/47 Error GETing http://localhost:52248/:
> Can't connect to localhost:52248 at t/local/back.t line 53.

Thanks very much for this.  Are you seeing this happen consistently or is it just occasional?

Olaf

From belg4mit@pthbb.org on 2016-09-16 21:50:30:

Consistently, althouh I believe it's using a random port?

From olaf@wundersolutions.com on 2016-09-17 03:53:41:

On Fri Sep 16 17:50:30 2016, belg4mit@pthbb.org wrote:
> Consistently, althouh I believe it's using a random port?

Can you tell which test it's hanging on?  Locally it sometimes seems to hang for me after "Pre-search check".

From jpierce@cpan.org on 2016-09-19 18:05:14:

On Fri Sep 16 23:53:41 2016, OALDERS wrote:
> On Fri Sep 16 17:50:30 2016, belg4mit@pthbb.org wrote:
> > Consistently, although I believe it's using a random port?
> 
> Can you tell which test it's hanging on?  Locally it sometimes seems
> to hang for me after "Pre-search check".


Hmm, today it is hanging on #5 (or maybe it was before and buffering w/o TEST_VERBOSE masked that).

t/local/back.t ...........
1..47
ok 1 - use WWW::Mechanize;
ok 2 - An object of class 'WWW::Mechanize' isa 'WWW::Mechanize'
ok 3 - 'this $mech starts with a cookie jar' isa 'HTTP::Cookies'
ok 4 - An object of class 'LocalServer' isa 'LocalServer'
ok 5 - With no stack, no going back
Error GETing http://localhost:63242/: Can't connect to localhost:63242 at t/local/back.t line 53.

From olaf@wundersolutions.com on 2016-09-19 19:42:43:

On Mon Sep 19 14:05:14 2016, JPIERCE wrote:
> On Fri Sep 16 23:53:41 2016, OALDERS wrote:
> > On Fri Sep 16 17:50:30 2016, belg4mit@pthbb.org wrote:
> > > Consistently, although I believe it's using a random port?
> >
> > Can you tell which test it's hanging on?  Locally it sometimes seems
> > to hang for me after "Pre-search check".
> 
> 
> Hmm, today it is hanging on #5 (or maybe it was before and buffering
> w/o TEST_VERBOSE masked that).
> 
> t/local/back.t ...........
> 1..47
> ok 1 - use WWW::Mechanize;
> ok 2 - An object of class 'WWW::Mechanize' isa 'WWW::Mechanize'
> ok 3 - 'this $mech starts with a cookie jar' isa 'HTTP::Cookies'
> ok 4 - An object of class 'LocalServer' isa 'LocalServer'
> ok 5 - With no stack, no going back
> Error GETing http://localhost:63242/: Can't connect to localhost:63242
> at t/local/back.t line 53.

These tests that rely on finding open ports seem to be kind of brittle.  I haven't looked too closely, but probably these tests should be rewritten to either navigate files on the filesystem use file:/// or use an in process server like Plack.  We could skip these tests where Plack isn't already installed.
@twata1
Copy link

twata1 commented May 7, 2017

About WWW-Mechanize-1.84, I run into simular issue in Windows 7(32bit) under Strawberry Perl 5.24.0 etc.

[The thing I tried.]

  1. launch another command prompt on Windows machine.
  2. try following command:
    ping localhost

If the results of "ping localhost" include "::1",
The cause is probably that "localhost" is waiting in IPv6 instead of IPv4 on the Windows machine.

[My WORKAROUND]
My workaround is: replace

$lhurl->host( 'localhost' );

to

$lhurl->host( '127.0.0.1' );

in t\local\LocalServer.pm

Thank you,

--
twata

karenetheridge added a commit that referenced this issue Jun 28, 2017
This provides a workaround for issues: #31, #88, #98, #100, #101, #103, #226,
RT#63272, RT#106677, RT#117893.
oalders pushed a commit that referenced this issue Jun 28, 2017
This provides a workaround for issues: #31, #88, #98, #100, #101, #103, #226,
RT#63272, RT#106677, RT#117893.
karenetheridge added a commit that referenced this issue Jul 3, 2017
…to avoid a hang

    This provides a workaround for issues: #31, #88, #98, #100, #101, #103, #226,
    RT#63272, RT#106677, RT#117893.
oalders pushed a commit that referenced this issue Jul 4, 2017
…to avoid a hang

    This provides a workaround for issues: #31, #88, #98, #100, #101, #103, #226,
    RT#63272, RT#106677, RT#117893.
@eseyman
Copy link

eseyman commented Aug 6, 2017

FWIW, I'm seeing the opposite problem on Fedora.
The tests use 127.0.0.1 but the server is listening on ::1 (an ipv6 address) so the tests hang indefinitely.

@dwmanning
Copy link

FWIW, I'm seeing the opposite problem on Fedora.
The tests use 127.0.0.1 but the server is listening on ::1 (an ipv6 address) so the tests hang indefinitely.

Same here on Ubuntu 16.04

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants