Package: irssi-plugin-xmpp
Version: 0.50+cvs20100122-1
Severity: normal
Tags: patch
I still see this problem here right now, from time to time. It's pretty
hard to reproduce, I'd say one out of 10 times I see this behaviour.
I have been able to produce the following backtrace:
Program received signal SIGSEGV, Segmentation fault.
0xb7a6d448 in strcmp () from /lib/i686/cmov/libc.so.6
(gdb) bt
#0 0xb7a6d448 in strcmp () from /lib/i686/cmov/libc.so.6
#1 0xb79af282 in sig_recv_iq (server=0x81b7f38, lmsg=0x853fa18, type=12,
id=0x838da18 "262205394421", from=0x0, to=0x8547978
"[email protected]/remote") at xep/ping.c:108
#2 0x080e0ace in ?? ()
#3 0x080e10bc in signal_emit ()
#4 0xb79a80ca in handle_stanza (handler=0x829b450, connection=0x81b8ee0,
lmsg=0x853fa18, user_data=0x81b7f38) at stanzas.c:77
#5 0xb76263e0 in _lm_message_handler_handle_message (handler=0x81ba4f0,
connection=0x81b8ee0, message=0x853fa18) at lm-message-handler.c:47
#6 0xb76259b0 in connection_handle_message (queue=0x81b7e20,
connection=0x81b8ee0) at lm-connection.c:291
#7 connection_message_queue_cb (queue=0x81b7e20, connection=0x81b8ee0) at
lm-connection.c:439
#8 0xb762700f in message_queue_dispatch_func (source=0x81b5ba0, callback=0,
user_data=0x0) at lm-message-queue.c:100
#9 0xb7d592f5 in g_main_dispatch (context=0x81135a8) at
/build/buildd-glib2.0_2.24.1-1-i386-84Pp4V/glib2.0-2.24.1/glib/gmain.c:1960
#10 IA__g_main_context_dispatch (context=0x81135a8) at
/build/buildd-glib2.0_2.24.1-1-i386-84Pp4V/glib2.0-2.24.1/glib/gmain.c:2513
#11 0xb7d5cfd8 in g_main_context_iterate (context=0x81135a8, block=<value
optimized out>, dispatch=1, self=0x810f090) at
/build/buildd-glib2.0_2.24.1-1-i386-84Pp4V/glib2.0-2.24.1/glib/gmain.c:2591
#12 0xb7d5d1b8 in IA__g_main_context_iteration (context=0x81135a8, may_block=1)
at /build/buildd-glib2.0_2.24.1-1-i386-84Pp4V/glib2.0-2.24.1/glib/gmain.c:2654
#13 0x08071e1c in main () Program received signal SIGSEGV, Segmentation fault.
0xb7a6d448 in strcmp () from /lib/i686/cmov/libc.so.6
(Note that I had to produce a package with debugging symbols to have
this, but that's another story.)
Note how "from=0x0", a null pointer. I am unsure how that is generated.
That signal is emmitted from src/core/stanzas.c:78:
from = xmpp_recode_in(lm_message_node_get_attribute(lmsg->node, "from"));
to = xmpp_recode_in(lm_message_node_get_attribute(lmsg->node, "to"));
switch(lm_message_get_type(lmsg)) {
case LM_MESSAGE_TYPE_MESSAGE:
signal_emit("xmpp recv message", 6,
server, lmsg, type, id, from, to);
break;
case LM_MESSAGE_TYPE_PRESENCE:
signal_emit("xmpp recv presence", 6,
server, lmsg, type, id, from, to);
break;
case LM_MESSAGE_TYPE_IQ:
signal_emit("xmpp recv iq", 6,
server, lmsg, type, id, from, to);
break;
... which means that xmpp_recode_in() or lm_message_node_get_attribute()
returns null, which may be the behavior to fix in the first place.
In the meantime, I have a patch to workaround the issue that I'm
currently testing, in attachment.
A.
-- System Information:
Debian Release: squeeze/sid
APT prefers unstable
APT policy: (500, 'unstable')
Architecture: i386 (i686)
Kernel: Linux 2.6.32-trunk-686 (SMP w/1 CPU core)
Locale: LANG=fr_CA.UTF-8, LC_CTYPE=fr_CA.UTF-8 (charmap=UTF-8) (ignored: LC_ALL
set to fr_CA.UTF-8)
Shell: /bin/sh linked to /bin/bash
Versions of packages irssi-plugin-xmpp depends on:
ii irssi 0.8.15-1 terminal based IRC client
ii libc6 2.10.2-6 Embedded GNU C Library: Shared lib
ii libglib2.0-0 2.24.1-1 The GLib library of C routines
ii libidn11 1.18-1 GNU Libidn library, implementation
ii libloudmouth1-0 1.4.3-5 Lightweight C Jabber library
irssi-plugin-xmpp recommends no packages.
irssi-plugin-xmpp suggests no packages.
-- no debconf information
--- irssi-plugin-xmpp-0.50+cvs20100122.orig/src/core/xep/ping.c
+++ irssi-plugin-xmpp-0.50+cvs20100122/src/core/xep/ping.c
@@ -105,7 +105,7 @@
if (type == LM_MESSAGE_SUB_TYPE_RESULT) {
/* pong response from server of our ping */
- if (server->ping_id != NULL && strcmp(from, server->domain) == 0
+ if (server->ping_id != NULL && from && strcmp(from, server->domain) == 0
&& strcmp(id, server->ping_id) == 0) {
g_get_current_time(&now);
server->lag =