Package: irssi
Version: 0.8.16-1+b1
Severity: important

Dear Maintainer,

   * What led up to the situation?

I have some scripts that use a connection to mysql and after I restarted
my irssi it reliably segfaults each time a mysql connection is attempted
in a script.

I'm not sure when exactly this happened, but I upgrade my packages regularly
(I run debian testing). I have tested with packages from stable, everything
seems to work normally.

   * What exactly did you do (or not do) that was effective (or
     ineffective)?

Quick way to test is to run the following command in (bare, no scripts) irssi:

  /script exec use DBI; DBI->connect("DBI:mysql:_db:_host:3306:", "_user", 
"_pass");

This will try to connect to a non-existing host with a non-existing user/pass.

   * What was the outcome of this action?

A segmentation fault (see below for more information and gdb backtrace).

   * What outcome did you expect instead?

An error message like the following:

  DBI connect('_db:_host:3306:','_user',...) failed: Unknown MySQL server host 
'_host' (0)


   * Package versions affected/NOT affected

Versions of packages that DO cause segfaults:
ii  irssi                          0.8.16-1+b1 
ii  libdbd-mysql-perl              4.028-2+b1 
ii  libdbi-perl                    1.631-3+b1
ii  libmysqlclient18:amd64         5.5.37-0+wheezy1
ii  libperl5.20                    5.20.1-1

Also tried irssi from experimental (0.8.17~rc1-1+b1, also segfaults),
and with libmysqlclient18 from testing (5.5.39-1, also segfaults).

The versions from stable do NOT segfault:
ii  irssi                            0.8.15-5
ii  libdbd-mysql-perl                4.021-1+b1
ii  libdbi-perl                      1.622-1+deb7u1
ii  libmysqlclient18:amd64           5.5.37-0+wheezy1
ii  libperl5.14                      5.14.2-21+deb7u1

Since the irssi version and the perl versions are closely linked, I could
not easily test different versions of libaries seperately.

    * Irssi dependence

A simple test without irssi behaves as expected for ALL package versions and
gives the expected error message (and no segfault):

  $ perl -e 'use DBI; DBI->connect("DBI:mysql:_db:_host:3306:", "_user", 
"_pass");'
  DBI connect('_db:_host:3306:','_user',...) failed: Unknown MySQL server host 
'_host' (0) at -e line 1.

This shows that the problem only occurs when it is run inside irssi, but not
with a standalone perl (i.e. NO segfaults with the perl5.20 nor with the
perl5.14 versions).

    * Backtrace

The following backtrace was generated from a core file from an affected irssi.
It was run with a new home-directory (~/.irssi-bare), so it uses default
configuration and NO scripts were loaded.

The backtrace always shows that the segfault is always in the same spot, in
vfprintf:

