[Pidgin] #4814: Crash if xmpp pong timeout fires after account is disconnected

Pidgin trac at pidgin.im
Tue Feb 19 20:20:38 EST 2008


#4814: Crash if xmpp pong timeout fires after account is disconnected
------------------------+---------------------------------------------------
  Reporter:  nosnilmot  |       Owner:  seanegan              
      Type:  defect     |      Status:  assigned              
  Priority:  blocker    |   Milestone:  2.4.0                 
 Component:  XMPP       |     Version:                        
Resolution:             |    Keywords:  jabber xmpp ping crash
   Pending:  0          |  
------------------------+---------------------------------------------------
Changes (by nosnilmot):

  * priority:  minor => blocker

Comment:

 Craptastic. Is this #4814 or #4815 ? probably #4814 so posting here...
 {{{
 (gdb) bt full
 #0  0x00110402 in __kernel_vsyscall ()
 No symbol table info available.
 #1  0x00515fa0 in raise () from /lib/libc.so.6
 No symbol table info available.
 #2  0x005178b1 in abort () from /lib/libc.so.6
 No symbol table info available.
 #3  0x080c1b46 in sighandler (sig=11) at gtkmain.c:220
 No locals.
 #4  <signal handler called>
 No symbol table info available.
 #5  0x00139e47 in set_current_error (account=0x0, new_err=0xa115e20) at
 account.c:2371
         priv = (PurpleAccountPrivate *) 0x1ec3c8
         old_err = (PurpleConnectionErrorInfo *) 0x18477a
 #6  0x00139f19 in connection_error_cb (gc=0xc00b1e8,
 type=PURPLE_CONNECTION_ERROR_NETWORK_ERROR, description=0x17b4229 "Ping
 timeout", unused=0x0) at account.c:2402
         account = (PurpleAccount *) 0x0
         err = (PurpleConnectionErrorInfo *) 0xa115e20
 #7  0x001847d0 in purple_marshal_VOID__POINTER_INT_POINTER (cb=0x139ebd
 <connection_error_cb>, args=0xbff01114 "(\021�020\002Q", data=0x0,
 return_val=0x0) at signals.c:659
         arg1 = (void *) 0xc00b1e8
         arg2 = 0
         arg3 = (void *) 0x17b4229
 #8  0x001842a1 in purple_signal_emit_vargs (instance=0x1f0034,
 signal=0x1d5a12 "connection-error", args=0xbff01108 "�) at signals.c:482
         instance_data = (PurpleInstanceData *) 0x9e80188
         signal_data = (PurpleSignalData *) 0x9e7db00
         handler_data = (PurpleSignalHandlerData *) 0x9e77550
         l = (GList *) 0x9eba690
         l_next = (GList *) 0x0
         tmp = 0xbff01108 "�
         __PRETTY_FUNCTION__ = "purple_signal_emit_vargs"
 #9  0x00184133 in purple_signal_emit (instance=0x1f0034, signal=0x1d5a12
 "connection-error") at signals.c:434
         args = 0xbff01108 "�
         __PRETTY_FUNCTION__ = "purple_signal_emit"
 #10 0x00152a1b in purple_connection_error_reason (gc=0xc00b1e8,
 reason=PURPLE_CONNECTION_ERROR_NETWORK_ERROR, description=0x17b4229 "Ping
 timeout") at connection.c:549
         ops = (PurpleConnectionUiOps *) 0x8112040
         __PRETTY_FUNCTION__ = "purple_connection_error_reason"
 #11 0x01799f45 in jabber_pong_timeout (gc=0xc00b1e8) at jabber.c:400
         js = (JabberStream *) 0x19
 #12 0x007e0dc6 in ?? () from /lib/libglib-2.0.so.0
 No symbol table info available.
 #13 0x007e07f2 in g_main_context_dispatch () from /lib/libglib-2.0.so.0
 No symbol table info available.
 #14 0x007e37cf in ?? () from /lib/libglib-2.0.so.0
 No symbol table info available.
 #15 0x007e3b79 in g_main_loop_run () from /lib/libglib-2.0.so.0
 No symbol table info available.
 #16 0x0212df44 in IA__gtk_main () at gtkmain.c:1154
         tmp_list = (GList *) 0x0
         functions = (GList *) 0x0
         init = (GtkInitFunction *) 0x4e9ca0
         loop = (GMainLoop *) 0xa492c58
 #17 0x080c2aa3 in main (argc=2, argv=0xbff03544) at gtkmain.c:886
         opt_help = 0
         opt_login = 0
         opt_nologin = 0
         opt_version = 0
         opt_si = 1
         opt_config_dir_arg = 0x0
         opt_login_arg = 0x0
         opt_session_arg = 0x0
         search_path = 0x9ddeb50 "\001"
         accounts = (GList *) 0x4673528
         sig_indx = 1
         sigset = {__val = {91143, 0 <repeats 31 times>}}
         prev_sig_disp = (void (*)(int)) 0
         errmsg =
 "�023�\023�$N\000\b\000\000\000,\000\000\000�237N\000���M\000`S�S�024\000\000\000\000\000\000\000�211�000\204�020\223�\227�,
 '\0' <repeats 16 times>,
 "��0�0�N\000C\000\000\000\f\000\000\000\000\000\000\000\t\000\000\000�237N\000\000\000\000\000�237N\000\005\000\000\000p\024�\024�$N\000\b\000\000\000,\000\000\000�237N\000���M\0000S�030S�024\000\000\000\000\000\000\000�\225�\211�020\223�\227�000\000\000\000\023\000\000\000\024\000\000\000�"...
         segfault_message_tmp = 0x9dc5748
 "e/en_US.UTF-8/LC_MESSAGES/gtk20.mo"
         error = (GError *) 0x0
         opt = -1
         gui_check = 1
         debug_enabled = 1
         migration_failed = 0
         active_accounts = (GList *) 0xa13c480
         long_options = {{name = 0x8107b37 "config", has_arg = 1, flag =
 0x0, val = 99}, {name = 0x8107b3e "debug", has_arg = 0, flag = 0x0, val =
 100}, {name = 0x8107b44 "help", has_arg = 0, flag = 0x0, val = 104}, {name
 = 0x8107b49 "login", has_arg = 2, flag = 0x0, val = 108}, {name =
 0x8107b4f "multiple", has_arg = 0, flag = 0x0, val = 109}, {name =
 0x8107b58 "nologin", has_arg = 0, flag = 0x0, val = 110}, {name =
 0x8107b60 "session", has_arg = 1, flag = 0x0, val = 115}, {name =
 0x81078fb "version", has_arg = 0, flag = 0x0, val = 118}, {name =
 0x8107b68 "display", has_arg = 1, flag = 0x0, val = 68}, {name = 0x8107b70
 "sync", has_arg = 0, flag = 0x0, val = 83}, {name = 0x0, has_arg = 0, flag
 = 0x0, val = 0}}
 }}}

 Some of debug log leading up to it, I had jabber pong timeout set to 120
 seconds, pidgin crashed at 19:01:52:
 {{{
 (18:59:22) jabber: Recv (ssl)(236): <iq from='nosnilmot at jabber.org'
 to='nosnilmot at jabber.org/Gaim' type='error' id='purple4c89c105'><ping
 xmlns='urn:xmpp:ping'/><err
 or code='503' type='cancel'><service-unavailable
 xmlns='urn:ietf:params:xml:ns:xmpp-stanzas'/></error></iq>
 (18:59:24) jabber: Sending (ssl): <iq type='get' id='purple33898f73'><ping
 xmlns='urn:xmpp:ping'/></iq>
 ^^^ last activity on this account
 (19:00:22) dbus: Need to register an object with the dbus subsystem. (If
 you are not a developer, please ignore this message.)
 (19:00:22) dbus: The signal "account-error-changed" caused some dbus
 error. (If you are not a developer, please ignore this message.)
 (19:00:22) account: Disconnecting account 0x9f41270
 (19:00:22) connection: Disconnecting connection 0xc00b1e8
 (19:00:22) connection: Deactivating keepalive.
 (19:00:22) jabber: jabber_actions: have pep: YES
 (19:00:22) jabber: jabber_actions: have pep: NO
 (19:00:22) jabber: jabber_actions: have pep: NO
 (19:00:22) jabber: jabber_actions: have pep: YES
 (19:00:22) connection: Destroying connection 0xc00b1e8
 (19:00:45) autorecon: do_signon called
 (19:00:45) autorecon: calling purple_account_connect
 (19:00:45) account: Connecting to account nosnilmot at jabber.org/Gaim
 (19:00:45) connection: Connecting. gc = 0xa872c00
 (19:00:45) dns: DNS query for 'jabber.org' queued
 (19:00:45) autorecon: done calling purple_account_connect
 (19:00:45) dns: Created new DNS child 8460, there are now 1 children.
 (19:00:45) dns: Successfully sent DNS request to child 8460
 (19:01:05) dns: Got response for 'jabber.org'
 (19:01:05) dnsquery: Error resolving jabber.org:
 Temporary failure in name resolution
 (19:01:05) proxy: Connection attempt failed: Error resolving jabber.org:
 Temporary failure in name resolution
 (19:01:05) dbus: Need to register an object with the dbus subsystem. (If
 you are not a developer, please ignore this message.)
 (19:01:05) dbus: Need to register an object with the dbus subsystem. (If
 you are not a developer, please ignore this message.)
 (19:01:05) dbus: The signal "account-error-changed" caused some dbus
 error. (If you are not a developer, please ignore this message.)
 (19:01:05) account: Disconnecting account 0x9f41270
 (19:01:05) connection: Disconnecting connection 0xa872c00
 (19:01:05) jabber: jabber_actions: have pep: YES
 (19:01:05) jabber: jabber_actions: have pep: NO
 (19:01:05) jabber: jabber_actions: have pep: NO
 (19:01:05) jabber: jabber_actions: have pep: YES
 (19:01:05) connection: Destroying connection 0xa872c00
 (19:01:51) autorecon: do_signon called
 (19:01:51) autorecon: calling purple_account_connect
 (19:01:51) account: Connecting to account nosnilmot at jabber.org/Gaim
 (19:01:51) connection: Connecting. gc = 0xa5a8180
 (19:01:51) dns: DNS query for 'jabber.org' queued
 (19:01:51) autorecon: done calling purple_account_connect
 (19:01:51) dns: Created new DNS child 8489, there are now 1 children.
 (19:01:51) dns: Successfully sent DNS request to child 8489
 (19:01:51) dns: Got response for 'jabber.org'
 (19:01:51) dnsquery: IP resolved for jabber.org
 (19:01:51) proxy: Attempting connection to 208.245.212.98
 (19:01:51) proxy: Connecting to jabber.org:5222 with no proxy
 (19:01:51) proxy: Connection in progress
 (19:01:51) proxy: Connected to jabber.org:5222.
 (19:01:51) proxy: Error connecting to jabber.org:5222 (Connection
 refused).
 (19:01:51) proxy: Connection attempt failed: Connection refused
 (19:01:51) dbus: Need to register an object with the dbus subsystem. (If
 you are not a developer, please ignore this message.)
 (19:01:51) dbus: Need to register an object with the dbus subsystem. (If
 you are not a developer, please ignore this message.)
 (19:01:51) dbus: The signal "account-error-changed" caused some dbus
 error. (If you are not a developer, please ignore this message.)
 (19:01:51) account: Disconnecting account 0x9f41270
 (19:01:51) connection: Disconnecting connection 0xa5a8180
 (19:01:51) jabber: jabber_actions: have pep: YES
 (19:01:51) jabber: jabber_actions: have pep: NO
 (19:01:51) jabber: jabber_actions: have pep: NO
 (19:01:51) jabber: jabber_actions: have pep: YES
 (19:01:51) connection: Destroying connection 0xa5a8180
 Pidgin 2.4.0devel has segfaulted and attempted to dump a core file.
 This is a bug in the software and has happened through
 no fault of your own.
 }}}
 I suspect the problem here is we send keepalives on connections that don't
 yet have an account associated (connection failed early on), but the
 connection error that results from this cannot be handled correctly.

-- 
Ticket URL: <http://developer.pidgin.im/ticket/4814#comment:3>
Pidgin <http://pidgin.im>
Pidgin


More information about the Tracker mailing list