Open irssibot opened 18 years ago
Also confirmed...
[root@arthur ~]# gdb irssi GNU gdb Red Hat Linux (6.3.0.0-1.143.el4rh) Copyright 2004 Free Software Foundation, Inc. GDB is free software, covered by the GNU General Public License, and you are welcome to change it and/or distribute copies of it under certain conditions. Type "show copying" to see the conditions. There is absolutely no warranty for GDB. Type "show warranty" for details. This GDB was configured as "i386-redhat-linux-gnu"...Using host libthread_db library "/lib/tls/libthread_db.so.1". (gdb) r Starting program: /usr/bin/irssi [Thread debugging using libthread_db enabled] [New Thread -1208432416 (LWP 14914)] Program received signal SIGSEGV, Segmentation fault. [Switching to Thread -1208432416 (LWP 14914)] 0x0090acf5 in GC_malloc (bytes=52) at thread_local_alloc.c:176 176 thread_local_alloc.c: No such file or directory. in thread_local_alloc.c (gdb) bt #0 0x0090acf5 in GC_malloc (bytes=52) at thread_local_alloc.c:176 #1 0x002ee963 in g_malloc () from /usr/lib/libglib-2.0.so.0 #2 0x002ef4c7 in g_mem_chunk_new () from /usr/lib/libglib-2.0.so.0 #3 0x002d2154 in g_array_sized_new () from /usr/lib/libglib-2.0.so.0 #4 0x002d21ec in g_array_new () from /usr/lib/libglib-2.0.so.0 #5 0x080bb32f in args_register (options=0x80f4360) at args.c:29 #6 0x080bf2d1 in core_init_paths (argc=1, argv=0xbff59974) at core.c:193 #7 0x0806ae5d in main (argc=1, argv=0xbff59974) at irssi.c:341
Using latest irssi from RPMforge with gc 7.0. If I downgrade to gc 6.8 all works again.
Similar results under ubuntu x32 and debian amd64, interestingly in a completely different place to the people above, with 0.8.12:
faux@newton:~/irssi-812$ #./configure --with-gc --enable-debug=full --with-debug
faux@newton:~/irssi-812$ #make
faux@newton:~/irssi-812$ #sudo make install
faux@newton:~/irssi-812$ which irssi
/usr/local/bin/irssi
faux@newton:~/irssi-812$ $(which irssi)
Segmentation fault (core dumped)
faux@newton:~/irssi-812$ $(which irssi) --version
irssi 0.8.12 (20071008 1749)
faux@newton:~/irssi-812$ gdb $(which irssi)
GNU gdb 6.6-debian
Copyright (C) 2006 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB. Type "show warranty" for details.
This GDB was configured as "i486-linux-gnu"...
Using host libthread_db library "/lib/tls/i686/cmov/libthread_db.so.1".
(gdb) r
Starting program: /usr/local/bin/irssi
[Thread debugging using libthread_db enabled]
[New Thread -1214146352 (LWP 29133)]
Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread -1214146352 (LWP 29133)]
0xb7bcfb2d in GC_free () from /usr/lib/libgc.so.1
(gdb) bt
#0 0xb7bcfb2d in GC_free () from /usr/lib/libgc.so.1
#1 0xb7daa131 in g_free () from /usr/lib/libglib-2.0.so.0
#2 0xb7d95ed2 in ?? () from /usr/lib/libglib-2.0.so.0
#3 0x081737f8 in ?? ()
#4 0x0000001c in ?? ()
#5 0xbfc933c8 in ?? ()
#6 0xb7d96537 in g_hash_table_lookup () from /usr/lib/libglib-2.0.so.0
#7 0x080ddcd0 in signal_add_full_id (module=0x80f37d5 "fe-common/irc/dcc", priority=557, signal_id=508, func=0x8080570 <sig_message_dcc_own>, user_data=0x0) at signals.c:107
#8 0x08080692 in fe_dcc_chat_messages_init () at fe-dcc-chat-messages.c:142
#9 0x0807fdf0 in fe_dcc_chat_init () at fe-dcc-chat.c:350
#10 0x0807e9db in fe_irc_dcc_init () at fe-dcc.c:159
#11 0x08073c3b in fe_irc_modules_init () at irc-modules.c:4
#12 0x08072115 in main (argc=356352, argv=0x0) at irssi.c:154
(gdb) q
The program is running. Exit anyway? (y or n) y
faux@newton:~/irssi-812$ apt-cache show libglib2.0-dev libgc-dev build-essential gcc libncurses5-dev libc6-dev autotools-dev openssl libperl-dev | egrep '^(Package|Version)'
Package: libglib2.0-dev
Version: 2.12.11-0ubuntu1
Package: libgc-dev
Version: 1:6.8-1ubuntu2
Package: build-essential
Version: 11.3
Package: gcc
Version: 4:4.1.2-1ubuntu1
Package: libncurses5-dev
Version: 5.5-5ubuntu2
Package: libc6-dev
Version: 2.5-0ubuntu14
Package: autotools-dev
Version: 20060920.1
Package: openssl
Version: 0.9.8c-4ubuntu0.2
Package: openssl
Version: 0.9.8c-4build1
Package: libperl-dev
Version: 5.8.8-7ubuntu0.1
Package: libperl-dev
Version: 5.8.8-7build1
faux@newton:~/irssi-812$ uname -a
Linux newton 2.6.20-16-386 #2 Sun Sep 23 19:47:10 UTC 2007 i686 GNU/Linux
It is because of the default glib memory allocator. Try with G_SLICE=always-malloc irssi
Starting irssi with 'G_SLICE=always-malloc irssi' does indeed stop it from Segfaulting and/or dumping core (only tested by starting irssi, didn't attempt anything else). Is there a way to have irssi automatically set that if it's compiled with GC? If not, it should probably be commented on in the output of ./configure when a user compiles --with-gc.
This only started happening recently, I've tried upgrading and downgrading gc but end up with the same results. This dump is one where I compiled irssi against gc-6.8.