irssi-import / bugs.irssi.org

bugs.irssi.org archive
https://github.com/irssi/irssi/issues
0 stars 0 forks source link

Irssi segfaults upon /part or, sometimes, a server timeout #885

Open irssibot opened 11 years ago

irssibot commented 11 years ago

Hello all,

The segfault corresponding to the attached backtrace happens when I type /part in a channel. I also, sometimes, get a segfault when the connection to a server times out. I couldn't get a backtrace of such a timeout yet, so I can't tell whether they are related.

Operating System: Slackware 13.1 64-bit Irssi version: 0.8.15

The build scripts that are used by Slackware can be found here: http://mirrors.slackware.com/slackware/slackware-13.1/source/n/irssi/

Be aware that this applies two patches, although I think it's unlikely that they cause the segfault... especially the man page patch :-)

bitlbee_rename.pl (with a small modification) bitlbee_typing_notice.pl booleansoup.pl (custom) dinnertime.pl (custom) heart.pl (custom) hilightwin.pl lastfm.pl nickcolor.pl screen_away.pl trackbar.pl zosma.pl (see https://github.com/DeltaLeonis/botsma/blob/master/zosma.pl)

I'm hesitant to add the contants of the custom scripts and the irssi config file, as they might contain sensitive data. Providing the full backtrace is already a little revealing.

irssibot commented 11 years ago

bt.log

#0  0x00000000004c1570 in get_nicks_hash (key=0x978b30, rec=0x574c203a746e6567, list=0x7fffcfc4fa18) at nicklist.c:268
No locals.
#1  0x00007f14d0319363 in g_hash_table_foreach () from /usr/lib64/libglib-2.0.so.0
No symbol table info available.
#2  0x00000000004c15d7 in nicklist_getnicks (channel=0x1751790) at nicklist.c:280
        list = 0x1743470 = {0x175d690, 0x574c203a746e6567}
        __PRETTY_FUNCTION__ = "nicklist_getnicks"
#3  0x00007f14ceb06961 in XS_Irssi__Channel_nicks (my_perl=<value optimized out>, cv=0xa47b98) at Channel.xs:111
        list = <value optimized out>
        tmp = <value optimized out>
        sp = 0xf6c7f8
        ax = 2
#4  0x0000000000553505 in Perl_pp_entersub ()
No symbol table info available.
#5  0x00000000005519a2 in Perl_runops_standard ()
No symbol table info available.
#6  0x00000000004f3eb8 in Perl_call_sv ()
No symbol table info available.
#7  0x00000000004dc996 in perl_call_signal (script=0x164c810, func=0x1703298, signal_id=12, args=0x7fffcfc4fdf0)
    at perl-signals.c:301
        sp = 0xf6c808
        rec = 0x8542a0
        sv = 0x1704da0
        perlarg = 0x1b44770
        saved_args = {0x0, 0x0, 0x0, 0x0, 0x0, 0x0}
        av = 0x7fffcfc4fdd0
        arg = 0x1753920
        n = 2
#8  0x00000000004dd012 in sig_func (p1=0x1751790, p2=0x1753920, p3=0x0, p4=0x0, p5=0x0, p6=0x0) at perl-signals.c:364
        rec = 0xac1550
        args = {0x1751790, 0x1753920, 0x0, 0x0, 0x0, 0x0}
#9  0x00000000004cc979 in signal_emit_real (rec=0x88a390, params=2, va=0x7fffcfc4ff00, first_hook=0x8d7cf0)
    at signals.c:242
        arglist = {0x1751790, 0x1753920, 0x0, 0x0, 0x0, 0x0}
        prev_emitted_signal = 0x89e740
        hook = 0x16ffe90
        prev_emitted_hook = 0x89e770
        i = 6
        stopped = 0
        stop_emit_count = 0
        continue_emit_count = 0
        __PRETTY_FUNCTION__ = "signal_emit_real"
#10 0x00000000004ccbff in signal_emit (signal=0x5f96e2 "nicklist remove", params=2) at signals.c:286
        rec = 0x88a390
        va = {{gp_offset = 32, fp_offset = 48, overflow_arg_area = 0x7fffcfc50000, reg_save_area = 0x7fffcfc4ff30}}
        signal_id = 12
        __PRETTY_FUNCTION__ = "signal_emit"
#11 0x00000000004c0e22 in nicklist_destroy (channel=0x1751790, nick=0x1753920) at nicklist.c:103
No locals.
#12 0x00000000004c1ce5 in nicklist_remove_hash (key=0x175b050, nick=0x1753920, channel=0x1751790) at nicklist.c:470
        next = 0x0
#13 0x00007f14d0319363 in g_hash_table_foreach () from /usr/lib64/libglib-2.0.so.0
No symbol table info available.
#14 0x00000000004c1d44 in sig_channel_destroyed (channel=0x1751790) at nicklist.c:479
        __PRETTY_FUNCTION__ = "sig_channel_destroyed"
#15 0x00000000004cc979 in signal_emit_real (rec=0x89e740, params=1, va=0x7fffcfc50160, first_hook=0x8a44f0)
    at signals.c:242
        arglist = {0x1751790, 0x0, 0x0, 0x0, 0x0, 0x0}
        prev_emitted_signal = 0x8a3ec0
        hook = 0x89e770
        prev_emitted_hook = 0x8a3ef0
        i = 6
        stopped = 0
        stop_emit_count = 0
        continue_emit_count = 0
        __PRETTY_FUNCTION__ = "signal_emit_real"
#16 0x00000000004ccbff in signal_emit (signal=0x5f7d0a "channel destroyed", params=1) at signals.c:286
        rec = 0x89e740
        va = {{gp_offset = 24, fp_offset = 48, overflow_arg_area = 0x7fffcfc50260, reg_save_area = 0x7fffcfc50190}}
        signal_id = 55
        __PRETTY_FUNCTION__ = "signal_emit"
#17 0x00000000004b080f in channel_destroy (channel=0x1751790) at channels.c:83
        __PRETTY_FUNCTION__ = "channel_destroy"
#18 0x00000000004a1ffe in event_part (server=0x1751c10, data=0x175db3b "#bilge", nick=0x1752f11 "Zosma")
    at channel-events.c:299
        params = 0x1af2e00 "#bilge"
        channel = 0x1af2e00 "#bilge"
        reason = 0x1af2e06 ""
        chanrec = 0x1751790
        __PRETTY_FUNCTION__ = "event_part"
#19 0x00000000004cc979 in signal_emit_real (rec=0x8a3ec0, params=4, va=0x7fffcfc503a0, first_hook=0x8e0980)
    at signals.c:242
        arglist = {0x1751c10, 0x175db3b, 0x1752f11, 0x1752f17, 0x0, 0x0}
        prev_emitted_signal = 0x8a3c40
        hook = 0x8a3ef0
        prev_emitted_hook = 0x8aec70
        i = 6
        stopped = 0
        stop_emit_count = 0
        continue_emit_count = 0
        __PRETTY_FUNCTION__ = "signal_emit_real"
#20 0x00000000004ccbff in signal_emit (signal=0x175db30 "event part", params=4) at signals.c:286
        rec = 0x8a3ec0
        va = {{gp_offset = 48, fp_offset = 48, overflow_arg_area = 0x7fffcfc504a0, reg_save_area = 0x7fffcfc503d0}}
        signal_id = 100
        __PRETTY_FUNCTION__ = "signal_emit"
#21 0x0000000000488aa7 in irc_server_event (server=0x1751c10, line=0x1752f3b "PART #bilge", nick=0x1752f11 "Zosma", 
    address=0x1752f17 "jorrit@yktinicpb.student.utwente.nl") at irc.c:304
        signal = 0x175db30 "event part"
        event = 0x175db30 "event part"
        args = 0x175db3b "#bilge"
        __PRETTY_FUNCTION__ = "irc_server_event"
