On Oct 08, 10 18:25:11 +0200, Matthias Hopf wrote: > The following is a patch for the xserver that makes Xorg's stack traces > *tremendously* more useful - by providing exact source location > including source snippets (if -debug{source,info} rpms are installed, in > the case of rpm-based distributions), and local variable contents. > > This is done by calling an external script /usr/bin/xorg-backtrace, > which in turn will attach gdb to the server process and parse its > output. Buffer handling is quite tricky, involving invisible temporary > files, as the X process is frozen during this time.
For what it's worth, we're facing two issues while integrating this into openSUSE at the moment: - Together with setuid-root our security team is not exactly fond of the patch - gdb is a big beast, and currently nobody is sure whether there might be any potential security flaw. The current script calls 'rpm' without exact path, which should be changed, apart from that I cannot see any security hole ATM. - Under some circumstances the server falls into a live-lock in fork() during a segfault. It completely baffles me how this can happen (the server uses ~100% cpu time at that point), as fork() is supposed to be signal-safe, and doesn't allocate any memory on invocation. Any insight herein would be very welcome. These two points made us convince that - at the current point of time - it doesn't seem like a good idea to actually use this patch. So I won't improve it for now, nor will I integrate the other architectures (like Solaris) into the system. Feel free to play around with it, though. So long Matthias -- Matthias Hopf <mh...@suse.de> __ __ __ Maxfeldstr. 5 / 90409 Nuernberg (_ | | (_ |__ m...@mshopf.de Phone +49-911-74053-715 __) |_| __) |__ R & D www.mshopf.de _______________________________________________ xorg-devel@lists.x.org: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: http://lists.x.org/mailman/listinfo/xorg-devel