bugWeeChat - Bugs: bug #32116, Crash when switching buffers after...

 
 

bug #32116: Crash when switching buffers after unloading LUA plugin

Submitter:  Christopher O'Neill <deltafire>
Submitted:  Wed 12 Jan 2011 10:41:48 PM UTC
   
 
Category:  plugins Severity:  3 - Normal
Item Group:  crash Status:  Need Info
Privacy:  Public Assigned to:  flashcode
Originator Name:  Open/Closed:  Closed
Release:  * 0.3.4 IRC nick:  Deltafire
* Mandatory Fields

Add a New Comment Rich Markup
   

Jump to the original submission

Sat 20 Jul 2013 06:10:39 AM UTC, comment #10: 

Not enough info, closing the bug.

Sebastien Helleu <flashcode>
Group administrator
Thu 18 Aug 2011 05:55:26 AM UTC, comment #9: 

Can you try to produce a core file, run gdb and get backtrace? (see doc for how to do that). If possible under electric fence. Even if electric fence does not display anything, it should make crash before the crash you have.

Sebastien Helleu <flashcode>
Group administrator
Wed 17 Aug 2011 11:27:06 PM UTC, comment #8: 

Sorry, I forgot to mention that I've ran Weechat with electric-fence linked in, it did not detect any buffer overruns or underruns.

Christopher O'Neill <deltafire>
Wed 17 Aug 2011 11:25:38 PM UTC, comment #7: 

This crash is still occurring on FreeBSD 8.1 (i386).  It is not specific to the lua plugin and does not occur if plugins are loaded/unloaded individually.

Steps to reproduce:

/plugin load tcl
/plugin load perl
/plugin unload tcl
/plugin unload perl

======= WeeChat backtrace =======
(written by weechat 0.3.6-dev, compiled on Aug  6 2011 21:43:14)
    ^^^ This compiled date is wrong, weechat's startup screen states:
    WeeChat 0.3.6-dev [compiled on Aug 17 2011 12:25:44]
001  /home/chris/irc/weechat/src/core/wee-debug.c:167 [function debug_sigsegv]
002  0xbfbfffb4  <-- Corrupt return address?
003  /home/chris/irc/weechat/src/plugins/plugin.c:981 [function plugin_unload]
004  /home/chris/irc/weechat/src/plugins/plugin.c:1004 [function plugin_unload_name]
005  /home/chris/irc/weechat/src/core/wee-command.c:3569 [function command_plugin]
006  /home/chris/irc/weechat/src/core/wee-hook.c:738 [function hook_command_exec]
007  /home/chris/irc/weechat/src/core/wee-input.c:93 [function input_exec_command]
<snip>
======= End of  backtrace =======

Christopher O'Neill <deltafire>
Sat 06 Aug 2011 07:26:12 AM UTC, comment #6: 

Do you still have problem?

If yes, please try that:

  • enable compilation debug + core files (see doc)
  • install electric-fence
  • run weechat under electric-fence, by loading only lua plugin:


LD_PRELOAD=/usr/lib/libefence.so weechat-curses -p

  • under WeeChat:
    • /plugin load lua
    • /plugin unload lua
  • if still no crash, try to do /color, then switch buffer


Once crash happened, please send me trace using gdb (see doc).

Thank you.

Sebastien Helleu <flashcode>
Group administrator
Sat 05 Feb 2011 07:11:37 PM UTC, comment #5: 

This crash still occurs with the latest Git revision.

Christopher O'Neill <deltafire>
Fri 04 Feb 2011 07:09:57 AM UTC, comment #4: 

I believe this is fixed by this commit:
http://git.savannah.gnu.org/gitweb/?p=weechat.git;a=commitdiff;h=372d9fe8

Please try latest git version and keep me informed if this fixes crash, thank you!

Sebastien Helleu <flashcode>
Group administrator
Thu 13 Jan 2011 12:28:18 PM UTC, comment #3: 

I am using the git HEAD.  Just recompiled with the debug flags, started a test instance on an empty config directory, connected to one server & one channel issued:

/plugin unload lua

Then switched buffers a few times, no seg-fault this time until I tried to /quit:

