Ticket #206 (closed crash: fixed)

Opened 4 years ago

Last modified 3 years ago

Running "Xquartz -query" for XDMCP connection causes race-condition/hang

Reported by: nathan.stocks@… Owned by: jeremyhu@…
Priority: Expected Milestone: 2.3.2
Component: xserver Version: dev (xorg-server-1.4-apple)
Keywords: Cc: nathan.stocks@…, reno.bladergroen@…

Description (last modified by jeremyhu@…) (diff)

when I run my saved alias of
"/usr/X11R6/bin/Xquartz -query 10.1.2.59 -once" from Terminal.app I
get this behaviour:

a) The custom X11 logo bounces.
b) the login window appears
c) I can't focus the X11 or the login window by any means I've tried.
d) I have to force-quite X11, which then relaunches itself without
starting up the XDMCP connection or xterm, but other than that it
seems normal (so I just quit it normally)
e) I get the following output on the terminal:

Xquartz: X11.app = /Applications/Utilities/X11.app/Contents/MacOS/X11
Xquartz: Starting X server:
/Applications/Utilities/X11.app/Contents/MacOS/X11 --listenonly
X11.app: main(): argc=2
       argv[0] = /Applications/Utilities/X11.app/Contents/MacOS/X11
       argv[1] = --listenonly
Waiting for startup parameters via Mach IPC.
X11.app: do_start_x11_server(): argc=4
       argv[0] = /usr/X11R6/bin/Xquartz
       argv[1] = -query
       argv[2] = 10.1.2.59
       argv[3] = -once
InitConnectionLimits: MaxClients = 255
Xquartz starting:
X.Org X Server 1.4.2-apple27
Build Date: 20081206
_XSERVTransmkdir: ERROR: euid != 0,directory /tmp/.X11-unix will not be created.
Sync Extension 3.0
(EE) XKB: Couldn't open rules file /usr/X11/share/X11/xkb/rules/base
(dix) initialising device 0
(dix) initialising device 1
(dix) initialising device 2
(EE) XKB: Couldn't open rules file /usr/X11/share/X11/xkb/rules/base
(dix) initialising device 3
(dix) initialising device 4
(dix) initialising device 5
(dix) initialising device 6
(dix) enabling device 0
(dix) enabling device 1
(dix) enabling device 2
(dix) enabling device 3
(dix) enabling device 4
(dix) enabling device 5
(dix) enabling device 6
AllocNewConnection: client index = 1, socket fd = 11
AllocNewConnection: client index = 2, socket fd = 12
AllocNewConnection: client index = 2, socket fd = 12
[at this point I Ctrl-C and then force-quit X11]

Attachments

x11_sample.txt (2.3 KB) - added by nathan.stocks@… 4 years ago.
Sample of the "hung" x11 process

Change History

Changed 4 years ago by nathan.stocks@…

Sample of the "hung" x11 process

comment:1 Changed 4 years ago by nathan.stocks@…

  • Cc nathan.stocks@… added

Cc Me!

comment:2 Changed 4 years ago by nathan.stocks@…

Your explanation on the ML...

> There's nothing "wrong" with it... the problem is just that because DISPLAY
> is set, the xpbproxy thread is trying to connect to that DISPLAY to manage
> the pasteboard proxying, but you're not letting launchd start the server
> here... so it's trying to get launchd to launch the server (but it's already
> running because you started it) and is thus waiting forever for a connection
> to be established...

comment:3 Changed 4 years ago by jeremyhu@…

  • Priority changed from minor to critical
  • Version set to dev (xorg-server-1.4-apple)
  • Description modified (diff)
  • Milestone set to 2.3.2

comment:4 Changed 4 years ago by nathan.stocks@…

I really don't know if this is directly related to this bug, but when using the workaround for this bug, once I switch focus away from X11, I can no longer get the XDMCP gnome window to pop to the front. I can _focus_ it by clicking on the gnome window or the X11 icon, but it doesn't pop to the front. I work around this by hiding all of my OS X apps so I can see the focused gnome window.

Here's the output on Terminal.app:

$ DISPLAY="" /usr/X11/bin/X -query 10.1.2.59 -once
Xquartz: X11.app = /Applications/Utilities/X11.app/Contents/MacOS/X11
Xquartz: Starting X server: /Applications/Utilities/X11.app/Contents/MacOS/X11 --listenonly
X11.app: main(): argc=2
	argv[0] = /Applications/Utilities/X11.app/Contents/MacOS/X11
	argv[1] = --listenonly
Waiting for startup parameters via Mach IPC.
X11.app: do_start_x11_server(): argc=4
	argv[0] = /usr/X11/bin/X
	argv[1] = -query
	argv[2] = 10.1.2.59
	argv[3] = -once
