FS#34342 - [weechat] segfaults with ruby 2.0.0_p0-1

Attached to Project: Arch Linux
Opened by Sebastian Schwarz (seschwar) - Sunday, 17 March 2013, 12:30 GMT
Last edited by Thomas Dziedzic (tomd123) - Saturday, 23 March 2013, 23:07 GMT
Task Type Bug Report
Category Packages: Extra
Status Closed
Assigned To Thomas Dziedzic (tomd123)
Architecture All
Severity Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 8
Private No

Details

weechat 0.4.0-2 segfaults when built against ruby 2.0.0_p0-1. Here is the output:

$ weechat-curses

*** Very bad! WeeChat is crashing (SIGSEGV received)
*** Full crash dump was saved to /home/seschwar/.weechat/weechat_crash_20130317_13182.log file.
***
*** Please help WeeChat developers to fix this bug:
*** 1. If you have a core file, please run: gdb weechat-curses core
*** then issue "bt" command and send result to developers
*** To enable core files with bash shell: ulimit -c 10000
*** 2. Otherwise send backtrace (below) and weechat.log
*** (be careful, private info may be in this file since
*** part of chats are displayed, so remove lines if needed)

======= WeeChat backtrace =======
(written by WeeChat 0.4.0, compiled on Mar 3 2013 11:33:34)
001 ??:0 [function ??]
002 ??:0 [function ??]
which: no linux-gate.so.1 in (/usr/local/bin:/usr/bin:/bin:/usr/local/sbin:/usr/sbin:/sbin:/usr/bin/vendor_perl:/usr/bin/core_perl:/home/seschwar/bin:/home/seschwar/.vim/bundle/lushtags/bin:/home/seschwar/.vim/bundle/clang_complete/bin:/home/seschwar/.vim/bundle/perlomni.vim/bin)
addr2line: '0x40c': No such file
004 ??:? [function __longjmp_chk]
005 ??:0 [function ??]
006 ??:0 [function ??]
007 ??:0 [function ??]
008 ??:0 [function ??]
009 ??:0 [function ??]
010 ??:0 [function ??]
011 ??:0 [function ??]
012 ??:0 [function ??]
013 ??:0 [function ??]
014 ??:0 [function ??]
015 ??:0 [function ??]
016 ??:0 [function ??]
017 ??:0 [function ??]
018 ??:0 [function ??]
019 ??:? [function __libc_start_main]
020 ??:0 [function ??]
======= End of backtrace =======
zsh: abort (core dumped) weechat-curses

WeeChat usually gracefully handles failures of loaded plugins. For example if I just downgrade to weechat 0.4.0-1, but keep ruby 2.0.0_p0-1, it will simply tell me

Error: unable to load plugin "/usr/lib/weechat/plugins/ruby.so": libruby.so.1.9: cannot open shared object file: No such file or directory
If you're trying to load a script and not a C plugin, try command to load scripts (/perl, /python, ...)

but keep working otherwise.
This task depends upon

Closed by  Thomas Dziedzic (tomd123)
Saturday, 23 March 2013, 23:07 GMT
Reason for closing:  Fixed
Additional comments about closing:  patch applied to pkgrel 3
Comment by Jonas Heinrich (onny) - Wednesday, 20 March 2013, 00:11 GMT
I guess that my crash of weechat is related to this bug, appended a crash log
Comment by pnewm (moetunes) - Friday, 22 March 2013, 19:12 GMT
So I have to add '--ignore weechat' when I update until weechat starts working with ruby 2.0?
Is that where we're at with this, or is there a better way to deal with the situation?
Comment by Thomas Dziedzic (tomd123) - Saturday, 23 March 2013, 03:50 GMT
right now, this is the only thing blocking the ruby 2.0.0 rebuild from getting moved into stable repos.

Where are we at with this? Do we have an idea on how to solve this? Do we need to get upstream involved with this?
Comment by Yangtse Su (yangtsesu) - Saturday, 23 March 2013, 04:46 GMT Comment by Sebastian Schwarz (seschwar) - Saturday, 23 March 2013, 14:18 GMT
The bulk of the commit pointed out by Yangtse Su are
documentation updates, which don't apply cleanly to
0.4.0. However just patching the relevant source file
src/plugins/ruby/weechat-ruby-api.c makes WeeChat run
with Ruby 2 just fine:

http://git.savannah.gnu.org/gitweb/?p=weechat.git;a=blobdiff_plain;f=src/plugins/ruby/weechat-ruby-api.c;h=101caec961829de03f8097edc63f497eab99aaa3;hp=bbc2fbcbe3c5290a8a975c4676a85a8c7e0998b7;hb=4fdbb83a079f24a742633fd4d02084911580c19c;hpb=55e58811b3df451db4f95b1035a39f5659788989
Comment by Thomas Dziedzic (tomd123) - Saturday, 23 March 2013, 19:32 GMT
I just pushed weechat pkgrel 3 to testing with the patch applied, please let me know if the package works for you now.
Comment by pnewm (moetunes) - Saturday, 23 March 2013, 21:47 GMT
Updated to weechat-0.4.0-3 and everything seems to be fine now.
Thanks for the effort to patch it.
Comment by Sebastian Schwarz (seschwar) - Saturday, 23 March 2013, 21:55 GMT
I can also confirm that weechat-0.4.0-3 is working well.

Loading...