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 346994 - Gossip/Loudmouth crashes on network errors
Gossip/Loudmouth crashes on network errors
Status: RESOLVED FIXED
Product: gossip
Classification: Deprecated
Component: General
0.12
Other All
: Normal normal
: ---
Assigned To: Gossip Maintainers
Gossip Maintainers
: 356430 357642 357643 358121 358258 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2006-07-08 17:31 UTC by Sebastien NOEL
Modified: 2006-10-26 08:23 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Fixes one problem in loudmouth (1.34 KB, patch)
2006-09-19 20:04 UTC, Richard Hult
none Details | Review

Description Sebastien NOEL 2006-07-08 17:31:36 UTC
Steps to reproduce:
1. gossip -n
2. Chat -> Connect
3. 'The Application "gossip" has quit unexpectedly'


Stack trace:
Backtrace was generated from '/usr/bin/gossip'

Using host libthread_db library "/lib/tls/i686/cmov/libthread_db.so.1".
[Thread debugging using libthread_db enabled]
[New Thread -1226045760 (LWP 7225)]
0xffffe410 in __kernel_vsyscall ()

Thread 1 (Thread -1226045760 (LWP 7225))

  • #0 __kernel_vsyscall
  • #1 __waitpid_nocancel
    from /lib/tls/i686/cmov/libpthread.so.0
  • #2 gnome_gtk_module_info_get
    from /usr/lib/libgnomeui-2.so.0
  • #3 <signal handler called>
  • #4 connection_connect_cb
    at lm-connection.c line 532
  • #5 g_io_channel_unix_get_fd
    from /usr/lib/libglib-2.0.so.0
  • #6 g_main_context_dispatch
    from /usr/lib/libglib-2.0.so.0
  • #7 g_main_context_check
    from /usr/lib/libglib-2.0.so.0
  • #8 g_main_loop_run
    from /usr/lib/libglib-2.0.so.0
  • #9 gtk_main
    from /usr/lib/libgtk-x11-2.0.so.0
  • #10 main
    at gossip-main.c line 182
  • #0 __kernel_vsyscall


Other information:
i use Debian SID and it crash with
 * libloudmouth1-0 1.1.2-2 
 * gossip 0.12-2
Comment 1 Sebastien NOEL 2006-07-08 18:01:22 UTC
oops, i forgot to copy/past the protocol log
---

~$ LANG=C LM_DEBUG=NET gossip
Going to connect to jabber.belnet.be
Trying 2001:6a8:3c80::64 port 5222...
Connection failed.
Connection failed: Connection refused (error 111)
Trying 193.190.198.23 port 5222...
Connection success.

SEND:
-----------------------------------
<?xml version='1.0' encoding='UTF-8'?>
-----------------------------------

SEND:
-----------------------------------
<stream:stream xmlns="jabber:client" xmlns:stream="http://etherx.jabber.org/streams" to="jabber.belnet.be" id="msg_1">
-----------------------------------
~$
Comment 2 Sebastien NOEL 2006-07-08 22:05:08 UTC
ok, it's ipv6 related; if i try to connect to an ipv4 only server, it works

