Subject: Re: XFree dynamic loader
To: Nathan J. Williams <nathanw@wasabisystems.com>
From: Michael <macallan18@earthlink.net>
List: tech-x11
Date: 03/29/2005 15:22:34
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hello,

>>> From the stack trace you've posted, though, it looks like the X 
>>> server
>>> is calling pthread_sigmask() from a call chain inside a signal
>>> handler, and that's just not going to work.
>
>> Hmm, stupid question - is this NetBSD-specific?
>
> That it's not guaranteed to work ("invokes undefined behavior") is
> standardized by POSIX. It may happen to work, or usually happen to
> work, in other operating systems.
Ok, so it has no business in NetBSD's Xserver - I hope there's an easy 
way to disable it.

>> Could this confuse the kernel enough to keep it from rebooting?
>
> It shouldn't. This should essentially produce a process spinning in
> userland on a spinlock.
That's exactly what happens.

>> If it is I'll see if I can get rid of this SIGIO stuff, it doesn't
>> look like anyone really uses it for anything good anyway. I think
>> the signal handler is called because of some mucked up function
>> pointer and the server ends up in the SIGIO handler more or less by
>> accident.
>
> That sounds very bad.
Indeed. Maybe it's just another linuxism that crept in (SIGIO...), the 
Xserver should crash properly on this instead of mucking with pthreads 
stuff.

have fun
Michael
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (Darwin)

iQEVAwUBQkm5CspnzkX8Yg2nAQKhrAgAtCxWrl/QxHUW/mtnL0tK63c/l7e43WcS
yWExytvzybzhy/fPMFDUh2xcE0KOdQnbBp4cx0dssZES+/XizTPvbI4VOJ7qQ72d
gafJCoPtq7lNxq39NARjmeHvV/AkBJwlrp2MVgFCIPLU5yahPjNSfE+dqgws4K8X
HmQbx/d01CH/nMviG7dhQRsQ6wEs6fsPwRsClzvBpjYtW1ktFh1K+HFUwTMYpggy
+YU6DTLuR0oZvaKP8azezyNKwzGEAXA+HRwe9/C7C9WpW3QEYlHFM7p9K80MMupz
ECHlHH4Y1FduiWeMqlKJHDU6CqGAvBkQDmWSj7GWodarHWoLjZdItg==
=P1JB
-----END PGP SIGNATURE-----