GNOME Bugzilla – Bug 309867
hang when setting SoupSession::proxy_uri from a GConfClient notify callback
Last modified: 2006-05-22 14:48:14 UTC
Distribution/Version: Ubuntu I wrote some code to make a SoupSession object follow the desktop proxy settings using GConf. The code is fairly simple: 1. hook up a gconf notify callback for the /system/http_proxy key 2. inside the notify callback, construct a proxy URI 3. call g_object_set() on the SoupSession to set "proxy_uri". I have noticed step 3 hanging when setting the proxy. The code in question is available in my bazaar archive: baz get http://www.gnome.org/~jamesh/arch/james@jamesh.id.au/http-resource--devel--0 Compile it and run "./lookup someurl" and then alter the proxy settings in the network control panel. Below is the traceback I got when I interrupted the program when it hung:
+ Trace 61630
The top entry in the libsoup changelog for my checkout is 2005-07-06
Instructions for triggering the bug: 1. compile the "lookup" program 2. run "./lookup http://www.gnome.org/" 3. open "Network Proxy" control panel 4. set HTTP proxy and unset proxy until the program hangs The program prints "changing proxy URI to ..." or "unsetting proxy URI" before making the change, and "successfully set proxy URI" after the change. If the second message does not get printed then the program has hung.
I tried this, and switched the proxy on and off about a hundred times, but didn't get a hang. That stack trace is weird... what are all those "??"s? You seem to have symbols for both libsoup and glib, and the place it's getting stuck doesn't seem to be in either of them. So where is it? Alex, any reason you cc:ed yourself on this? Are you seeing this problem too?
Nope. I tried to trace the code paths and couldn't immediately find anything racy, so I wanted to see where this goes. Keep up the good work, Dan.
I just did a "jhbuild build libsoup gconf" to make sure everything is up to date. I'm guessing there is some timing related issue, since I can't get it to hang when running the program under GDB. If I managed to hang the program and attach GDB, I get the same traceback as above. I wonder if this is a libc or libpthread related issue? If I run the same executable with the same libraries I'd built with jhbuild under my Fedora chroot (so this is essentially just a different libc + libpthread), I couldn't trigger the bug at all.
Fixed in CVS.