tips: jabber.belnet.be has ipv4 & v6 addresses but the jabber deamon only listens on ipv4
Comment 3 Richard Hult 2006-07-27 15:55:30 UTC
I guess I have to enable ipv6 somehow on my machine to reproduce? I registered an account and can successfully log in.
Comment 4 Sebastien NOEL 2006-07-27 21:06:19 UTC
(In reply to comment #3)
> I guess I have to enable ipv6 somehow on my machine to reproduce? 
> 

yes, you need a working ipv6 connection to reproduce, enable ipv6 support in the kernel (with "modprobe ipv6") isn't enough. You may need to set up a tunnel via a Tunnel Broker if your ISP doesn't provide you a native ipv6 connection.

Comment 5 Richard Hult 2006-07-28 07:29:38 UTC
OK, thanks. If someone else can debug this I'd be happy.
Comment 6 Martyn Russell 2006-07-29 13:03:56 UTC
Since no one really has IPv6 so easily available, is there any chance you could run this in gdb and provide a back trace?
Comment 7 Sebastien NOEL 2006-07-29 19:03:32 UTC
(In reply to comment #6)
> Since no one really has IPv6 so easily available, is there any chance you could
> run this in gdb and provide a back trace?
> 

what do you need exactly ? after re-reading http://live.gnome.org/GettingTraces it seems to me that i already provide the trace in the initial post.

sorry if i'm saying HUGE stupidities, i'm not very familiar with gdb :/
Comment 8 Martyn Russell 2006-07-30 12:24:14 UTC
Sorry, I was talking crap, I missed the backtrace, not sure how :/

Yea, by the looks of it, it is a Loudmouth issue.
Comment 9 Guillaume Desmottes 2006-09-06 19:47:47 UTC
I can reproduce this crash with loudmouth and Gossip HEAD.
Comment 10 Laurent Bigonville 2006-09-17 17:01:01 UTC
I don't think this problem is ipv6 specific...

If an hostname has more than one A record, and that the first one is not listening it crash too

For example I add in /etc/hosts

127.0.0.1 plop.foo
193.190.198.23 plop.foo

and it crashes too.
Comment 11 Laurent Bigonville 2006-09-17 17:06:23 UTC
(In reply to comment #10)
> I don't think this problem is ipv6 specific...
> 
> If an hostname has more than one A record, and that the first one is not
> listening it crash too
> 
> For example I add in /etc/hosts
> 
> 127.0.0.1 plop.foo
> 193.190.198.23 plop.foo
> 
> and it crashes too.
> 

When I try to connect to plop.foo of course

(gdb) thread apply all bt full

Thread 1 (Thread -1226455376 (LWP 9876))

  • #0 connection_connect_cb
    at lm-connection.c line 536
  • #1 g_io_unix_dispatch
    at giounix.c line 162
  • #2 IA__g_main_context_dispatch
    at gmain.c line 2045
  • #3 g_main_context_iterate
    at gmain.c line 2677
  • #4 IA__g_main_loop_run
    at gmain.c line 2881
  • #5 IA__gtk_main
    at gtkmain.c line 1024
  • #6 ??
  • #7 ??

Comment 12 Richard Hult 2006-09-19 19:45:23 UTC
Ah, good catch, that helps debugging this a lot :)

However, I can't reproduce the crash, I just get an error callback that propagates up to gossip. There is a bug in loudmouth though, where it doesn't get the socket error correctly, which could be the reason. Do you think you could try a patch for loudmouth for me?
Comment 13 Richard Hult 2006-09-19 20:04:03 UTC
Created attachment 73048 [details] [review]
Fixes one problem in loudmouth

If anyone wants to test this patch for loudmouth 1.1.x that would be great.
Comment 14 Laurent Bigonville 2006-09-19 20:57:25 UTC
keep crashing with the patch
Comment 15 Richard Hult 2006-09-19 21:18:23 UTC
That was quick, thanks :) OK, good to know.

Comment 16 Richard Hult 2006-09-22 20:23:54 UTC
Do you still get the same stack trace, by the way? 
Comment 17 Richard Hult 2006-09-25 16:54:32 UTC
OK, I've looked into this some more, it has nothing to do with if an address has many records even, it's just the same old problem with nonworking connections. The problem leads to some random memory corruption so all the stack traces look different. I'm working on a loudmouth fix.
Comment 18 Richard Hult 2006-09-25 16:55:57 UTC
I'll use this bug as the general network problem crasher bug.
Comment 19 Richard Hult 2006-09-25 16:59:20 UTC
*** Bug 356430 has been marked as a duplicate of this bug. ***
Comment 20 Richard Hult 2006-09-25 17:01:50 UTC
*** Bug 357642 has been marked as a duplicate of this bug. ***
Comment 21 Richard Hult 2006-09-25 17:04:18 UTC
*** Bug 357643 has been marked as a duplicate of this bug. ***
Comment 22 Laurent Bigonville 2006-09-25 18:37:28 UTC
I think the severity could be raised
Comment 23 Richard Hult 2006-09-25 18:51:27 UTC
We don't really use the severity/priority fields.
Comment 24 Richard Hult 2006-09-29 10:33:45 UTC
*** Bug 358258 has been marked as a duplicate of this bug. ***
Comment 25 Richard Hult 2006-09-29 10:34:11 UTC
*** Bug 358121 has been marked as a duplicate of this bug. ***
Comment 26 Laurent Bigonville 2006-10-01 00:15:12 UTC
I don't know if it's relevant but I discover that in function  _lm_connection_succeeded(), connect_data->connection take a strange value after line 401

Breakpoint 6, _lm_connection_succeeded (connect_data=0x8315dc8) at lm-connection.c:401
401             connection->io_watch_in = 
(gdb) display *connect_data 
4: *connect_data = {connection = 0x81d5ed0, resolved_addrs = 0x8315d50, current_addr = 0x8315d90, fd = 21, io_channel = 0x8126910}
(gdb) n
413                     connection->io_watch_err =
4: *connect_data = {connection = 0x1, resolved_addrs = 0xb78f6bcb, current_addr = 0x8315628, fd = 0, io_channel = 0x8126910}
Comment 27 Richard Hult 2006-10-01 07:02:45 UTC
The reasons for this bug is known already, just needs to be fixed:

http://developer.imendio.com/issues/browse/LM-59
http://developer.imendio.com/issues/browse/LM-60
Comment 28 Daniel Holbach 2006-10-08 06:30:41 UTC
Laurent also reported https://launchpad.net/distros/ubuntu/+source/loudmouth/+bug/64618 and asked me to apply http://developer.imendio.com/issues/secure/attachment/10096/stale-source-unreffed.patch (of LM-60) and get it into Ubuntu. As I don't suffer from the problem myself, I'd like to hear your input on it - it looks fairly safe though.
Comment 29 Richard Hult 2006-10-09 06:52:49 UTC
Yes, that patch should be safe (it's kind of a workaround and might not be needed when LM-59 is fixed, but doesn't harm in the meantime).
Comment 30 Daniel Holbach 2006-10-09 07:16:54 UTC
Gracias.
Comment 31 Richard Hult 2006-10-26 08:23:12 UTC
Botth LM-59 and LM-60 have been committed to loudmouth so I'll close this.