#22 0x00000000004cc979 in signal_emit_real (rec=0x8a3c40, params=4, va=0x7fffcfc505b0, first_hook=0x8aec70)
    at signals.c:242
        arglist = {0x1751c10, 0x1752f3b, 0x1752f11, 0x1752f17, 0x0, 0x0}
        prev_emitted_signal = 0x8aecd0
        hook = 0x8aec70
        prev_emitted_hook = 0x8aed00
        i = 6
        stopped = 0
        stop_emit_count = 0
        continue_emit_count = 0
        __PRETTY_FUNCTION__ = "signal_emit_real"
#23 0x00000000004ccd7c in signal_emit_id (signal_id=95, params=4) at signals.c:304
        rec = 0x8a3c40
        va = {{gp_offset = 48, fp_offset = 48, overflow_arg_area = 0x7fffcfc506a0, reg_save_area = 0x7fffcfc505d0}}
        __PRETTY_FUNCTION__ = "signal_emit_id"
#24 0x0000000000488cb3 in irc_parse_incoming_line (server=0x1751c10, line=0x1752f3b "PART #bilge") at irc.c:358
        nick = 0x1752f11 "Zosma"
        address = 0x1752f17 "jorrit@yktinicpb.student.utwente.nl"
        __PRETTY_FUNCTION__ = "irc_parse_incoming_line"
