occasional 25-second hangs of balsa if no dbus notification service is available
I'm using a test installation of balsa, and i am experiencing some occasional 25-second hangs of the UI.
This is balsa 2.5.6-2+b1 on a debian testing/unstable system, being run with the command balsa
over an X11-forwarded ssh connection, where it's possible that there is no active dbus user bus.
If i run it instead as dbus-launch balsa
, then i don't see the 25-second hangs. Instead, i get desktop notifications about cryptographic properties of the test messages i'm viewing (i'm using imap://bob@protected-headers.cmrg.net
, with the password bob
, see the protected headers draft test vectors)
Below is a backtrace of the process's stack when such a hang occurs (if it was launched without dbus-launch
.
#0 0x00007f125e165bef in __GI___poll (fds=0x55fc9f713290, nfds=1, timeout=25000)
at ../sysdeps/unix/sysv/linux/poll.c:29
#1 0x00007f125e31910e in g_main_context_poll
(priority=<optimized out>, n_fds=1, fds=0x55fc9f713290, timeout=<optimized out>, context=0x55fc9fb876f0)
at ../../../glib/gmain.c:4216
#2 0x00007f125e31910e in g_main_context_iterate
(context=0x55fc9fb876f0, block=block@entry=1, dispatch=dispatch@entry=1, self=<optimized out>)
at ../../../glib/gmain.c:3912
#3 0x00007f125e319473 in g_main_loop_run (loop=0x55fc9fe05490) at ../../../glib/gmain.c:4111
#4 0x00007f125e55d264 in initable_init (initable=0x55fc9fce6c40, cancellable=0x0, error=0x0)
at ../../../gio/gdbusproxy.c:1964
#5 0x00007f125e4c2e22 in g_initable_new_valist
(object_type=<optimized out>, first_property_name=0x7f125e58e5b2 "g-flags", var_args=0x7fff8dbe0210, cancellable=0x0, error=0x0) at ../../../gio/ginitable.c:248
#6 0x00007f125e4c2ed9 in g_initable_new
(object_type=object_type@entry=0x55fc9f4f6c00 [GDBusProxy], cancellable=cancellable@entry=0x0, error=error@entry=0x0, first_property_name=first_property_name@entry=0x7f125e58e5b2 "g-flags")
at ../../../gio/ginitable.c:162
#7 0x00007f125e55ec6d in g_dbus_proxy_new_for_bus_sync
(bus_type=bus_type@entry=G_BUS_TYPE_SESSION, flags=flags@entry=G_DBUS_PROXY_FLAGS_DO_NOT_LOAD_PROPERTIES, info=info@entry=0x0, name=name@entry=0x7f125f319112 "org.freedesktop.Notifications", object_path=object_path@entry=0x7f125f3191a8 "/org/freedesktop/Notifications", interface_name=interface_name@entry=0x7f125f319112 "org.freedesktop.Notifications", cancellable=0x0, error=0x0) at ../../../gio/gdbusproxy.c:2279
#8 0x00007f125f3169b8 in _notify_get_proxy (error=error@entry=0x0) at ../libnotify/notify.c:245
#9 0x00007f125f31799a in notify_notification_show
(notification=notification@entry=0x55fc9fdf6b20 [NotifyNotification], error=error@entry=0x0)
at ../libnotify/notification.c:572
#10 0x000055fc9e09fdd5 in libbalsa_information_varg
(parent=0x0, type=<optimized out>, fmt=<optimized out>, ap=<optimized out>) at information.c:135
#11 0x000055fc9e09ff30 in libbalsa_information
(type=type@entry=LIBBALSA_INFORMATION_ERROR, fmt=fmt@entry=0x55fc9e10731b "%s: %s") at information.c:174
#12 0x000055fc9e0c9430 in libbalsa_body_decrypt
(body=body@entry=0x55fc9fdb7c00, protocol=protocol@entry=GPGME_PROTOCOL_CMS, parent=parent@entry=0x0)
at rfc3156.c:439
#13 0x000055fc9e035b4f in libbalsa_msg_try_decrypt
(chk_crypto=0x7fff8dbe0780, body=0x55fc9fdb7c00, message=0x7f1240030870 [LibBalsaMessage])
at balsa-message.c:2873
#14 0x000055fc9e035b4f in libbalsa_msg_perform_crypto_real
(message=message@entry=0x7f1240030870 [LibBalsaMessage], body=0x55fc9fdb7c00, chk_crypto=chk_crypto@entry=0x7fff8dbe0780) at balsa-message.c:3132
#15 0x000055fc9e037f26 in balsa_message_perform_crypto
(message=message@entry=0x7f1240030870 [LibBalsaMessage], chk_mode=<optimized out>, no_mp_signed=no_mp_signed@entry=0, max_ref=max_ref@entry=1) at balsa-message.c:3197
#16 0x000055fc9e038c6e in balsa_message_perform_crypto
(max_ref=1, no_mp_signed=0, chk_mode=<optimized out>, message=0x7f1240030870 [LibBalsaMessage])
at balsa-message.c:3184
#17 0x000055fc9e038c6e in balsa_message_set
(bm=0x55fc9f828130 [BalsaMessage], mailbox=mailbox@entry=0x55fc9f632d30 [LibBalsaMailboxImap], msgno=msgno@entry=12) at balsa-message.c:1185
#18 0x000055fc9e0557e1 in bw_idle_cb (window=0x55fc9f7e6340 [BalsaWindow]) at main-window.c:4322
#19 0x000055fc9e0557e1 in bw_idle_cb (window=0x55fc9f7e6340 [BalsaWindow]) at main-window.c:4306
#20 0x00007f125e318dee in g_main_dispatch (context=0x55fc9f4ecdd0) at ../../../glib/gmain.c:3179
#21 0x00007f125e318dee in g_main_context_dispatch (context=context@entry=0x55fc9f4ecdd0)
at ../../../glib/gmain.c:3844
#22 0x00007f125e3191a0 in g_main_context_iterate
(context=0x55fc9f4ecdd0, block=block@entry=1, dispatch=dispatch@entry=1, self=<optimized out>)
at ../../../glib/gmain.c:3917
#23 0x00007f125e319473 in g_main_loop_run (loop=0x55fc9f922030) at ../../../glib/gmain.c:4111
#24 0x00007f125eafe705 in gtk_main () at /usr/lib/x86_64-linux-gnu/libgtk-3.so.0
#25 0x000055fc9e05d64e in real_main (argc=<optimized out>, argv=0x55fc9f5838f0) at main.c:566
#26 0x000055fc9e05d64e in command_line_cb
(application=application@entry=0x55fc9f4eb0f0 [GtkApplication], command_line=0x55fc9f6c9d60 [GApplicationCommandLine], user_data=<optimized out>) at main.c:749
#31 0x00007f125e42081f in <emit signal ??? on instance 0x55fc9f4eb0f0 [GtkApplication]>
(instance=instance@entry=0x55fc9f4eb0f0, signal_id=<optimized out>, detail=detail@entry=0)
at ../../../gobject/gsignal.c:3453
#27 0x00007f125e4c9d2b in _g_cclosure_marshal_INT__OBJECT
(closure=closure@entry=0x55fc9f4ecda0, return_value=return_value@entry=0x7fff8dbe0bc0, n_param_values=n_param_values@entry=2, param_values=param_values@entry=0x7fff8dbe0c20, invocation_hint=invocation_hint@entry=0x7fff8dbe0ba0, marshal_data=marshal_data@entry=0x0) at ../../../gio/gmarshal-internal.c:799
#28 0x00007f125e403eb2 in g_closure_invoke
(closure=0x55fc9f4ecda0, return_value=0x7fff8dbe0bc0, n_param_values=2, param_values=0x7fff8dbe0c20, invocation_hint=0x7fff8dbe0ba0) at ../../../gobject/gclosure.c:810
#29 0x00007f125e4174d4 in signal_emit_unlocked_R
(node=<optimized out>, detail=detail@entry=0, instance=instance@entry=0x55fc9f4eb0f0, emission_return=emission_return@entry=0x7fff8dbe0d40, instance_and_params=instance_and_params@entry=0x7fff8dbe0c20)
at ../../../gobject/gsignal.c:3641
#30 0x00007f125e41f80a in g_signal_emit_valist
(instance=<optimized out>, signal_id=<optimized out>, detail=<optimized out>, var_args=var_args@entry=0x7fff8dbe0df0) at ../../../gobject/gsignal.c:3407
#32 0x00007f125e522293 in g_application_call_command_line
(exit_status=0x7fff8dbe0f84, options=<optimized out>, arguments=<optimized out>, application=0x55fc9f4eb0f0 [GtkApplication]) at ../../../gio/gapplication.c:1076
#33 0x00007f125e522293 in g_application_call_command_line
(application=0x55fc9f4eb0f0 [GtkApplication], arguments=<optimized out>, options=<optimized out>, exit_status=0x7fff8dbe0f84) at ../../../gio/gapplication.c:1054
#34 0x00007f125e524aa9 in g_application_real_local_command_line
(application=0x55fc9f4eb0f0 [GtkApplication], arguments=0x7fff8dbe0f88, exit_status=0x7fff8dbe0f84)
at ../../../gio/gapplication.c:1130
#35 0x00007f125e524c6a in g_application_run
(application=0x55fc9f4eb0f0 [GtkApplication], argc=<optimized out>, argv=<optimized out>)
at ../../../gio/gapplication.c:2528
#36 0x000055fc9e024d6a in main (argc=1, argv=0x7fff8dbe10d8) at main.c:773