bugFreeciv - Bugs: bug #19720, Client fails to fork server in...

 
 
Show feedback again

bug #19720: Client fails to fork server in next free port when 5556 in use

Submitted by:  Marko Lindqvist <cazfi>
Submitted on:  Tue 08 May 2012 12:49:05 AM UTC  
 
Category: generalSeverity: 3 - Normal
Priority: 5 - NormalStatus: Fixed
Assigned to: Marko Lindqvist <cazfi>Open/Closed: Closed
Release: Operating System: None
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)

Sat 25 Jan 2014 11:11:44 PM UTC, SVN revision 24246:

Fixed find_next_free_port() to return the actual free port found, and to check
port from specific interface. This fixes the problems of client to fork a server
and connect to it when there's already another such server running.

Reported by myself and Christian Knoke

See bug #19720

(Browse SVN revision 24246)

Marko Lindqvist <cazfi>
Project AdministratorIn charge of this item.
Sat 25 Jan 2014 11:11:39 PM UTC, SVN revision 24245:

Fixed find_next_free_port() to return the actual free port found, and to check
port from specific interface. This fixes the problems of client to fork a server
and connect to it when there's already another such server running.

Reported by myself and Christian Knoke

See bug #19720

(Browse SVN revision 24245)

Marko Lindqvist <cazfi>
Project AdministratorIn charge of this item.
Sat 25 Jan 2014 11:11:34 PM UTC, SVN revision 24244:

Fixed find_next_free_port() to return the actual free port found, and to check
port from specific interface. This fixes the problems of client to fork a server
and connect to it when there's already another such server running.

Reported by myself and Christian Knoke

See bug #19720

(Browse SVN revision 24244)

Marko Lindqvist <cazfi>
Project AdministratorIn charge of this item.
Sat 25 Jan 2014 11:08:31 PM UTC, comment #4:

This was also reported in bug #21530.

Marko Lindqvist <cazfi>
Project AdministratorIn charge of this item.
Thu 23 Jan 2014 08:43:16 PM UTC, comment #3:

More serious problem turned out to be that client ended up selecting next port from what's free. So, first client detects 5556 to be free and starts client in 5557. Second client too sees that 5556 is (still) free, and then tries to use 5557.

Fix for both problems attached. S2_3 not affected.

(file #19834)

Marko Lindqvist <cazfi>
Project AdministratorIn charge of this item.
Thu 23 Jan 2014 08:12:00 PM UTC, comment #2:

Running stand-alone server on port 5556 and trying to fork another server from client success. New server correctly goes to port 5557 and client connects it.
The problem occurs when there's server forked from client on port 5556. Second client checking for free port concludes that 5556 is free.

This is very likely to be issue of server forked from client being bound to local interface, and free port number being determined from outside interface.

Marko Lindqvist <cazfi>
Project AdministratorIn charge of this item.
Mon 18 Jun 2012 10:31:45 PM UTC, comment #1:

This was somehow caused by existing zombie-server already running. I'm not closing this as invalid, as client is supposed to find next free port, launch server so it uses it, and to itself connect to server in that port.

Marko Lindqvist <cazfi>
Project AdministratorIn charge of this item.
Tue 08 May 2012 12:49:05 AM UTC, original submission:

I can start server manually, but when trying to start one with client results immediately with "disconnected from server"

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 #19834:  NextFreePortFix.patch added by cazfi (3kB - text/x-diff)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -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 8 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Sat 25 Jan 2014 11:12:04 PM UTCcazfiStatusReady For Test=>Fixed
      Assigned toNone=>cazfi
      Open/ClosedOpen=>Closed
    Thu 23 Jan 2014 08:43:16 PM UTCcazfiAttached File-=>Added NextFreePortFix.patch, #19834
      StatusIn Progress=>Ready For Test
      Planned Release=>2.4.2, 2.5.0, 2.6.0
    Thu 23 Jan 2014 08:12:00 PM UTCcazfiStatusNone=>In Progress
    Sun 13 Jan 2013 06:25:05 AM UTCcazfiSummaryServer started by TRUNK client aborts immediately=>Client fails to fork server in next free port when 5556 in use
    Show feedback again

    Back to the top


    Powered by Savane 3.1-cleanup