GNOME Bugzilla – Bug 504663
dbus-glib installation hangs waiting for glib-genmarshal
Last modified: 2008-01-13 09:49:12 UTC
Please describe the problem: I am the maintainer of the glib2 port for MacPorts (one of the two Mac OS X package managers). I have reports from many users that using glib 2.14.4, they are unable to install dbus-glib 0.74, a dependency of gimp2. dbus-glib installation hangs while attempting to run dbus-binding-tool, and it appears that dbus-binding-tool is waiting on glib-genmarshal. This conclusion is reached based on the following output at the time of the hang: ps auxww | grep dbus-binding-tool root 18352 0.0 0.1 33440 1860 pc S+ 1:06AM 0:00.11 /opt/local/var/macports/build/_Users_vinc17_software_dports_devel_dbus-glib/work/dbus-glib-0.74/dbus/.libs/dbus-binding-tool --prefix=some_object --mode=glib-server --output=example-service-glue.h ./example-service.xml root 18395 0.0 0.1 31604 1268 pc S+ 1:06AM 0:00.02 glib-genmarshal --header --body --prefix=dbus_glib_marshal_some_object /var/tmp/dbus-binding-tool-c-marshallers.HOBO2T Users report that downgrading to glib 2.14.2 resolves the issue. Did something change between 2.14.2 and 2.14.4 relating to glib-genmarshal? Should I report this to the developers of dbus-glib instead? We added --disable-tests to the dbus-glib configuration, which appears to have possibly resolved the problem for Intel users and/or for Leopard users, but not for PowerPC Tiger users. Here are our tickets on this issue: http://trac.macports.org/projects/macports/ticket/13448 http://trac.macports.org/projects/macports/ticket/13566 Steps to reproduce: 1. Get a PowerPC Mac running Mac OS X 10.4.11 Tiger 2. Install X11, Xcode and MacPorts 1.6.0 3. sudo port -d install dbus-glib Actual results: hang Expected results: no hang Does this happen every time? for affected users, yes; other users never experience the issue Other information: I am unable to reproduce the problem on an Intel MacBook Pro with Mac OS X 10.4.11 Tiger. Given the use of --disable-tests, this may be a PowerPC-only issue at this point. It may also be Tiger-only; I haven't seen any Leopard users report the problem since we added --disable-tests.
Only change was this one: http://svn.gnome.org/viewvc/glib?view=revision&revision=6098 Don't see how this change could cause that effect. The hanging glib-genmarshal could be explained with dbus-binding-tool not calling g_spawn_close_pid on child_pid it got when spawning glib-genmarshal: http://gitweb.freedesktop.org/?p=dbus/dbus-glib.git;a=blob;h=adede27654526816da98638a4425238cc488ca85;hb=98423ae4e6b85741ce15f097652620886a49c375;f=dbus/dbus-binding-tool-glib.c#l827 You might want to modify dbus-binding-tool to close that pid (or to simply pass NULL), and report the results. Otherwise it would help if you'd attach the files the tools process when hanging.
Created attachment 101625 [details] gdb session of dbus-binding-tool hang
Created attachment 101626 [details] simple test program to reproduce the hang
Sorry for my break in, and my poor English. I've encountered the same problem with glib-2.14.4 on Mac OS X 10.4.11 PowerPC G4. Not using MacPorts. I took gdb backtrace of dbus-binding-tool and saw that the hang occurred on g_spawn_async_with_pipes. Please see the gdb session in the attachment; Comment #2. From some experiments, the hang seems to occur when the spawned process produces some long, > 4096 bytes, output. Simple test program is in another attachment; Comment #3. Compiled the test program with: $ gcc mytest.c `pkg-config --cflags glib-2.0 --libs glib-2.0` Got these results: $ ./a.out 4096 done $ ./a.out 4097 ^C $ The second ./a.out hung. The backtrace of it looked similar to that of dbus-binding-tool. Though the hang doesn't occur with glib-2.14.3 on my machine, I don't know if the problem is new to glib-2.14.4. I found this on Google: http://www.nabble.com/g_spawn_async_with_pipes-hangs-on-OSX-Tiger-to5701463.html which was reported on Aug 08, 2006.
The hang doesn't occur with glib-2.14.5, maybe fixed by this: http://bugzilla.gnome.org/show_bug.cgi?id=495589 ?
In the two MacPorts tickets on this issue (see original report above), I have confirmation from several MacPorts users who were experiencing the problem that glib 2.14.5 resolves it. So I'll close this ticket. Thanks!