meebey / smuxi

Smuxi is an user-friendly and free IRC client for Linux, Windows and Mac OS X based on GNOME / GTK+
https://smuxi.im/
GNU General Public License v2.0
172 stars 46 forks source link

smuxi-server standalone crashes #250

Closed doppioandante closed 8 years ago

doppioandante commented 8 years ago

Hi, I don't know whether this is the right bug tracker to report in, but the smuxi-server standalone from the site crashes on my 64bit ubuntu(15.something) with the following message:

Native stacktrace:

    ./smuxi-server() [0x60e1ca]
    ./smuxi-server() [0x44f0ac]
    /lib/x86_64-linux-gnu/libpthread.so.0(+0x10d10) [0x7f89df15bd10]
    ./smuxi-server() [0x56c2e0]
    ./smuxi-server() [0x61fe68]
    ./smuxi-server() [0x56d7df]
    ./smuxi-server() [0x56cba8]
    ./smuxi-server() [0x564d88]
    ./smuxi-server() [0x56566f]
    ./smuxi-server() [0x56e70a]
    ./smuxi-server() [0x56e82e]
    ./smuxi-server() [0x478645]
    ./smuxi-server() [0x493f5c]
    ./smuxi-server() [0x45049e]
    ./smuxi-server() [0x417bc3]
    ./smuxi-server() [0x416ae4]
    /lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xf0) [0x7f89deda1ac0]
    ./smuxi-server() [0x4163f9]

Debug info from gdb:

[New LWP 85375]
[New LWP 85374]
[New LWP 85373]
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
0x00007f89df15b8ab in __waitpid (pid=85376, stat_loc=0x7fff5a9b37ec, options=0) at ../sysdeps/unix/sysv/linux/waitpid.c:40
40  ../sysdeps/unix/sysv/linux/waitpid.c: File o directory non esistente.
  Id   Target Id         Frame 
  4    Thread 0x7f89dd213700 (LWP 85373) "smuxi-server" pthread_cond_wait@@GLIBC_2.3.2 () at ../sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:185
  3    Thread 0x7f89dca12700 (LWP 85374) "smuxi-server" pthread_cond_wait@@GLIBC_2.3.2 () at ../sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:185
  2    Thread 0x7f89dc211700 (LWP 85375) "smuxi-server" pthread_cond_wait@@GLIBC_2.3.2 () at ../sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:185
* 1    Thread 0x7f89dfe97740 (LWP 85372) "smuxi-server" 0x00007f89df15b8ab in __waitpid (pid=85376, stat_loc=0x7fff5a9b37ec, options=0) at ../sysdeps/unix/sysv/linux/waitpid.c:40

Thread 4 (Thread 0x7f89dd213700 (LWP 85373)):
#0  pthread_cond_wait@@GLIBC_2.3.2 () at ../sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:185
#1  0x0000000000571b97 in GC_wait_marker ()
#2  0x000000000056bcaa in GC_help_marker ()
#3  0x0000000000570264 in GC_mark_thread ()
#4  0x00007f89df1526aa in start_thread (arg=0x7f89dd213700) at pthread_create.c:333
#5  0x00007f89dee8813d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:109

Thread 3 (Thread 0x7f89dca12700 (LWP 85374)):
#0  pthread_cond_wait@@GLIBC_2.3.2 () at ../sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:185
#1  0x0000000000571b97 in GC_wait_marker ()
#2  0x000000000056bcaa in GC_help_marker ()
#3  0x0000000000570264 in GC_mark_thread ()
#4  0x00007f89df1526aa in start_thread (arg=0x7f89dca12700) at pthread_create.c:333
#5  0x00007f89dee8813d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:109

Thread 2 (Thread 0x7f89dc211700 (LWP 85375)):
#0  pthread_cond_wait@@GLIBC_2.3.2 () at ../sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:185
#1  0x0000000000571b97 in GC_wait_marker ()
#2  0x000000000056bcaa in GC_help_marker ()
#3  0x0000000000570264 in GC_mark_thread ()
#4  0x00007f89df1526aa in start_thread (arg=0x7f89dc211700) at pthread_create.c:333
#5  0x00007f89dee8813d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:109

Thread 1 (Thread 0x7f89dfe97740 (LWP 85372)):
#0  0x00007f89df15b8ab in __waitpid (pid=85376, stat_loc=0x7fff5a9b37ec, options=0) at ../sysdeps/unix/sysv/linux/waitpid.c:40
#1  0x000000000060e29c in mono_handle_native_sigsegv ()
#2  0x000000000044f0ac in mono_sigsegv_signal_handler ()
#3  <signal handler called>
#4  0x000000000056c2e0 in GC_push_all_eager ()
#5  0x000000000061fe68 in GC_with_callee_saves_pushed ()
#6  0x000000000056d7df in GC_push_roots ()
#7  0x000000000056cba8 in GC_mark_some ()
#8  0x0000000000564d88 in GC_stopped_mark ()
#9  0x000000000056566f in GC_try_to_collect_inner ()
#10 0x000000000056e70a in GC_init_inner ()
#11 0x000000000056e82e in GC_init ()
#12 0x0000000000478645 in mono_gc_base_init ()
#13 0x0000000000493f5c in mono_init_internal ()
#14 0x000000000045049e in mini_init ()
#15 0x0000000000417bc3 in mono_main ()
#16 0x0000000000416ae4 in main ()

