GNOME Bugzilla – Bug 162989
filechooser deadlock
Last modified: 2008-08-18 03:22:12 UTC
when calling gtk_file_chooser_set_current_folder_uri() with a non-local uri (which causes the gnome-vfs backend to bring up the auth dialog) from a threaded app, deadlock occurs. Observed in rhythmbox, reproducible with a threaded testfilechooser
According to owen, the main problem is gtkfilesystemgnomevfs doing synchronous gnome-vfs calls Here is a stacktrace
+ Trace 54177
Selecting "Reassign bug to owner of selected component" ;-)
This is a deep problem wrt authentication callbacks on synchronous operations. Its causing a reentrancy which can cause all sorts of problems. Its especially problematic for threaded apps. When owen and I discussed this in person the only solution we could come up with was to not do authentication on synchronous calls.
Created attachment 37622 [details] test-fileselector.c A test program for the deadlock. And the reproducer adapted from bug #154796: 1. Add an bookmark requiring password authentication (sftp://localhost/ for example) using a single-threaded app (gedit for example) 2. Run the test-fileselector, and press "Click me"
Could someone please test this again with the very latest gtk+, gnome-vfs, and libgnomeui? Alex made some changes related to threading.
Is that the gtk+ 2.6/gnome 2.10 branches, or HEAD of those? I don't currently have a full GNOME 2.10 (or even HEAD) setup to test, but if somebody has, the test case is just above there :)
Nothing i have done would have fixed this. The threading changes i made was wrt threadsafe job cancellation. The fact remains that doing synchronous gnome_vfs calls on multithreaded apps will cause problems if you get authentication callbacks. Owen and I discussed this, but we were not really able to figure out a good way to solve it. Maybe forking and doing the authentication for sync callbacks in another process would work...
This bug is obsolete now that we use gio in the file chooser.