bugFreeciv - Bugs: bug #21547, Client hangs when spawning server...

 
 
Show feedback again

bug #21547: Client hangs when spawning server (crosser build)

Submitted by:  Marko Lindqvist <cazfi>
Submitted on:  Tue 28 Jan 2014 12:34:17 AM UTC  
 
Category: generalSeverity: 5 - Blocker
Priority: 5 - NormalStatus: Fixed
Assigned to: Marko Lindqvist <cazfi>Open/Closed: Closed
Release: Operating System: Microsoft Windows
Planned Release: 2.4.2, 2.5.0, 2.6.0

Add a New Comment (Rich MarkupRich Markup):
   

You are not logged in

Please log in, so followups can be emailed to you.

 

(Jump to the original submission Jump to the original submission)

Sun 02 Feb 2014 03:02:04 PM UTC, comment #10:

FWIW, tested cproc's r24327 build and cazfi's r24328 crosser build on Windows 7 32-bit and they seem OK in this regard (although I stumbled on another entertaining behaviour: bug #21583).

Jacob Nevins <jtn>
Project Administrator
Sat 01 Feb 2014 10:05:20 AM UTC, SVN revision 24320:

For the systems lacking getaddrinfo() have fallback implementations
with inet_aton(), inet_addr() and gethostbyname() of find_next_free_port()

See bug #21547

(Browse SVN revision 24320)

Marko Lindqvist <cazfi>
Project AdministratorIn charge of this item.
Sat 01 Feb 2014 10:05:15 AM UTC, SVN revision 24319:

For the systems lacking getaddrinfo() have fallback implementations
with inet_aton(), inet_addr() and gethostbyname() of find_next_free_port()

See bug #21547

(Browse SVN revision 24319)

Marko Lindqvist <cazfi>
Project AdministratorIn charge of this item.
Sat 01 Feb 2014 10:05:09 AM UTC, SVN revision 24318:

For the systems lacking getaddrinfo() have fallback implementations
with inet_aton(), inet_addr() and gethostbyname() of find_next_free_port()

See bug #21547

(Browse SVN revision 24318)

Marko Lindqvist <cazfi>
Project AdministratorIn charge of this item.
Thu 30 Jan 2014 06:10:04 PM UTC, comment #6:

Latest version fixes the Windows issue too.

Marko Lindqvist <cazfi>
Project AdministratorIn charge of this item.
Thu 30 Jan 2014 12:46:49 AM UTC, comment #5:

- Add also gethostbyname() fallback. inet_addr() wasn't working as "localhost" is unresolved name, not IP address like "127.0.0.1".

Tested all three implementations on linux by commenting macros out from fc_config.h as needed.

(file #19895)

Marko Lindqvist <cazfi>
Project AdministratorIn charge of this item.
Wed 29 Jan 2014 09:45:13 PM UTC, comment #4:

Err... checking crosser build fc_config.h, it is actually using that fallback of a fallback (i.e., lacks also inet_aton() )

Marko Lindqvist <cazfi>
Project AdministratorIn charge of this item.
Tue 28 Jan 2014 08:29:52 PM UTC, comment #3:

Attached patch adds (similar to fallback pattern in net_lookup_service()) handling by inet_aton() if available. This fixes linux test case documented in comment #1. While this doesn't fix inet_addr() based case, I don't see that as a big problem:

- It's an fallback of an fallback (we use getaddrinfo() by default, falling back to inet_aton(), falling back to inet_addr()). I don't think anybody will ever actually try to use this code.
- If someone would use that code, similar construct in net_lookup_service() is probably broken too and bigger problem - I've been about to remove that for a long time - requiring at least inet_aton() should be no problem.

(file #19882)

Marko Lindqvist <cazfi>
Project AdministratorIn charge of this item.
Tue 28 Jan 2014 08:12:47 PM UTC, comment #2:

Treating as 2.4.2 blocker until proven otherwise.

Jacob Nevins <jtn>
Project Administrator
Tue 28 Jan 2014 08:03:42 PM UTC, comment #1:

Tried to reproduce (assuming the latter reason) on linux by undefining HAVE_GETADDRINFO from fc_config.h before build.

Did not hang, but even with server already running in 5556 tried to use that port.

Marko Lindqvist <cazfi>
Project AdministratorIn charge of this item.
Tue 28 Jan 2014 12:34:17 AM UTC, original submission:

Client hangs when it should fork a server. Connecting to separately running server works.

The suspects are patch #4438 (adjustments to the generation of the commandline of the spawned server) and bug #19720 (changes to how client selects port for the server). Latter is more likely; hang could be client searching for the free port in infinite loop.

Marko Lindqvist <cazfi>
Project AdministratorIn charge of this item.

 

(Note: upload size limit is set to 1024 kB, after insertion of the required escape characters.)

Attach File(s):
   
   
Comment:
   

Attached Files
file #19895:  InetAtonFreePort-2.patch added by cazfi (2kB - text/x-diff)
file #19882:  InetAtonFreePort.patch added by cazfi (621B - text/x-diff)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by chrisk
  • -unavailable- added by jtn (Posted a comment)
  • -unavailable- added by cazfi (Submitted the item)
  •  

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 9 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Sat 01 Feb 2014 10:05:30 AM UTCcazfiStatusReady For Test=>Fixed
      Assigned toNone=>cazfi
      Open/ClosedOpen=>Closed
    Thu 30 Jan 2014 12:46:49 AM UTCcazfiAttached File-=>Added InetAtonFreePort-2.patch, #19895
    Wed 29 Jan 2014 12:41:27 PM UTCchriskCarbon-Copy-=>Added chrisk
    Tue 28 Jan 2014 08:29:51 PM UTCcazfiAttached File-=>Added InetAtonFreePort.patch, #19882
      CategoryNone=>general
      StatusNone=>Ready For Test
    Tue 28 Jan 2014 08:12:47 PM UTCjtnSeverity3 - Normal=>5 - Blocker
    Show feedback again

    Back to the top


    Powered by Savane 3.1-cleanup