InitConnectionLimits: MaxClients = 255
Xquartz starting:
X.Org X Server 1.4.2-apple27
Build Date: 20081206
_XSERVTransmkdir: ERROR: euid != 0,directory /tmp/.X11-unix will not be created.
Sync Extension 3.0
(EE) XKB: Couldn't open rules file /usr/X11/share/X11/xkb/rules/base
(dix) initialising device 0
(dix) initialising device 1
(dix) initialising device 2
(EE) XKB: Couldn't open rules file /usr/X11/share/X11/xkb/rules/base
(dix) initialising device 3
(dix) initialising device 4
(dix) initialising device 5
(dix) initialising device 6
(dix) enabling device 0
(dix) enabling device 1
(dix) enabling device 2
(dix) enabling device 3
(dix) enabling device 4
(dix) enabling device 5
(dix) enabling device 6
AllocNewConnection: client index = 1, socket fd = 11
AUDIT: Wed Dec 10 12:16:57 2008: 847 X: client 1 rejected from local host (uid 502)
Xlib: connection to ":0.0" refused by server
Xlib: No protocol specified

AllocNewConnection: client index = 1, socket fd = 12
AUDIT: Wed Dec 10 12:16:57 2008: 847 X: client 1 rejected from local host (uid 502)
Xlib: connection to ":0.0" refused by server
Xlib: No protocol specified

AllocNewConnection: client index = 1, socket fd = 11
AUDIT: Wed Dec 10 12:16:57 2008: 847 X: client 1 rejected from local host (uid 502)
Xlib: connection to ":0.0" refused by server
Xlib: No protocol specified

AllocNewConnection: client index = 1, socket fd = 12
AUDIT: Wed Dec 10 12:16:57 2008: 847 X: client 1 rejected from local host (uid 502)
Xlib: connection to ":0.0" refused by server
Xlib: No protocol specified

AllocNewConnection: client index = 1, socket fd = 11
AUDIT: Wed Dec 10 12:16:57 2008: 847 X: client 1 rejected from local host (uid 502)
Xlib: connection to ":0.0" refused by server
Xlib: No protocol specified

AllocNewConnection: client index = 1, socket fd = 12
AUDIT: Wed Dec 10 12:16:57 2008: 847 X: client 1 rejected from local host (uid 502)
Xlib: connection to ":0.0" refused by server
Xlib: No protocol specified

AllocNewConnection: client index = 1, socket fd = 10
AllocNewConnection: client index = 2, socket fd = 12
AUDIT: Wed Dec 10 12:16:57 2008: 847 X: client 2 rejected from local host (uid 502)
Xlib: connection to ":0.0" refused by server
Xlib: No protocol specified

AllocNewConnection: client index = 2, socket fd = 12
AUDIT: Wed Dec 10 12:16:57 2008: 847 X: client 2 rejected from local host (uid 502)
Xlib: connection to ":0.0" refused by server
Xlib: No protocol specified

AllocNewConnection: client index = 2, socket fd = 11
AllocNewConnection: client index = 2, socket fd = 11
xpbproxy: can't open default display
Error initializing xpbproxy
AllocNewConnection: client index = 2, socket fd = 11
AllocNewConnection: client index = 3, socket fd = 14
AllocNewConnection: client index = 4, socket fd = 15
AllocNewConnection: client index = 4, socket fd = 15
AllocNewConnection: client index = 5, socket fd = 16
AllocNewConnection: client index = 6, socket fd = 17
AllocNewConnection: client index = 7, socket fd = 18
AllocNewConnection: client index = 5, socket fd = 16
AllocNewConnection: client index = 8, socket fd = 19
AllocNewConnection: client index = 9, socket fd = 20
AllocNewConnection: client index = 10, socket fd = 21
AllocNewConnection: client index = 9, socket fd = 20
AllocNewConnection: client index = 11, socket fd = 22
AllocNewConnection: client index = 11, socket fd = 22
AllocNewConnection: client index = 11, socket fd = 22
DarwinPressModifierKey bad keycode: key=7
DarwinPressModifierKey bad keycode: key=7

comment:5 Changed 4 years ago by jeremyhu@…

  • Status changed from new to closed
  • Resolution set to fixed

This should be usable in 2.3.2_rc4 ... the xpbproxy stuff won't work, but I'm not sure the best way to get it working... At worse, you just see a bunch of error messages in the log file about pbproxy and the server behaves as it did before pbproxy was added.

comment:6 Changed 4 years ago by nathan.stocks@…

Confirmed! The following commands works great now. (And I notice the white boxes are gone as well!)

/usr/X11/bin/X -query 10.1.2.59 -once

Possible Regression:

Now I have to click on the X11 icon twice to get the Gnome Desktop to come to the front. Should I file a separate bug for this, or is this expected behavior?

comment:7 Changed 4 years ago by reno.bladergroen@…

Hello,

I am new on this forum, but got here by searching google for the above mentioned problem. We have a unix computer at work with specific analysis software on it. I really need to be able to connect to this machine from my (and other) macs, but since leopard upgrade am not able to. My last try today (Xquartz version 2.3.2.1) reported something similar to the above mentioned problem. You are talking about solutions and all, but i cannot find what the solution is. I am not a unix guru and know very little about terminal based computing, so please also explain what I have to type in the terminal? Some further searching showed me that problems can arise when MacPorts is installed... maybe that information helps.

Hope someone can help me?

Thanks, reno The Netherlands

comment:8 Changed 4 years ago by jeremyhu@…

  • Cc reno.bladergroen@… added

reno: This issue is fixed. Please open a new ticket with your issue or join the x11-users mailing list for quicker feedback.

http://lists.apple.com/mailman/listinfo/x11-users

Note: See TracTickets for help on using tickets.