This is using D-Bus version 1.2.16.
Some Solaris users are complaining that dbus-daemon is crashing on occasion in _dbus_loop_quit, when it is being passed in a NULL pointer. This is happening with the dbus-daemon that is started with the new GDM used when GDM presents the login GUI screen to the user.
See here for more information:
Looking at the D-Bus code it looks like _dbus_loop_quit only gets called in SIGTERM. It seems the crash is happening when _dbus_loop_quit is being called with a NULL pointer, which seems odd. The _dbus_loop quit does the following:
_dbus_assert (loop->depth > 0);
loop->depth -= 1;
So it would make sense that it would crash if passed a NULL pointer.
Note that the new GDM does kill D-Bus with a SIGTERM. However, I wonder if it is possible that it might be receiving multiple SIGTERM signals or if it is receiving a SIGTERM when it is already in the process of shutting down. This might explain why a NULL pointer is being passed into the _dbus_loop_quit() function. Is it possible that there is some odd race condition here?
Perhaps the fix would be to simply d_get_loop (context) returns NULL, or otherwise better handle a NULL so it doesn't crash.
Created attachment 34331 [details] [review]
move sigterm handling into a pipe
Patch looks good to me, assuming it still applies.
This doesn't apply to master any more, and will need a bit of merging.
I thought Colin fixed this with release 1.2.24 when the SIGTERM handler is no longer installed.
(In reply to comment #4)
> I thought Colin fixed this with release 1.2.24 when the SIGTERM handler is no
> longer installed.
Indeed. Fixed in 1.2.24 and 1.4.x.