[Originally reported to Sun as Sun bug id 5074303.] A running lbxproxy can be terminated with a CTRL/C from the controlling terminal or directly sending a signal such as SIGHUP, SIGINT or SIGTERM. It will usually exit cleanly. If an X client has had a connection refused by the server then it core dumps on exit: In one window $ lbxproxy -zlevel 4 :8000 Using port number '8000' In another window, while the lbxproxy above is running ... $ export DISPLAY=:8000 $ xclock Xlib: connection to "unix:8000.0" refused by server Xlib: Invalid MIT-MAGIC-COOKIE-1 key Error: Can't open display: :8000 $ Back in the window with lbxproxy running hit CTRL/C ^CSegmentation Fault(coredump) $ Stack trace from pstack looks like this: 0002c93c CloseDownConnection (dc8b8, 6, 71b70, 2, 8, 1fffffff) + 8 00018b70 CloseServer (80a80, 71dc8, 0, 724f8, 71680, 71a1c) + 144 0002c990 CloseDownConnection (71710, 71400, 0, 0, 80a80, 67000) + 5c 00016d1c CloseDownClient (80a80, 711d4, 71680, 71a20, 0, 71800) + 44 00016f84 KillAllClients (0, 0, 71800, 71680, 71400, 4) + 48 00016770 Dispatch (ffffffff, 0, 0, 0, 0, 666ec) + 21c 000163a4 main (0, 0, 71400, 71800, 66400, 67d40) + 10c 00016280 _start (0, 0, 0, 0, 0, 0) + 108
Created attachment 2051 [details] [review] Patch to check oc is non-NULL in CloseDownConnections() Fixed by Derek.Wang@sun.com with this explanation: The problem is caused by try to access NULL pointer in connection.c. Added code to check the pointer before accessing it.
Fix committed to CVS head: CVSROOT: /cvs/xorg Module name: xc Changes by: alanc@gabe.freedesktop.org 05/03/08 19:20:32 Log message: 2005-03-08 Alan Coopersmith <alan.coopersmith@sun.com> * programs/lbxproxy/os/connection.c: Bugzilla Bug 2678 (https://bugs.freedesktop.org/show_bug.cgi?id=2678) Patch #2051 (https://bugs.freedesktop.org/attachment.cgi?id=2051) lbxproxy core dumps on exit if clients have had authentication failures (Sun bug #5074303 - Fix by Derek Wang <derek.wang@sun.com>) Modified files: ./: ChangeLog xc/programs/lbxproxy/os/: connection.c Revision Changes Path 1.806 +9 -1 xc/ChangeLog 1.3 +2 -0 xc/programs/lbxproxy/os/connection.c
Comment on attachment 2051 [details] [review] Patch to check oc is non-NULL in CloseDownConnections() Requesting approval for X11R6.8.x stable branch (simple NULL-ptr check) ...
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.