#25 0x00000000004cc979 in signal_emit_real (rec=0x8aecd0, params=2, va=0x7fffcfc50790, first_hook=0x8aed00)
    at signals.c:242
        arglist = {0x1751c10, 0x1752f10, 0x0, 0x0, 0x0, 0x0}
        prev_emitted_signal = 0x0
        hook = 0x8aed00
        prev_emitted_hook = 0x0
        i = 6
        stopped = 0
        stop_emit_count = 0
        continue_emit_count = 0
        __PRETTY_FUNCTION__ = "signal_emit_real"
#26 0x00000000004ccd7c in signal_emit_id (signal_id=206, params=2) at signals.c:304
        rec = 0x8aecd0
        va = {{gp_offset = 32, fp_offset = 48, overflow_arg_area = 0x7fffcfc50880, reg_save_area = 0x7fffcfc507b0}}
        __PRETTY_FUNCTION__ = "signal_emit_id"
#27 0x0000000000488d3c in irc_parse_incoming (server=0x1751c10) at irc.c:379
        str = 0x1752f10 ":Zosma"
        count = 0
        ret = 1
        __PRETTY_FUNCTION__ = "irc_parse_incoming"
#28 0x00000000004bb65c in irssi_io_invoke (source=0x1703e10, condition=G_IO_IN, data=0x17514b0) at misc.c:54
        rec = 0x17514b0
        icond = 1
#29 0x00007f14d0327f9e in g_main_context_dispatch () from /usr/lib64/libglib-2.0.so.0
No symbol table info available.
#30 0x00007f14d032b958 in ?? () from /usr/lib64/libglib-2.0.so.0
No symbol table info available.
#31 0x00007f14d032ba80 in g_main_context_iteration () from /usr/lib64/libglib-2.0.so.0
No symbol table info available.
#32 0x000000000044c995 in main (argc=1, argv=0x7fffcfc50b48) at irssi.c:356
        version = 0
        options = {{long_name = 0x5e54ab "dummy", short_name = 100 'd', flags = 0, arg = G_OPTION_ARG_NONE, 
            arg_data = 0x859ce0, description = 0x5e54b1 "Use the dummy terminal mode", arg_description = 0x0}, {
            long_name = 0x5e54cd "version", short_name = 118 'v', flags = 0, arg = G_OPTION_ARG_NONE, arg_data = 
    0x859cf4, description = 0x5e54d5 "Display irssi version", arg_description = 0x0}, {long_name = 0x0, short_name = 
    0 '\000', flags = 0, arg = G_OPTION_ARG_NONE, arg_data = 0x0, description = 0x0, arg_description = 0x0}}
irssibot commented 11 years ago

The offending script turns out to be the attached one.

irssibot commented 11 years ago

booleansoup.pl

use strict;
use utf8;
use vars qw($VERSION %IRSSI);
#use Irssi qw(command_bind signal_add servers timeout_add);
use LWP::Simple;
#use Data::Dumper;
#print Dumper($var)."\n";

$VERSION = '0.1';
%IRSSI =
(
    authors => 'Jorrit Tijben',
    contact => 'jorrit@tijben.net',
    name => 'Booleansoup.com updater',
    description => 'Updates the booleansoup.com website to reflect the number of persons currently habiting the IRC channel.',
    license     => 'GPL',
);

sub bsoup
{
    my($channel, $nick) = @_;

    # Could be on all servers, but I'm probably not in more than one
    # #bilge channel.
    if ($channel->{'name'} eq '#bilge')
    {
        my @nicks = $channel->nicks();
        my $nickCount = scalar(@nicks);

        my $bsURL = 'http://www.booleansoup.com/';
        my $bsUpdatePass = 'somePassword';

        get($bsURL.'someURL'.$bsUpdatePass.'&count='.$nickCount);
    }
}

Irssi::signal_add_last('nicklist new', 'bsoup');
Irssi::signal_add_last('nicklist remove', 'bsoup');