After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 162989 - filechooser deadlock
filechooser deadlock
Status: RESOLVED OBSOLETE
Product: libgnomeui
Classification: Deprecated
Component: file-chooser
CVS HEAD
Other Linux
: Normal critical
: future
Assigned To: Alexander Larsson
Alexander Larsson
Depends on:
Blocks:
 
 
Reported: 2005-01-05 06:24 UTC by Matthias Clasen
Modified: 2008-08-18 03:22 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
test-fileselector.c (1018 bytes, text/plain)
2005-02-17 21:12 UTC, Bastien Nocera
Details

Description Matthias Clasen 2005-01-05 06:24:16 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
Comment 1 Matthias Clasen 2005-01-05 19:13:04 UTC
According to owen, the main problem is gtkfilesystemgnomevfs doing synchronous
gnome-vfs calls

Here is a stacktrace

  • #0 _dl_sysinfo_int80
    from /lib/ld-linux.so.2
  • #1 __lll_mutex_lock_wait
    from /lib/tls/libpthread.so.0
  • #2 _L_mutex_lock_32
    from /lib/tls/libpthread.so.0
  • #3 ??
  • #4 ??
  • #5 ??
    from /home/boston/mclasen/gnome210/cvs/gtk+/gdk/.libs/libgdk-x11-2.0.so.0
  • #6 ??
  • #7 ??
  • #8 ??
  • #9 gdk_threads_impl_lock
    at gdk.c line 373
  • #10 gdk_threads_impl_lock
    at gdk.c line 373
  • #11 vfs_full_authentication_callback
    at gnome-authentication-manager.c line 505
  • #12 gnome_vfs_module_callback_invoke
    at gnome-vfs-module-callback.c line 900
  • #13 ftp_connection_create
    at ftp-method.c line 835
  • #14 ftp_connection_acquire
    at ftp-method.c line 1570
  • #15 do_get_file_info
    at ftp-method.c line 2282
  • #16 gnome_vfs_get_file_info_uri_cancellable
    at gnome-vfs-cancellable-ops.c line 184
  • #17 gnome_vfs_get_file_info_uri
    at gnome-vfs-ops.c line 302
  • #19 gtk_file_system_gnome_vfs_get_folder
    at gtkfilesystemgnomevfs.c line 657
  • #20 IA__gtk_file_system_get_folder
    at gtkfilesystem.c line 327
  • #21 get_file_info
    at gtkfilechooserdefault.c line 1099
  • #22 check_is_folder
    at gtkfilechooserdefault.c line 1141
  • #23 gtk_file_chooser_default_set_current_folder
    at gtkfilechooserdefault.c line 4519
  • #24 _gtk_file_chooser_set_current_folder_path
    at gtkfilechooser.c line 974
  • #25 delegate_set_current_folder
    at gtkfilechooserutils.c line 288
  • #26 _gtk_file_chooser_set_current_folder_path
    at gtkfilechooser.c line 974
  • #27 delegate_set_current_folder
    at gtkfilechooserutils.c line 288
  • #28 _gtk_file_chooser_set_current_folder_path
    at gtkfilechooser.c line 974
  • #29 IA__gtk_file_chooser_set_current_folder_uri
    at gtkfilechooser.c line 912

Comment 2 Elijah Newren 2005-01-05 19:15:02 UTC
Selecting "Reassign bug to owner of selected component"  ;-)
Comment 3 Alexander Larsson 2005-01-10 15:43:40 UTC
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.
Comment 4 Bastien Nocera 2005-02-17 21:12:03 UTC
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"
Comment 5 Federico Mena Quintero 2005-05-05 17:51:03 UTC
Could someone please test this again with the very latest gtk+, gnome-vfs, and
libgnomeui?  Alex made some changes related to threading.
Comment 6 Bastien Nocera 2005-05-05 20:02:30 UTC
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 :)
Comment 7 Alexander Larsson 2005-05-06 08:02:44 UTC
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...
Comment 8 Matthias Clasen 2008-08-18 03:22:12 UTC
This bug is obsolete now that we use gio in the file chooser.