(gdb) bt
#0  0x2889be60 in ?? ()
#1  0x28ca6d9d in weechat_plugin_end (plugin=0x28570800) at /home/chris/irc/weechat/src/plugins/scripts/tcl/weechat-tcl.c:741
#2  0x080755aa in plugin_unload (plugin=0x28570800) at /home/chris/irc/weechat/src/plugins/plugin.c:947
#3  0x080756cf in plugin_unload_all () at /home/chris/irc/weechat/src/plugins/plugin.c:996
#4  0x080759b0 in plugin_end () at /home/chris/irc/weechat/src/plugins/plugin.c:1129
#5  0x080788cd in main (argc=3, argv=0xbfbfeae0) at /home/chris/irc/weechat/src/core/weechat.c:446

Hopefully this is of some use, if not I can try it again using my main config directory (I didn't want to mess anything up).

Christopher O'Neill <deltafire>
Thu 13 Jan 2011 11:55:42 AM UTC, comment #2: 

By the way, there was a crash after unloading lua scripts in versions 0.3.3 and older (it's fixed in current development version).
Are you trying with devel version? (you have set field "release" with "dev", but maybe it's error).
Please try with devel version, this bug when unloading lua script should be fixed.

Sebastien Helleu <flashcode>
Group administrator
Thu 13 Jan 2011 06:52:37 AM UTC, comment #1: 

Hi,
Please recompile WeeChat with debug info (see doc), and give me trace with full info (including line number in files and value for variables).
Thank you.

Sebastien Helleu <flashcode>
Group administrator
Wed 12 Jan 2011 10:41:48 PM UTC, original submission:  

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 28545f00 (LWP 100087)]
0x2879a190 in ?? ()
(gdb) bt
#0  0x2879a190 in ?? ()
#1  0x287f3c18 in XS_weechat_api_window_get_pointer () from /home/chris/irc/weechat-bin/lib/weechat/plugins/perl.so
#2  0x2888db82 in Perl_pp_entersub () from /usr/local/lib/perl5/5.8.9/mach/CORE/libperl.so
#3  0x2888c2d5 in Perl_runops_standard () from /usr/local/lib/perl5/5.8.9/mach/CORE/libperl.so
#4  0x28884db0 in S_call_body () from /usr/local/lib/perl5/5.8.9/mach/CORE/libperl.so
#5  0x28887812 in Perl_call_sv () from /usr/local/lib/perl5/5.8.9/mach/CORE/libperl.so
#6  0x28887f74 in Perl_call_pv () from /usr/local/lib/perl5/5.8.9/mach/CORE/libperl.so
#7  0x287cd5f3 in weechat_perl_exec_pv () from /home/chris/irc/weechat-bin/lib/weechat/plugins/perl.so
#8  0x287cd71b in weechat_perl_exec () from /home/chris/irc/weechat-bin/lib/weechat/plugins/perl.so
#9  0x287ec376 in weechat_perl_api_hook_modifier_cb () from /home/chris/irc/weechat-bin/lib/weechat/plugins/perl.so
#10 0x0809700e in hook_modifier_exec ()
#11 0x080553bd in gui_bar_check_conditions_for_window ()
#12 0x0805d239 in gui_bar_window_add_missing_bars ()
#13 0x080530e6 in gui_window_switch_to_buffer ()
#14 0x08061050 in gui_buffer_switch_by_number ()
#15 0x0807ada1 in command_buffer ()
#16 0x08094879 in hook_command_exec ()
#17 0x0809b623 in input_exec_command ()
#18 0x0809b988 in input_data ()
#19 0x0806ca59 in gui_keyboard_pressed ()
#20 0x08051851 in gui_keyboard_flush ()
#21 0x08051c70 in gui_keyboard_read_cb ()
#22 0x080955a1 in hook_fd_exec ()
#23 0x080522b7 in gui_main_loop ()
#24 0x080788c3 in main ()

Christopher O'Neill <deltafire>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by flashcode (Posted a comment)
  • -email is unavailable- added by deltafire (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only logged-in users can vote.

     

    Follow 6 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2013-07-20 flashcode Open/ClosedOpen Closed
    2011-08-06 flashcode StatusReady For Test Need Info
    2011-02-04 flashcode StatusNeed Info Ready For Test
    2011-01-16 flashcode Release3.3-dev 0.3.4
    2011-01-13 flashcode StatusNone Need Info
        Assigned toNone flashcode

    Back to the top

    Powered by Savane 3.13-758e.
    Corresponding source code