GNOME Bugzilla – Bug 661421
Applications fail to initialize on GNU Hurd - commit
Last modified: 2012-01-26 14:44:59 UTC
Steps to reproduce: - Using Arch Hurd, build any version of GLib past commit c0eb77bfc "unix signal watch: make API match other sources" (Version 2.30.x, 2.29.92, etc. I have tagged this bug with version 2.29.x since that is where the commit appeared.) - Launch irssi, gtk3-demo, etc. - The following message appears: Glib-CRITICAL **: g_once_init_leave: assertion `initialization_value != 0' failed - Revert GLib to version 2.29.18-1 - Launch irssi, gtk3-demo, etc. Applications run normally. Git bisect reveals that the issue appeared in commit c0eb77bfc. Reverting the offending commit from current source appears to be complicated, as several other commits have sprung up around it. I am attempting to scan enough of the code to intelligently make changes, but unfortunately I cannot offer a fix yet. - prce is version 8.12 - libffi is version 3.0.10 - glibc is version 2.14 (if it matters) Note: I have tested this with programs (specifically, irssi 0.8.15) built both against GLib2.30.0 and GLib2.29.18. In each case, behavior was identical: GLib2.29.18 allowed programs' initialization and launch, GLib 2.30.0 did not. I can provide more package details or configuration if requested. I apologize if I have been unclear or if I have left out anything. Please let me know if more information is required.
One helpful thing to do would be to find out which code is producing the warning you are seeing. Running the program under gdb and breaking on g_logv should let you get a backtrace.
Output follows for irssi and gtk3-demo. --------------------------------------- Reading symbols from /bin/irssi...(no debugging symbols found)...done. (gdb) break g_logv Function "g_logv" not defined. Make breakpoint pending on future shared library load? (y or [n]) y Breakpoint 1 (g_logv) pending. (gdb) run Starting program: /bin/irssi [New Thread 2003.5] Breakpoint 1, 0x01260b16 in g_logv () from /lib/libglib-2.0.so.0 (gdb) bt
+ Trace 228749
Continuing. (gtk3-demo:2291): GLib-CRITICAL **: g_once_init_leave: assertion nitialization_value != 0' failed ...
Created attachment 198784 [details] GDB output This is what I intended to paste into reply #2.
That stacktrace is missing any debug symbols, so quite useless...
Created attachment 198804 [details] GDB log, irssi+GLib2.30.0 (with trace symbols) Right. This version should have correct tracing.
oh... looks like either CLOCK_MONOTONIC or CLOCK_REALTIME has the value 0 on Hurd, thus angering the g_once_init_leave() call
oops, I added Ryan to the cc, but now that I think about it, that code is my fault :-}
Created attachment 198806 [details] [review] Simplify checks for CLOCK_MONOTONIC Remove the complicated configure-time and runtime checks, and just use CLOCK_MONOTONIC if it's defined. ===== This incorporates suggestions from bug 661386 as well
Created attachment 198807 [details] [review] diff -w version, since it's mostly reindentation
With this patch, 2.30.0 works as expected. I'll go ahead and mark this as fixed if that's all right with everyone. Thank you!
Patch has not been committed yet as far as I understand => reopening.
Review of attachment 198807 [details] [review]: Looks fine to me, if it works without the extra sysconf cargo culting...
Attachment 198806 [details] pushed as 71cf70b - Simplify checks for CLOCK_MONOTONIC
*** Bug 668738 has been marked as a duplicate of this bug. ***