View previous topic :: View next topic |
Author |
Message |
krotuss Apprentice
Joined: 01 Aug 2008 Posts: 221
|
Posted: Thu Mar 13, 2014 2:13 pm Post subject: |
|
|
On my box this problem was caused due to inability to "wait" for "/usr/lib/ConsoleKit/ck-collect-session-info", because SA_NOCLDWAIT flag was set in sigaction struct. This is caused by "unref_unix_signal_handler_unlocked" keeping it undefined:
Code: |
static void
unref_unix_signal_handler_unlocked (int signum)
{
unix_signal_refcount[signum]--;
if (unix_signal_refcount[signum] == 0)
{
struct sigaction action;
action.sa_handler = SIG_DFL;
sigemptyset (&action.sa_mask);
sigaction (signum, &action, NULL);
}
}
|
patching it like this:
Code: |
static void
unref_unix_signal_handler_unlocked (int signum)
{
unix_signal_refcount[signum]--;
if (unix_signal_refcount[signum] == 0)
{
struct sigaction action;
action.sa_handler = SIG_DFL;
sigemptyset (&action.sa_mask);
action.sa_flags = SA_RESTART | SA_NOCLDSTOP;
sigaction (signum, &action, NULL);
}
}
|
fixed problem for me (or at least apparently, haven't done excessive testing yet). So this is maybe glib bug. |
|
Back to top |
|
|
gerard27 Advocate
Joined: 04 Jan 2004 Posts: 2377 Location: Netherlands
|
Posted: Thu Mar 13, 2014 2:31 pm Post subject: |
|
|
Since I didn't have this problem I'm wondering what version of udev ypu're using.
I have masked anything >udev-208.
Once again I'm running ~amd64.
Gerard. _________________ To install Gentoo I use sysrescuecd.Based on Gentoo,has firefox to browse Gentoo docs and mc to browse (and edit) files.
The same disk can be used for 32 and 64 bit installs.
You can follow the Handbook verbatim.
http://www.sysresccd.org/Download |
|
Back to top |
|
|
Spacebug n00b
Joined: 04 Jan 2009 Posts: 18 Location: Germany
|
Posted: Thu Mar 13, 2014 3:50 pm Post subject: |
|
|
@krotuss: Brilliant!! Your solution solved the problem on my machine as well. Thanks!
It would be great if you could file the bug (I guess it is a glib bug) so it could fixed/patched permanently. |
|
Back to top |
|
|
krotuss Apprentice
Joined: 01 Aug 2008 Posts: 221
|
Posted: Thu Mar 13, 2014 4:16 pm Post subject: |
|
|
@Spacebug: Glad to hear that. Its already reported here. I had posted .patch file there. |
|
Back to top |
|
|
Spacebug n00b
Joined: 04 Jan 2009 Posts: 18 Location: Germany
|
Posted: Thu Mar 13, 2014 6:11 pm Post subject: |
|
|
@krotuss: Thanks for making a patch file.
To apply krotuss's patch, simply create the file
Code: | /etc/portage/patches/dev-libs/glib/ckbug.patch |
with contents:
Code: |
--- a/glib/gmain.c
+++ b/glib/gmain.c
@@ -4978,6 +4978,7 @@
struct sigaction action;
action.sa_handler = SIG_DFL;
sigemptyset (&action.sa_mask);
+ action.sa_flags = SA_RESTART | SA_NOCLDSTOP;
sigaction (signum, &action, NULL);
}
}
|
Then "emerge -a1 glib" and the problem should be solved (it did the trick for me at least).
However, in the thread https://bugs.gentoo.org/show_bug.cgi?id=501330 a Gentoo Developer claims that this is not a safe way to solve the problem. Krotuss, what is your take on this? |
|
Back to top |
|
|
erikdenv n00b
Joined: 24 May 2004 Posts: 33 Location: The Netherlands
|
Posted: Thu Mar 13, 2014 8:59 pm Post subject: |
|
|
This works for me, thanks krotuss for the patch. |
|
Back to top |
|
|
thumper Guru
Joined: 06 Dec 2002 Posts: 552 Location: Venice FL
|
Posted: Thu Mar 13, 2014 9:35 pm Post subject: |
|
|
Just thought I'd mention this.
In glib 2.39.91 (and or) master at https://github.com/GNOME/glib/blob/master/glib/gmain.c
Shows the following:
Code: | static void
unref_unix_signal_handler_unlocked (int signum)
{
unix_signal_refcount[signum]--;
if (unix_signal_refcount[signum] == 0)
{
struct sigaction action;
memset (&action, 0, sizeof (action));
action.sa_handler = SIG_DFL;
sigemptyset (&action.sa_mask);
sigaction (signum, &action, NULL);
}
} |
As you can see that function has seen a recent change, although I've had no time to test and see if it makes any difference.
Edit: here is the commit for the above noted change:
https://mail.gnome.org/archives/commits-list/2013-November/msg02586.html
George
Last edited by thumper on Fri Mar 14, 2014 12:14 am; edited 1 time in total |
|
Back to top |
|
|
krotuss Apprentice
Joined: 01 Aug 2008 Posts: 221
|
Posted: Thu Mar 13, 2014 10:18 pm Post subject: |
|
|
That patch was intended as a quick fix and proof that sigaction flags are to blame rather than for "production" use. Its up to glib and consolekit developers to come with proper solution. |
|
Back to top |
|
|
thumper Guru
Joined: 06 Dec 2002 Posts: 552 Location: Venice FL
|
|
Back to top |
|
|
Spacebug n00b
Joined: 04 Jan 2009 Posts: 18 Location: Germany
|
Posted: Fri Mar 14, 2014 1:01 am Post subject: |
|
|
The official patch works for me as well.
Thanks thumper for finding it. And thanks again to krotuss for locating the bug in the first place. Great work! |
|
Back to top |
|
|
xtz Apprentice
Joined: 29 Oct 2007 Posts: 181 Location: Singapore
|
Posted: Fri Mar 14, 2014 1:51 am Post subject: |
|
|
Works for me too. |
|
Back to top |
|
|
tetromino Retired Dev
Joined: 02 Dec 2003 Posts: 215
|
|
Back to top |
|
|
massimo Veteran
Joined: 22 Jun 2003 Posts: 1226
|
Posted: Sat Mar 15, 2014 7:29 am Post subject: |
|
|
Fixed, thanks a lot. _________________ Hello 911? How are you? |
|
Back to top |
|
|
|