[PATCH] os/osinit: Allow builders to --disable-segv-handler

Colin Walters walters at verbum.org
Mon Jan 21 08:00:01 PST 2013

On Mon, 2013-01-21 at 00:51 -0800, Keith Packard wrote:

> Seems like this might benefit from being a run-time option, rather than
> a build-time option?

The problem with that is - what's the default?  If it's on, then I'd
have to carry a patch forever to flip it off by default.  If it's off,
then people who run X.org on operating systems without this
functionality would have to carry a patch to flip it on.  Or maybe they
wouldn't care, not sure.

>  Mostly because some video drivers behave very badly
> if you don't clean up on server crash.

Hm, can you be more specific?  Is this something relevant even for KMS
or just the old UMS?

Regardless though I think I'd rather have that problem than the
possibilities of deadlock, unexpected recursion, etc. that one has when
trying to "handle" SIGSEGV.  The amount of code the X server runs inside
a signal context on SEGV is huge, if you start reading from
OsSigHandler() -> FatalError() -> AbortServer() -> CloseDownDevices().

Although the most important thing to me at the moment is that the OS
detect the fact that X has crashed, without me having to run regexps on
log files.  It looks like I could kind of do that now without patching X
by passing -core as an argument, which will trigger a raise(SIGABRT).
If you're not keen on taking this patch, then I can probably do that.

More information about the xorg-devel mailing list