[1.7] Socket problems after xorg-server update

Jon TURNEY jon.turney@dronecode.org.uk
Mon Jun 29 15:34:00 GMT 2009


Ken Brown wrote:
> On 6/28/2009 2:17 PM, Jon TURNEY wrote:
>> Ken Brown wrote:
>>> After I upgraded to xorg-server-1.6.0-10, XWin.exe exited immediately
>>> with the following error message in the log file:
>>>
>>>   _XSERVTransSocketOpenCOTSServer: Unable to open socket for inet6
>>
>> Although it's clear as mud, this message should not be a fatal error, 
>> just a warning.
> [...]
>>> After running startxwin.bat, it takes about 20 seconds for the X icon 
>>> to appear in the taskbar.  I guess that's related to the socket 
>>> problems reported in the log.

Ok, after installing IPv6, I am able to reproduce this, and I have uncovered 
the cause of the 20 second delay:  20 1-second delays :-)

Interestingly, this only seems to occur if the X server is built with gcc4 (as 
I believe the released version is).

/usr/include/X11/Xtrans/Xtranssock.c:TRANS(SocketCreateListener) has some code 
to retry binding the socket up to 20 times as 1 second intervals

The reason that the binding is failing is that the address to bind to is 
incorrectly set in 
/usr/include/X11/Xtrans/Xtranssock.c:TRANS(SocketINETCreateListener) as the 
value of in6addr_any seems to be "SocketINETGetAddr" rather than the expected 
all zeroes.

I think perhaps this is a problem with gcc4's weak symbol handling, as if I 
remove the '#pragma weak in6addr_any = local_in6addr_any' from Xtranssock.c, 
things work as expected (with the pragma present, the address used for 
in6addr_any seems to be slightly offset from local_in6addr_any...)

I can't reproduce the problem you are seeing with the X server just exiting 
when IPv6 isn't installed, though....


--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://x.cygwin.com/docs/
FAQ:                   http://x.cygwin.com/docs/faq/



More information about the Cygwin-xfree mailing list