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 747419 - Hang when cancelling a message
Hang when cancelling a message
Status: RESOLVED OBSOLETE
Product: glib
Classification: Platform
Component: gdbus
2.44.x
Other Linux
: Normal normal
: ---
Assigned To: David Zeuthen (not reading bugmail)
gtkdev
Depends on:
Blocks:
 
 
Reported: 2015-04-06 16:09 UTC by Ross Lagerwall
Modified: 2018-05-24 17:44 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
program to reproduce the problem (3.32 KB, text/x-csrc)
2015-04-06 16:09 UTC, Ross Lagerwall
Details

Description Ross Lagerwall 2015-04-06 16:09:33 UTC
Created attachment 301028 [details]
program to reproduce the problem

Occasionally, gvfs hits a hang with cancellation and gdbus, where send_message_with_reply_cleanup() calls g_cancellable_disconnect() with the connection lock held. g_cancellable_disconnect() blocks waiting for another thread which is blocked waiting for the connection lock...

Note that this bug existed before gdbus was ported to GTask.

Thread 1 (Thread 0x7fe07e2dc700 (LWP 9169))

  • #0 syscall
    from /usr/lib/libc.so.6
  • #1 g_mutex_lock_slowpath
    at gthread-posix.c line 1313
  • #2 g_mutex_lock
    at gthread-posix.c line 1337
  • #3 g_dbus_connection_signal_subscribe
    at gdbusconnection.c line 3405
  • #4 async_initable_init_first
    at gdbusproxy.c line 1739
  • #5 async_initable_init_async
    at gdbusproxy.c line 1861
  • #6 g_async_initable_init_async
    at gasyncinitable.c line 213
  • #7 g_async_initable_new_valist_async
    at gasyncinitable.c line 425
  • #8 g_async_initable_new_async
    at gasyncinitable.c line 339
  • #9 gvfs_dbus_daemon_proxy_new
    at gvfsdbus.c line 1201
  • #10 async_call_cancelled_cb
    at gvfsdaemondbus.c line 376
  • #11 g_cclosure_marshal_VOID__VOID
    at gmarshal.c line 875
  • #12 g_closure_invoke
    at gclosure.c line 801
  • #13 signal_emit_unlocked_R
    at gsignal.c line 3549
  • #14 g_signal_emit_valist
    at gsignal.c line 3305
  • #15 g_signal_emit
    at gsignal.c line 3361
  • #16 g_cancellable_cancel
    at gcancellable.c line 508
  • #17 cancel_func
    at cancel.c line 12
  • #18 g_timeout_dispatch
    at gmain.c line 4545
  • #19 g_main_dispatch
    at gmain.c line 3122
  • #20 g_main_context_dispatch
    at gmain.c line 3737
  • #21 g_main_context_iterate
    at gmain.c line 3808
  • #22 g_main_loop_run
    at gmain.c line 4002
  • #23 main
    at cancel.c line 134


Attached is a reproducer which typically hits the bug after about 10000 iterations for me.
Run like: ./cancel sftp://ross@192.168.1.48/usr/bin
Comment 1 Ross Lagerwall 2015-04-06 16:12:18 UTC
It looks like this was reported before as bug 746176 but incorrectly marked as a duplicate of another hang.
Comment 2 Bastien Nocera 2016-04-09 13:40:01 UTC
I think bug 752536 is another one.
Comment 3 GNOME Infrastructure Team 2018-05-24 17:44:01 UTC
-- GitLab Migration Automatic Message --

This bug has been migrated to GNOME's GitLab instance and has been closed from further activity.

You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.gnome.org/GNOME/glib/issues/1023.