=================================================================
Got a SIGSEGV while executing native code. This usually indicates
a fatal error in the mono runtime or one of the native libraries 
used by your application.
=================================================================
meebey commented 8 years ago

Looks like a bug in the Mono runtime. What Mono version and Smuxi version is that?

doppioandante commented 8 years ago

Exactly this one: https://smuxi.im/download.php?file=smuxi-server-1.0.3-linux-x86_64-static.tar.gz

Version 1.0.3 I suppose mono 2.6 from the requirements. I have also tried to compile it myself (by downloading a ton of packages, yuck) but disabling the optional stuff with the configure script was too much for me.

meebey commented 8 years ago

Oh the static binary package. In that case this is the right place to report this issue :)

Does that crash happen right after start or after running it for a while?

Since you are on Ubuntu I am surprised you use the static binary, because Smuxi has an Ubuntu APT repository: https://smuxi.im/download/ubuntu/ That repo always contains the latest fixes since it is build from the stable branch of Smuxi. The static binary should still not crash in that way though.

meebey commented 8 years ago

I can make a static build using a newer Mono version if needed. I don't remember the Mono version in that static binary. the --version output should maybe show also the Mono version as enhancement.

doppioandante commented 8 years ago

It crashes immediately. I've also tried the --version flag but it crashes even before entering main apparentely. My plan was to actually use it on my debian "server", but after blindly downloading it I realized that the 64bit wouldn't ever run on my 32 bit pc. Would a 32bit build be possible in theory? I can try to compile it myself if I can understand how to strip away all the GUI dependencies, I only need the server part.

I had went the repo way but I wanted to avoid to install the X server, you know.

meebey commented 8 years ago

Yes you can make a 32bit static build by running "make dist-linux-static" if you have a 32bit system, which I don't have, thus I can only make 64bit builds :-D

meebey commented 8 years ago

That dist-linux-static target makes a server-only compile btw and creates the tarball in $PWD

meebey commented 8 years ago

So do you want to try a newer 64bit build? I would make one if you want. It would contain a newer Mono version that hopefully doesn't simply crash.

meebey commented 8 years ago

Please give this one a spin: https://smuxi.im/jaws/data/files/smuxi-server-1.0.5-linux-x86_64-static.tar.gz

doppioandante commented 8 years ago

Thanks, I will test it out. In the meantime, I figured how to compile smuxi on my 32bit debian, it was as easy as:

./configure --disable-frontend-gnome --disable-frontend-stfl

and then making the dist-linux-static target as you said.

If you are interested I have a static i686 package now, maybe it could be of use? It's compiled from master.

doppioandante commented 8 years ago

Apparentely even the 1.0.5 version of the static binary crashes for some reason. I'm starting to believe it's not smuxi itself, maybe mono is messing up. Incidentally I'm upgrading to ubuntu 16, maybe this will solve the issue.

meebey commented 8 years ago

Can you paste the crash output, so we can compare if it happens in the same code area

doppioandante commented 8 years ago
Native stacktrace:

    ./smuxi-server() [0x60e10a]
    ./smuxi-server() [0x44f0bc]
    /lib/x86_64-linux-gnu/libpthread.so.0(+0x10d10) [0x7f6090901d10]
    ./smuxi-server() [0x56c260]
    ./smuxi-server() [0x61fda8]
    ./smuxi-server() [0x56d75f]
    ./smuxi-server() [0x56cb28]
    ./smuxi-server() [0x564d08]
    ./smuxi-server() [0x5655ef]
    ./smuxi-server() [0x56e68a]
    ./smuxi-server() [0x56e7ae]
    ./smuxi-server() [0x478655]
    ./smuxi-server() [0x493f5c]
    ./smuxi-server() [0x4504ae]
    ./smuxi-server() [0x417bc3]
    ./smuxi-server() [0x416ae4]
    /lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xf0) [0x7f6090547ac0]
    ./smuxi-server() [0x4163f9]

Debug info from gdb:

[New LWP 11077]
[New LWP 11076]
[New LWP 11075]
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
0x00007f60909018ab in __waitpid (pid=11078, stat_loc=0x7fff0d3996ec, options=0) at ../sysdeps/unix/sysv/linux/waitpid.c:40
40  ../sysdeps/unix/sysv/linux/waitpid.c: File o directory non esistente.
  Id   Target Id         Frame 
  4    Thread 0x7f608e9b9700 (LWP 11075) "smuxi-server" pthread_cond_wait@@GLIBC_2.3.2 () at ../sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:185
  3    Thread 0x7f608e1b8700 (LWP 11076) "smuxi-server" pthread_cond_wait@@GLIBC_2.3.2 () at ../sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:185
  2    Thread 0x7f608d9b7700 (LWP 11077) "smuxi-server" pthread_cond_wait@@GLIBC_2.3.2 () at ../sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:185
