bugzilla-daemon at mindrot.org
2005-Sep-19 21:38 UTC
[Bug 1086] X forwarding won't start when a command is executed in background
http://bugzilla.mindrot.org/show_bug.cgi?id=1086 Summary: X forwarding won't start when a command is executed in background Product: Portable OpenSSH Version: 4.2p1 Platform: All OS/Version: Linux Status: NEW Severity: normal Priority: P2 Component: sshd AssignedTo: bitbucket at mindrot.org ReportedBy: t8m at centrum.cz This is actually a regression against openssh-4.1p1. Try: ssh -Y user at host "(sleep 5; xterm) &" After 5 seconds it will print: xterm Xt error: Can't open display: localhost:10.0 It will work fine on openssh-4.1p1 server. ------- You are receiving this mail because: ------- You are the assignee for the bug, or are watching the assignee.
bugzilla-daemon at mindrot.org
2005-Sep-20 01:45 UTC
[Bug 1086] X forwarding won't start when a command is executed in background
http://bugzilla.mindrot.org/show_bug.cgi?id=1086 dtucker at zip.com.au changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |ASSIGNED ------- Additional Comments From dtucker at zip.com.au 2005-09-20 11:45 ------- It appears to be fallout from this change (channels.c rev 1.200 and session.c rev 1.302): - djm at cvs.openbsd.org 2005/07/17 06:49:04 [channels.c channels.h session.c session.h] Fix a number of X11 forwarding channel leaks: 1. Refuse multiple X11 forwarding requests on the same session 2. Clean up all listeners after a single_connection X11 forward, not just the one that made the single connection 3. Destroy X11 listeners when the session owning them goes away testing and ok dtucker@ It's probably (3) since the "()&" causes the child of sshd to exit immediately. Maybe it needs to wait until the session close completes before destroying the X11 listeners? ------- You are receiving this mail because: ------- You are the assignee for the bug, or are watching the assignee.
bugzilla-daemon at mindrot.org
2005-Sep-23 08:57 UTC
[Bug 1086] X forwarding won't start when a command is executed in background
http://bugzilla.mindrot.org/show_bug.cgi?id=1086 ------- Additional Comments From djm at mindrot.org 2005-09-23 18:57 ------- hm, this is tricky: the /session/ is closed immediately upon child exit, but the /channel/ persists after this time (until read EOF or error). The X11 listeners need to be shut down when the /channel/ goes away, but we don't have any way to mark the listeners as dependant on the channel. The choices are: 1. Move x11_chanids from "struct Session" into "struct Channel", so we can deallocate them with a cleanup function. (ugly layering violation, but we already have several of these) 2. Don't session_close() a session until its undelying channel goes away entirely. This may be a good way to do it - just don't deallocate the channel in session_exit_message(), instead let the channel close callback take care of it (include X11 closure) 3. Make all sessions share a single X11 listener. This could be simple, but it would move us further away from supporting multiple X11 forwarding in the future (if we ever chose to do it) ------- You are receiving this mail because: ------- You are the assignee for the bug, or are watching the assignee.
bugzilla-daemon at mindrot.org
2005-Sep-23 09:36 UTC
[Bug 1086] X forwarding won't start when a command is executed in background
http://bugzilla.mindrot.org/show_bug.cgi?id=1086 ------- Additional Comments From djm at mindrot.org 2005-09-23 19:36 ------- 4. Continue tracking the x11_chanids in session.c in a separate structure to the session and detach them using a channel callback registered after the normal one is detached in session_exit_message() (the obvious approach [2] turns out not to work for reasons that aren't entirely clear to me). ------- You are receiving this mail because: ------- You are the assignee for the bug, or are watching the assignee.
bugzilla-daemon at mindrot.org
2005-Sep-24 01:47 UTC
[Bug 1086] X forwarding won't start when a command is executed in background
http://bugzilla.mindrot.org/show_bug.cgi?id=1086 djm at mindrot.org changed: What |Removed |Added ---------------------------------------------------------------------------- AssignedTo|bitbucket at mindrot.org |djm at mindrot.org ------- Additional Comments From djm at mindrot.org 2005-09-24 11:47 ------- Created an attachment (id=964) --> (http://bugzilla.mindrot.org/attachment.cgi?id=964&action=view) Probable fix This is approach #4, creating a new list of X11 channels and the session channels that they depend upon in session.c. Please test - we need tests of this particular bug, but also regress and general usage. ------- You are receiving this mail because: ------- You are the assignee for the bug, or are watching the assignee.