Current gimp (1.1.21) seems to have problems with recovering from any
plugin that dies.  Things start going wrong when it takes a SIGPIPE
while trying to write(read?) to the pipe to the plugin which is dead.
Rather than ignoring SIGPIPE, and collecting an EPIPE from the io
operation and using this to trigger dead plugin cleanup operations,
gimp currently treats SIGPIPE just like any other signal: it's fatal.
Unfortunately, while attempting to print out some error message or
other, gimp causes a segfault.  This might be due to non-reentrant
stdio libraries in use, I don't know.  According to POSIX, the only
thing you're allowed to do is read or write variables of type
sigatomic_t.  Calling libc funcitions (including printf()) sounds like
a recipe for disaster, especially with a non-reentrant libc.

This needs some more thought, and I don't have much time right now to
look into any more.  I'm pretty sure that plugins were correctly
cleaned up on their unexpected termination at some earlier stage.  The
whole point of plugins being separate processes is that a plugin
should be unable to cause the main gimp app to crash: if they can then
this is a fairly critical bug that should be fixed.


Reply via email to