$ gdb irssi core.14456
GNU gdb (Debian 7.7.1+dfsg-3) 7.7.1
Copyright (C) 2014 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
<http://www.gnu.org/software/gdb/documentation/>.
For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from irssi...(no debugging symbols found)...done.
[New LWP 14456]
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
Core was generated by `irssi --home=~/.irssi-bare'.
Program terminated with signal SIGSEGV, Segmentation fault.
#0  0x00007fa1fdea0e70 in vfprintf () from /lib/x86_64-linux-gnu/libc.so.6
(gdb) bt
#0  0x00007fa1fdea0e70 in vfprintf () from /lib/x86_64-linux-gnu/libc.so.6
#1  0x00007fa1fdf4ccc5 in __fprintf_chk () from /lib/x86_64-linux-gnu/libc.so.6
#2  0x00007fa1fe20877b in my_malloc () from 
/usr/lib/x86_64-linux-gnu/libsres.so.14
#3  0x00007fa1fc04863a in my_error_register () from 
/usr/lib/x86_64-linux-gnu/libmysqlclient.so.18
#4  0x00007fa1fc02769d in mysql_server_init () from 
/usr/lib/x86_64-linux-gnu/libmysqlclient.so.18
#5  0x00007fa1fc02d7df in mysql_init () from 
/usr/lib/x86_64-linux-gnu/libmysqlclient.so.18
#6  0x00007fa1fc53aba9 in mysql_dr_connect () from 
/usr/lib/x86_64-linux-gnu/perl5/5.20/auto/DBD/mysql/mysql.so
#7  0x00007fa1fc53cf79 in ?? () from 
/usr/lib/x86_64-linux-gnu/perl5/5.20/auto/DBD/mysql/mysql.so
#8  0x00007fa1fc53d08a in mysql_db_login () from 
/usr/lib/x86_64-linux-gnu/perl5/5.20/auto/DBD/mysql/mysql.so
#9  0x00007fa1fc549550 in ?? () from 
/usr/lib/x86_64-linux-gnu/perl5/5.20/auto/DBD/mysql/mysql.so
#10 0x00007fa2000315ab in Perl_pp_entersub () from 
/usr/lib/x86_64-linux-gnu/libperl.so.5.20
#11 0x00007fa200029e46 in Perl_runops_standard () from 
/usr/lib/x86_64-linux-gnu/libperl.so.5.20
#12 0x00007fa1fffb3171 in Perl_call_sv () from 
/usr/lib/x86_64-linux-gnu/libperl.so.5.20
#13 0x00007fa1fc971491 in XS_DBI_dispatch () from 
/usr/lib/x86_64-linux-gnu/perl5/5.20/auto/DBI/DBI.so
#14 0x00007fa2000315ab in Perl_pp_entersub () from 
/usr/lib/x86_64-linux-gnu/libperl.so.5.20
#15 0x00007fa200029e46 in Perl_runops_standard () from 
/usr/lib/x86_64-linux-gnu/libperl.so.5.20
#16 0x00007fa1fffb33e5 in Perl_call_sv () from 
/usr/lib/x86_64-linux-gnu/libperl.so.5.20
#17 0x000000000048f010 in ?? ()
#18 0x0000000000495eed in ?? ()
#19 0x0000000000487dd2 in ?? ()
#20 0x000000000048821d in signal_emit ()
#21 0x0000000000474f88 in command_runsub ()
#22 0x0000000000487dd2 in ?? ()
#23 0x000000000048821d in signal_emit ()
#24 0x0000000000474a50 in ?? ()
#25 0x0000000000487dd2 in ?? ()
#26 0x000000000048821d in signal_emit ()
#27 0x0000000000419e53 in ?? ()
#28 0x0000000000487dd2 in ?? ()
#29 0x000000000048821d in signal_emit ()
#30 0x000000000044aaf3 in ?? ()
#31 0x0000000000487dd2 in ?? ()
#32 0x000000000048821d in signal_emit ()
#33 0x000000000044b423 in key_pressed ()
#34 0x0000000000419621 in ?? ()
#35 0x0000000000487dd2 in ?? ()
#36 0x000000000048821d in signal_emit ()
#37 0x000000000041a887 in ?? ()
#38 0x000000000047b3a3 in ?? ()
#39 0x00007fa1ff142b6d in g_main_context_dispatch () from 
/lib/x86_64-linux-gnu/libglib-2.0.so.0
#40 0x00007fa1ff142f48 in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#41 0x00007fa1ff142ffc in g_main_context_iteration () from 
/lib/x86_64-linux-gnu/libglib-2.0.so.0
#42 0x000000000041699c in main ()

-- System Information:
Debian Release: jessie/sid
  APT prefers testing
  APT policy: (500, 'testing'), (500, 'stable'), (1, 'experimental')
Architecture: amd64 (x86_64)

Kernel: Linux 3.14-1-amd64 (SMP w/4 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash

Versions of packages irssi depends on:
ii  libc6                       2.19-11
ii  libglib2.0-0                2.42.0-2
ii  libncurses5                 5.9+20140913-1
ii  libperl5.20                 5.20.1-1
ii  libssl1.0.0                 1.0.1i-2
ii  libtinfo5                   5.9+20140913-1
ii  libval14                    2.0-1.1
ii  perl                        5.20.1-1
ii  perl-base [perlapi-5.20.0]  5.20.1-1

irssi recommends no packages.

Versions of packages irssi suggests:
pn  irssi-scripts  <none>

-- no debconf information


-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org

Reply via email to