Apparently this did not get to the list, so sending once more.
Testing recent patch by Qian I got 'view3D' which showed empty window
and used 100% of a core. A little investigation using 'gdb' shows
that this 'view3D' was trying to exit. This was triggered from a
signal handler: 'view3D' received a signal (SIGTERM I think) and
'goodbye' in 'stuff3d.c' was the hander. However, signal arrived
during X11 call, namely 'view3D' was calling 'XGetWindowAttributes'
from 'libX11'. IIUC this is incorrect: one is not allowed to
perform X11 call when another call is in progress.
Why races: most of the time 'view3D' should be blocked in 'select'
system call. Signal interrupts execution of system call, and
in such case calling X11 is safe. In other places 'view3D'
performs computations and also calling X11 is safe. So if we
are "lucky" SIGTERM works as desired. But if signal arrives at
inconvenient time, than we get runaway process.
IIUC approved way to sove this is to set flag in the signal handler
and check flag in the main program.
And to make things clearer: there is bug in original code (some
folks say that this is a bug in X11 design, but simply issue is deferred
to other libraries like libXt). Recent changes just give me extra
incentive to run 'make book.pdf'...
--
Waldek Hebisch
--
You received this message because you are subscribed to the Google Groups
"FriCAS - computer algebra system" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/fricas-devel/ZjeUzqlVwELHsD-e%40fricas.org.