Subject: Re: XFree dynamic loader
To: Martin Husemann <martin@duskware.de>
From: Michael <macallan18@earthlink.net>
List: tech-x11
Date: 03/28/2005 07:41:50
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hello,

> I'm exploring options to create a dynamic sparc64 X server - because
> the src/x11 cross-compile framework does not seem to support monolithic
> XFree86 based servers.
>
> The XFree elf loader does, from a cursory glance, only support 32bit 
> sparc
> relocations.
Hmm, building a modular server from xsrc works.

But it has another serious problem - after some time the Xserver locks 
up, apparently at random, but always in the same way. The process 
doesn't die or anything like that, it just sits there and eats all 
available CPU cycles. gdb thinks this about it:
(gdb) bt
#0  0x0000000040a132a4 in pthread__lock_ras_end ()
    from /usr/lib/libpthread.so.0
#1  0x0000000000000008 in ?? ()
#2  0x0000000040a134e8 in pthread_spinlock () from 
/usr/lib/libpthread.so.0
#3  0x0000000040a0bb38 in pthread_sigmask () from 
/usr/lib/libpthread.so.0
#4  0x000000000016c598 in xf86BlockSIGIO ()
#5  0x000000000014d650 in xf86SigioReadInput ()
#6  0x000000000016c248 in xf86SIGIO ()
#7  <signal handler called>
#8  0xffffaba100000000 in ?? ()
#9  0x0000000000000008 in ?? ()
#10 0x000000000016c5dc in xf86UnblockSIGIO ()
#11 0x000000000016c248 in xf86SIGIO ()
#12 <signal handler called>
#13 0xffffb1a100000000 in ?? ()
#14 0x0000000001347bb8 in ?? ()
#15 0xffffffffffffb16d in ?? ()
#16 0x000000000085915c in ?? ()
#17 0x00000000008598cc in ?? ()
#18 0x0000000000859c14 in ?? ()
#19 0x0000000000859dc8 in ?? ()
#20 0x00000000007a038c in ?? ()
#21 0x00000000007a20d8 in ?? ()
#22 0x00000000001ffd4c in miSpriteCopyArea ()
#23 0x000000000018a4a0 in ProcCopyArea ()
#24 0x0000000000187f78 in Dispatch ()
#25 0x000000000019b9f8 in main ()
#26 0x000000000012cb38 in ___start ()

First I thought it's a pthread issue because it /always/ hangs in 
pthread_sigmask() but the call stack contains some rather funny 
addresses - shouldn't all (function) pointers have 0 in their upper 32 
bits when compiled with -mmodel=medlow? It's not the dynamic loader's 
fault either, a monolithic Xserver shows exactly the same behaviour. 
The problem seems to be connected to function pointers, I think 
xf86SIGIO only catches them by accident and screws up further.
An extra twist s that the Xserver can be killed and restarted in this 
state, but the machine won't reboot anymore.

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

iQEVAwUBQkf7jspnzkX8Yg2nAQJkCQgAp8E5xT/8/eWB3YqMI6vncrScVSPATfLd
vJbLrAt2RdUmZcsxA6iBzu3jqLGXOdY45clTYVD8TinHOu6Yj27uPLen83ICHk8z
+1/aejA32Y0TFyNmipi0RHW/uVkvhoSmoeu4Ox8n+ven0PfHm1nyFkWPisVMOUIg
TBj5E16sLshRnJC+n42rFewxdj6lpnVlZrknWOTb1DRN0Du4EtNTmQ7n3mAl0Mox
Brzj5YdYa3RT5SdU/oCGuRyU3/t+RgIIlxKodMMbkmpOLbUT84W73ChO6zsj5W+K
Aa0XUFBmmQ+2LwngxR93RKsh4t7aKZHpK7vxrjQGxXytTZ+BqEi+QA==
=EVaa
-----END PGP SIGNATURE-----