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 708721 - synchronously enumerating the children of a file from multiple threads leads to critical warnings
synchronously enumerating the children of a file from multiple threads leads ...
Status: RESOLVED DUPLICATE of bug 708744
Product: gvfs
Classification: Core
Component: client module
1.16.x
Other Linux
: Normal critical
: ---
Assigned To: gvfs-maint
gvfs-maint
Depends on:
Blocks:
 
 
Reported: 2013-09-25 09:37 UTC by Sven Neumann
Modified: 2013-09-26 10:36 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
simple test-case that illustrates the problem (1.46 KB, text/x-c)
2013-09-25 09:37 UTC, Sven Neumann
Details

Description Sven Neumann 2013-09-25 09:37:43 UTC
Created attachment 255664 [details]
simple test-case that illustrates the problem

We have code that access an SMB share from multiple threads and since we have updated gvfs from version 1.12 to version 1.16, we are seeing critical warnings from g_main_context_push_thread_default() and g_main_context_pop_thread_default().

I will attach a simple test-case that illustrates the problem.
Comment 1 Alexander Larsson 2013-09-25 13:20:11 UTC
Ok, so the problem is that in gdaemonfileenumerator.c:register_vfs_filter_cb() will be called back on all threads that use dbus for their dbus connections (bug 708744). This then proceeds to push the daemon->next_files_context as the default main context in order to get all dbus replies to the skeleton to the right main context.

However, this tries to aquire the context, which can fail if the thread that does i/o on the file enumerator is spinning the mainloop on the context (i.e. it runs g_daemon_file_enumerator_next_file()).
Comment 2 Alexander Larsson 2013-09-26 10:36:44 UTC

*** This bug has been marked as a duplicate of bug 708744 ***