* 1    Thread 0x7f609163d740 (LWP 11074) "smuxi-server" 0x00007f60909018ab in __waitpid (pid=11078, stat_loc=0x7fff0d3996ec, options=0) at ../sysdeps/unix/sysv/linux/waitpid.c:40

Thread 4 (Thread 0x7f608e9b9700 (LWP 11075)):
#0  pthread_cond_wait@@GLIBC_2.3.2 () at ../sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:185
#1  0x0000000000571b17 in GC_wait_marker ()
#2  0x000000000056bc2a in GC_help_marker ()
#3  0x00000000005701e4 in GC_mark_thread ()
#4  0x00007f60908f86aa in start_thread (arg=0x7f608e9b9700) at pthread_create.c:333
#5  0x00007f609062e13d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:109

Thread 3 (Thread 0x7f608e1b8700 (LWP 11076)):
#0  pthread_cond_wait@@GLIBC_2.3.2 () at ../sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:185
#1  0x0000000000571b17 in GC_wait_marker ()
#2  0x000000000056bc2a in GC_help_marker ()
#3  0x00000000005701e4 in GC_mark_thread ()
#4  0x00007f60908f86aa in start_thread (arg=0x7f608e1b8700) at pthread_create.c:333
#5  0x00007f609062e13d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:109

Thread 2 (Thread 0x7f608d9b7700 (LWP 11077)):
#0  pthread_cond_wait@@GLIBC_2.3.2 () at ../sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S:185
#1  0x0000000000571b17 in GC_wait_marker ()
#2  0x000000000056bc2a in GC_help_marker ()
#3  0x00000000005701e4 in GC_mark_thread ()
#4  0x00007f60908f86aa in start_thread (arg=0x7f608d9b7700) at pthread_create.c:333
#5  0x00007f609062e13d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:109

Thread 1 (Thread 0x7f609163d740 (LWP 11074)):
#0  0x00007f60909018ab in __waitpid (pid=11078, stat_loc=0x7fff0d3996ec, options=0) at ../sysdeps/unix/sysv/linux/waitpid.c:40
#1  0x000000000060e1dc in mono_handle_native_sigsegv ()
#2  0x000000000044f0bc in mono_sigsegv_signal_handler ()
#3  <signal handler called>
#4  0x000000000056c260 in GC_push_all_eager ()
#5  0x000000000061fda8 in GC_with_callee_saves_pushed ()
#6  0x000000000056d75f in GC_push_roots ()
#7  0x000000000056cb28 in GC_mark_some ()
#8  0x0000000000564d08 in GC_stopped_mark ()
#9  0x00000000005655ef in GC_try_to_collect_inner ()
#10 0x000000000056e68a in GC_init_inner ()
#11 0x000000000056e7ae in GC_init ()
#12 0x0000000000478655 in mono_gc_base_init ()
#13 0x0000000000493f5c in mono_init_internal ()
#14 0x00000000004504ae in mini_init ()
#15 0x0000000000417bc3 in mono_main ()
#16 0x0000000000416ae4 in main ()

=================================================================
Got a SIGSEGV while executing native code. This usually indicates
a fatal error in the mono runtime or one of the native libraries 
used by your application.
=================================================================

fish: './smuxi-server' terminated by signal SIGABRT (Abort)

Looks like the same error.

meebey commented 8 years ago

Thanks. So still a SEGV in GC_push_all_eager()

meebey commented 8 years ago

Ups, I get the same crash!

meebey commented 8 years ago

Ok this issue seems to come from GCC 5, see https://github.com/mono/mono/pull/2574/commits/cd293cc37ac7a85b139177455a5927bdf3b05119

meebey commented 8 years ago

That is a fix in the boehm GC flavor though, not sgen.

doppioandante commented 8 years ago

The only thing I know is that my 32bit build works perfectly, so a problem in the code generator sounds plausible.

meebey commented 8 years ago

I have reported this issue to Mono here: https://bugzilla.xamarin.com/show_bug.cgi?id=41731

meebey commented 8 years ago

The cherry-picked patch does the trick, it no longer SEGVs

meebey commented 8 years ago

Ok this one should work now: https://smuxi.im/jaws/data/files/smuxi-server-1.0.5-linux-x86_64-static.tar.gz

doppioandante commented 8 years ago

Yes, it does work.

meebey commented 8 years ago

Thanks for trying, I will replace the 1.0.3 version on the website then.

meebey commented 8 years ago

Website ships now the fixed 1.0.5 version