not removing /tmp/.X11-unix/X

Alan Coopersmith alan.coopersmith at sun.com
Wed May 24 19:22:41 PDT 2006


Looks like somehow the name is not being set correctly in the bind()
call even though it is in the unlink() - it should have the display
number on the end, as seen in the unlink line.

I'd look at the TRANS(SocketUNIXCreateListener) code in lib/xtrans/Xtranssock.c
- is the BSD44SOCKETS code not setting sun_len correctly?   It sets it
to strlen - does it need to add 1 for the trailing NUL?  Or should it even be
trying to set it at all since it looks like it's not intended for user programs
to set it?

	-Alan Coopersmith-           alan.coopersmith at sun.com
	 Sun Microsystems, Inc. - X Window System Engineering

Jeremy C. Reed wrote:
> I am testing Xorg server on NetBSD. Each time X closes with some error 
> (like missing driver), it leaves a /tmp/.X11-unix/X socket link behind.
> 
> Next time I run X it immediately fails with:
> 
> 
> _XSERVTransSocketUNIXCreateListener: ...SocketCreateListener() failed
> _XSERVTransMakeAllCOTSServerListeners: server already running
> 
> Fatal server error:
> Cannot establish any listening sockets - Make sure an X server isn't 
> already running
> 
> 
> ktrace says:
> 
> ..
>  17860      1 Xorg     CALL  socket(1,1,0)
>  17860      1 Xorg     RET   socket 4
>  17860      1 Xorg     CALL  umask(0)
>  17860      1 Xorg     RET   umask 18/0x12
>  17860      1 Xorg     CALL  __lstat30(0x819592f,0xbfbfe790)
>  17860      1 Xorg     NAMI  "/tmp/.X11-unix"
>  17860      1 Xorg     RET   __lstat30 0
>  17860      1 Xorg     CALL  unlink(0xbfbfe842)
>  17860      1 Xorg     NAMI  "/tmp/.X11-unix/X0"
>  17860      1 Xorg     RET   unlink -1 errno 2 No such file or directory
>  17860      1 Xorg     CALL  bind(4,0xbfbfe840,0x12)
>  17860      1 Xorg     NAMI  "/tmp/.X11-unix/X"
>  17860      1 Xorg     RET   bind -1 errno 48 Address already in use
>  17860      1 Xorg     CALL  write(2,0x81b0a40,0xb)
>  17860      1 Xorg     GIO   fd 2 wrote 11 bytes
>        "_XSERVTrans"
> ..
> 
> 
> My workaround is to delete the /tmp/.X11-unix/X before running Xorg each 
> time.
> 
> 
> 
>  Jeremy C. Reed
> 
> echo '9,J8HD,fDGG8B@?:536FC5=8 at I;C5?@H5B0D at 5GBIELD54DL>@8L?:5GDEJ8LDG1' |\
> sed ss,s50EBsg | tr 0-M 'p.wBt SgiIlxmLhan:o,erDsduv/cyP'
> _______________________________________________
> xorg mailing list
> xorg at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/xorg





More information about the xorg mailing list