Discussion:
/tmp/.X0-lock problem
Charles Swenson
2009-01-02 17:18:12 UTC
Permalink
FAQ 3.4. Fatal server error: Can't read lock file /tmp/.X0-lock

I just installed cygwin for the first time (newbie) on a XP-SP3 laptop
to gain access to my Linux systems. Install was straight forward but I
ran into this error as noted in the FAQ file upon launching X (Start
menu or command line)

I tried the possible workarounds:

1. rm -rf /tmp; mkdir /tmp ; chmod 1777 /tmp

Which did not work for me but

2. startx -- -nolock

did work for me. I can try some things if someone needs a "broken
system" to diagnose.

-Charles-





--
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/
Jon TURNEY
2009-01-02 20:00:51 UTC
Permalink
Post by Charles Swenson
FAQ 3.4. Fatal server error: Can't read lock file /tmp/.X0-lock
I just installed cygwin for the first time (newbie) on a XP-SP3 laptop
to gain access to my Linux systems. Install was straight forward but I
ran into this error as noted in the FAQ file upon launching X (Start
menu or command line)
1. rm -rf /tmp; mkdir /tmp ; chmod 1777 /tmp
Which did not work for me but
2. startx -- -nolock
did work for me. I can try some things if someone needs a "broken
system" to diagnose.
Can you provide the output of 'strace Xwin' , please.

--
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/
Charles Swenson
2009-01-02 20:38:30 UTC
Permalink
The output of 'strace Xwin' is attached
-Charles Swenson-

-----Original Message-----
From: Jon TURNEY [mailto:***@dronecode.org.uk]
Sent: Friday, January 02, 2009 1:01 PM
To: cygwin-***@cygwin.com; Charles Swenson
Subject: Re: /tmp/.X0-lock problem
Post by Charles Swenson
FAQ 3.4. Fatal server error: Can't read lock file /tmp/.X0-lock
I just installed cygwin for the first time (newbie) on a XP-SP3 laptop
to gain access to my Linux systems. Install was straight forward but I
ran into this error as noted in the FAQ file upon launching X (Start
menu or command line)
1. rm -rf /tmp; mkdir /tmp ; chmod 1777 /tmp
Which did not work for me but
2. startx -- -nolock
did work for me. I can try some things if someone needs a "broken
system" to diagnose.
Can you provide the output of 'strace Xwin' , please.
Jon TURNEY
2009-01-06 20:28:32 UTC
Permalink
Post by Jon TURNEY
Post by Charles Swenson
FAQ 3.4. Fatal server error: Can't read lock file /tmp/.X0-lock
I just installed cygwin for the first time (newbie) on a XP-SP3 laptop
to gain access to my Linux systems. Install was straight forward but I
ran into this error as noted in the FAQ file upon launching X (Start
menu or command line)
1. rm -rf /tmp; mkdir /tmp ; chmod 1777 /tmp
Which did not work for me but
2. startx -- -nolock
did work for me. I can try some things if someone needs a "broken
system" to diagnose.
Can you provide the output of 'strace Xwin' , please.
The output of 'strace Xwin' is attached
Thanks.

Can we get 'cygcheck -s -v -r > cygcheck.out' as well, please.

First, I can see that the code in xserver/os/osinit.c:OsInit() which tries to
detect if stderr is closed is turning on and trying to send it to
/usr/adm/X0msgs, or failing that /dev/null...

Then we get...

232 29862 [main] Xwin 4180 fhandler_base::set_flags: flags 0x100A01,
supplied_bin 0x10000
51 29913 [main] Xwin 4180 fhandler_base::set_flags: filemode set to binary
50 29963 [main] Xwin 4180 fhandler_base::open: 0 = NtCreateFile (0x7E0,
40100080, C:\cygwin\tmp\.tX0-lock, io, NULL, 80, 7, 2, 420, NULL, 0)
55 30018 [main] Xwin 4180 fhandler_base::open: 1 = fhandler_base::open
(C:\cygwin\tmp\.tX0-lock, 0x100A01)
82 30100 [main] Xwin 4180 fhandler_base::open_fs: 1 =
fhandler_disk_file::open (C:\cygwin\tmp\.tX0-lock, 0xA01)
48 30148 [main] Xwin 4180 open: 0 = open (/tmp/.tX0-lock, 0xA01)

Does this mean that open() returned 0? Well, ok this might make sense if
stdin was closed...

But then the subsequent write() on this fd fails...

And this would confuse xserver/os/utils.c as it would interpret this as
success; then tries to link the file which doesn't exist...

Hmm.... Now I'm confused.... XWin.exe is marked as a GUI (not console)
executable, so is it supposed to have a stdin/stdout/stderr or not...


--
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/
Charles Swenson
2009-01-06 22:10:12 UTC
Permalink
Jon,
The output 'cygcheck.out' is attached. Cygwin-xfree has been
working otherwise just fine.
-Charles-

-----Original Message-----
From: Jon TURNEY [mailto:***@dronecode.org.uk]
Sent: Tuesday, January 06, 2009 1:29 PM
To: cygwin-***@cygwin.com
Cc: Charles Swenson
Subject: Re: /tmp/.X0-lock problem
Post by Jon TURNEY
Post by Charles Swenson
FAQ 3.4. Fatal server error: Can't read lock file /tmp/.X0-lock
I just installed cygwin for the first time (newbie) on a XP-SP3 laptop
to gain access to my Linux systems. Install was straight forward but I
ran into this error as noted in the FAQ file upon launching X (Start
menu or command line)
1. rm -rf /tmp; mkdir /tmp ; chmod 1777 /tmp
Which did not work for me but
2. startx -- -nolock
did work for me. I can try some things if someone needs a "broken
system" to diagnose.
Can you provide the output of 'strace Xwin' , please.
The output of 'strace Xwin' is attached
Thanks.

Can we get 'cygcheck -s -v -r > cygcheck.out' as well, please.

First, I can see that the code in xserver/os/osinit.c:OsInit() which
tries to
detect if stderr is closed is turning on and trying to send it to
/usr/adm/X0msgs, or failing that /dev/null...

Then we get...

232 29862 [main] Xwin 4180 fhandler_base::set_flags: flags
0x100A01,
supplied_bin 0x10000
51 29913 [main] Xwin 4180 fhandler_base::set_flags: filemode set
to binary
50 29963 [main] Xwin 4180 fhandler_base::open: 0 = NtCreateFile
(0x7E0,
40100080, C:\cygwin\tmp\.tX0-lock, io, NULL, 80, 7, 2, 420, NULL, 0)
55 30018 [main] Xwin 4180 fhandler_base::open: 1 =
fhandler_base::open
(C:\cygwin\tmp\.tX0-lock, 0x100A01)
82 30100 [main] Xwin 4180 fhandler_base::open_fs: 1 =
fhandler_disk_file::open (C:\cygwin\tmp\.tX0-lock, 0xA01)
48 30148 [main] Xwin 4180 open: 0 = open (/tmp/.tX0-lock, 0xA01)

Does this mean that open() returned 0? Well, ok this might make sense
if
stdin was closed...

But then the subsequent write() on this fd fails...

And this would confuse xserver/os/utils.c as it would interpret this as
success; then tries to link the file which doesn't exist...

Hmm.... Now I'm confused.... XWin.exe is marked as a GUI (not console)
executable, so is it supposed to have a stdin/stdout/stderr or not...
Continue reading on narkive:
Loading...