Debian Bug report logs - #347642
php5-5.1.1-1 segfaults

version graph

Package: php5; Maintainer for php5 is (unknown);

Reported by: "Christian Kujau" <evil@g-house.de>

Date: Wed, 11 Jan 2006 20:48:13 UTC

Severity: important

Found in version php5/5.1.1-1

Done: sean finney <seanius@seanius.net>

Bug is archived. No further changes may be made.

Toggle useless messages

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to debian-bugs-dist@lists.debian.org, Debian PHP Maintainers <pkg-php-maint@lists.alioth.debian.org>:
Bug#347642; Package php5. (full text, mbox, link).


Acknowledgement sent to "Christian Kujau" <evil@g-house.de>:
New Bug report received and forwarded. Copy sent to Debian PHP Maintainers <pkg-php-maint@lists.alioth.debian.org>. (full text, mbox, link).


Message #5 received at submit@bugs.debian.org (full text, mbox, reply):

From: "Christian Kujau" <evil@g-house.de>
To: submit@bugs.debian.org
Subject: php5-5.1.1-1 segfaults
Date: Wed, 11 Jan 2006 20:34:45 -0000 (GMT)
Package: php5
Version: 5.1.1-1
Severity: important


when updating to php5.1.1-1 one of the application i used made
apache2-mpm-prefork segfault:

[Wed Jan 11 21:03:56 2006] [notice] child pid 9649 exit signal
Segmentation fault (11)
[Wed Jan 11 21:04:09 2006] [notice] child pid 9696 exit signal
Segmentation fault (11)
[Wed Jan 11 21:04:21 2006] [notice] child pid 9650 exit signal
Segmentation fault (11)

i'm running apache2.0.55-3 and this version was not updated, only php5,
so i supect php5 to be the source of the problem. unfortunately i'm not
very good on debugging php errors.
"error_reporting=E_ALL" is set, but the only "error" i get is a .notice:

[11-Jan-2006 15:18:42] PHP Notice:  Undefined index:  user in
/usr/local/opt/torrentflux/html/functions.php on line 27
[11-Jan-2006 15:18:42] PHP Notice:  Undefined index:  user in
/usr/local/opt/torrentflux/html/functions.php on line 27

that's why i suspected that the new php5 version broke something and i
had to fix the code, but since this is a notice only, i've looked in
the apache2-errorlog and found the segfaults. the application which
triggers the error is "torrentflux" [0], where the index.php triggers
the segfault (prior login).

If if you need further information i'll be happy to provide them.

thank you for your time,
Christian.

[0] http://www.torrentflux.com/

-- System Information:
Debian Release: testing/unstable
  APT prefers unstable
  APT policy: (990, 'unstable'), (500, 'testing')
Architecture: i386 (i686)
Shell:  /bin/sh linked to /bin/bash
Kernel: Linux 2.6.15
Locale: LANG=C, LC_CTYPE=C (charmap=ANSI_X3.4-1968) (ignored: LC_ALL set
to C)

Versions of packages php5 depends on:
ii  libapache2-mod-php5           5.1.1-1    server-side, HTML-embedded
scripti
ii  php5-cgi                      5.1.1-1    server-side, HTML-embedded
scripti
ii  php5-common                   5.1.1-1    Common files for packages
built fr

php5 recommends no packages.

-- no debconf information




Information forwarded to debian-bugs-dist@lists.debian.org, Debian PHP Maintainers <pkg-php-maint@lists.alioth.debian.org>:
Bug#347642; Package php5. (full text, mbox, link).


Acknowledgement sent to Adam Conrad <adconrad@0c3.net>:
Extra info received and forwarded to list. Copy sent to Debian PHP Maintainers <pkg-php-maint@lists.alioth.debian.org>. (full text, mbox, link).


Message #10 received at 347642@bugs.debian.org (full text, mbox, reply):

From: Adam Conrad <adconrad@0c3.net>
To: Christian Kujau <evil@g-house.de>, 347642@bugs.debian.org
Subject: Re: [php-maint] Bug#347642: php5-5.1.1-1 segfaults
Date: Thu, 12 Jan 2006 14:31:31 +1100
Christian Kujau wrote:
> 
> when updating to php5.1.1-1 one of the application i used made
> apache2-mpm-prefork segfault:

If you can get me a GDB backtrace, that would be great:

# apt-get install gdb
# gdb apache2
(gdb) run -X
[ hit the index with a web browser, and wait for gdb to tell you it's
segfaulted ]
(gdb) bt
[copy and paste the output after you asked for a backtrace and send that
back to the bug ]

... Adam



Information forwarded to debian-bugs-dist@lists.debian.org, Debian PHP Maintainers <pkg-php-maint@lists.alioth.debian.org>:
Bug#347642; Package php5. (full text, mbox, link).


Acknowledgement sent to "Christian Kujau" <evil@g-house.de>:
Extra info received and forwarded to list. Copy sent to Debian PHP Maintainers <pkg-php-maint@lists.alioth.debian.org>. (full text, mbox, link).


Message #15 received at 347642@bugs.debian.org (full text, mbox, reply):

From: "Christian Kujau" <evil@g-house.de>
To: 347642@bugs.debian.org
Cc: "Adam Conrad" <adconrad@0c3.net>
Subject: Re: [php-maint] Bug#347642: php5-5.1.1-1 segfaults
Date: Thu, 12 Jan 2006 09:22:40 -0000 (GMT)
On Thu, January 12, 2006 04:31, Adam Conrad wrote:
>
> If you can get me a GDB backtrace, that would be great:

here's the bt, and it seems like libmysqlclient.so.12 is to blame?

root@sheep:~# gdb apache2
GNU gdb 6.4-debian
Copyright 2005 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for details.
This GDB was configured as "i486-linux-gnu"...(no debugging symbols found)
Using host libthread_db library "/lib/tls/libthread_db.so.1".

(gdb) run -X
Starting program: /usr/sbin/apache2 -X
(no debugging symbols found)
(no debugging symbols found)
[.....these messages repeat 20 times or so]

[ now pointing the browser to the index.php....]

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread -1215121184 (LWP 6378)]
0xb79054cf in vio_in_addr () from /usr/lib/libmysqlclient.so.12
(gdb) bt
#0  0xb79054cf in vio_in_addr () from /usr/lib/libmysqlclient.so.12
#1  0xb77bad4a in mysql_real_connect () from /usr/lib/libmysqlclient.so.15
#2  0xb6c9d431 in zif_mysql_field_name () from
/usr/lib/php5/20051025/mysql.so
#3  0xb72030be in execute () from /usr/lib/apache2/modules/libphp5.so
#4  0xb72026d8 in execute () from /usr/lib/apache2/modules/libphp5.so
#5  0xb7202b79 in execute () from /usr/lib/apache2/modules/libphp5.so
#6  0xb72026d8 in execute () from /usr/lib/apache2/modules/libphp5.so
#7  0xb7202b79 in execute () from /usr/lib/apache2/modules/libphp5.so
#8  0xb72026d8 in execute () from /usr/lib/apache2/modules/libphp5.so
#9  0xb7202b79 in execute () from /usr/lib/apache2/modules/libphp5.so
#10 0xb72026d8 in execute () from /usr/lib/apache2/modules/libphp5.so
#11 0xb72089bf in zend_get_zval_ptr () from
/usr/lib/apache2/modules/libphp5.so
#12 0xb72026d8 in execute () from /usr/lib/apache2/modules/libphp5.so
#13 0xb71da17e in zend_execute_scripts () from
/usr/lib/apache2/modules/libphp5.so
#14 0xb7199a8e in php_execute_script () from
/usr/lib/apache2/modules/libphp5.so
#15 0xb7278ea8 in zend_get_zval_ptr () from
/usr/lib/apache2/modules/libphp5.so
#16 0x08077336 in ap_run_handler ()
#17 0x08077732 in ap_invoke_handler ()
#18 0x080696fd in ap_process_request ()
#19 0x08064b19 in _start ()
(gdb)

-- 
make bzImage, not war




Information forwarded to debian-bugs-dist@lists.debian.org, Debian PHP Maintainers <pkg-php-maint@lists.alioth.debian.org>:
Bug#347642; Package php5. (full text, mbox, link).


Acknowledgement sent to Steve Langasek <vorlon@debian.org>:
Extra info received and forwarded to list. Copy sent to Debian PHP Maintainers <pkg-php-maint@lists.alioth.debian.org>. (full text, mbox, link).


Message #20 received at 347642@bugs.debian.org (full text, mbox, reply):

From: Steve Langasek <vorlon@debian.org>
To: Christian Kujau <evil@g-house.de>, 347642@bugs.debian.org
Cc: Adam Conrad <adconrad@0c3.net>
Subject: Re: Bug#347642: [php-maint] Bug#347642: php5-5.1.1-1 segfaults
Date: Thu, 12 Jan 2006 02:02:13 -0800
[Message part 1 (text/plain, inline)]
On Thu, Jan 12, 2006 at 09:22:40AM -0000, Christian Kujau wrote:
> On Thu, January 12, 2006 04:31, Adam Conrad wrote:

> > If you can get me a GDB backtrace, that would be great:

> here's the bt, and it seems like libmysqlclient.so.12 is to blame?

Yes.  More specifically, the fact that you have some apache module installed
that *uses* libmysqlclient12 is to blame.

> Program received signal SIGSEGV, Segmentation fault.
> [Switching to Thread -1215121184 (LWP 6378)]
> 0xb79054cf in vio_in_addr () from /usr/lib/libmysqlclient.so.12
> (gdb) bt
> #0  0xb79054cf in vio_in_addr () from /usr/lib/libmysqlclient.so.12
> #1  0xb77bad4a in mysql_real_connect () from /usr/lib/libmysqlclient.so.15

This shows two incompatible versions of libmysqlclient being loaded into
memory.  Whatever is causing libmysqlclient12 to be loaded is what's causing
your segfault.  Figure out what that is, and upgrade it to a
libmysqlclient15 version.

By all rights, however, the current version of libmysqlclient15 in Debian
shouldn't be subject to such bugs due to its use of versioned symbols.  (It
should still be possible for libmysqlclient12 to call into libmysqlclient15,
but not vice-versa.)  Please confirm which version of libmysqlclient15 you
have installed, as this may warrant a separate bug report.

-- 
Steve Langasek                   Give me a lever long enough and a Free OS
Debian Developer                   to set it on, and I can move the world.
vorlon@debian.org                                   http://www.debian.org/
[signature.asc (application/pgp-signature, inline)]

Information forwarded to debian-bugs-dist@lists.debian.org, Debian PHP Maintainers <pkg-php-maint@lists.alioth.debian.org>:
Bug#347642; Package php5. (full text, mbox, link).


Acknowledgement sent to "Christian Kujau" <evil@g-house.de>:
Extra info received and forwarded to list. Copy sent to Debian PHP Maintainers <pkg-php-maint@lists.alioth.debian.org>. (full text, mbox, link).


Message #25 received at 347642@bugs.debian.org (full text, mbox, reply):

From: "Christian Kujau" <evil@g-house.de>
To: 347642@bugs.debian.org
Cc: vorlon@debian.org, adconrad@0c3.net
Subject: Re: Bug#347642: [php-maint] Bug#347642: php5-5.1.1-1 segfaults
Date: Fri, 13 Jan 2006 08:35:41 -0000 (GMT)
On Thu, January 12, 2006 11:02, Steve Langasek wrote:
> This shows two incompatible versions of libmysqlclient being loaded into
> memory.  Whatever is causing libmysqlclient12 to be loaded is what's
> causing your segfault.  Figure out what that is, and upgrade it to a
> libmysqlclient15 version.

well, it's debian/unstable anyway and several other packages still depend
on libmysqlclient12, so i cannot uninstall it.

> By all rights, however, the current version of libmysqlclient15 in Debian
>  shouldn't be subject to such bugs due to its use of versioned symbols.
> (It
> should still be possible for libmysqlclient12 to call into
> libmysqlclient15, but not vice-versa.)  Please confirm which version of
> libmysqlclient15 you have installed, as this may warrant a separate bug
> report.

ok, i'll do that.

thank you for your assistance,
Christian.

-- 
make bzImage, not war




Information forwarded to debian-bugs-dist@lists.debian.org, Debian PHP Maintainers <pkg-php-maint@lists.alioth.debian.org>:
Bug#347642; Package php5. (full text, mbox, link).


Acknowledgement sent to Steve Langasek <vorlon@debian.org>:
Extra info received and forwarded to list. Copy sent to Debian PHP Maintainers <pkg-php-maint@lists.alioth.debian.org>. (full text, mbox, link).


Message #30 received at 347642@bugs.debian.org (full text, mbox, reply):

From: Steve Langasek <vorlon@debian.org>
To: Christian Kujau <evil@g-house.de>
Cc: 347642@bugs.debian.org, adconrad@0c3.net
Subject: Re: Bug#347642: [php-maint] Bug#347642: php5-5.1.1-1 segfaults
Date: Fri, 13 Jan 2006 00:53:34 -0800
[Message part 1 (text/plain, inline)]
On Fri, Jan 13, 2006 at 08:35:41AM -0000, Christian Kujau wrote:
> On Thu, January 12, 2006 11:02, Steve Langasek wrote:
> > This shows two incompatible versions of libmysqlclient being loaded into
> > memory.  Whatever is causing libmysqlclient12 to be loaded is what's
> > causing your segfault.  Figure out what that is, and upgrade it to a
> > libmysqlclient15 version.

> well, it's debian/unstable anyway and several other packages still depend
> on libmysqlclient12, so i cannot uninstall it.

Then tell us what packages you're using that depend on it, so we can
reassign this bug there.

> > By all rights, however, the current version of libmysqlclient15 in Debian
> >  shouldn't be subject to such bugs due to its use of versioned symbols.
> > (It
> > should still be possible for libmysqlclient12 to call into
> > libmysqlclient15, but not vice-versa.)  Please confirm which version of
> > libmysqlclient15 you have installed, as this may warrant a separate bug
> > report.

> ok, i'll do that.

Uh?  Does this mean I should expect another mail from you soon with this
information?

-- 
Steve Langasek                   Give me a lever long enough and a Free OS
Debian Developer                   to set it on, and I can move the world.
vorlon@debian.org                                   http://www.debian.org/
[signature.asc (application/pgp-signature, inline)]

Information forwarded to debian-bugs-dist@lists.debian.org, Debian PHP Maintainers <pkg-php-maint@lists.alioth.debian.org>:
Bug#347642; Package php5. (full text, mbox, link).


Acknowledgement sent to "Christian Kujau" <evil@g-house.de>:
Extra info received and forwarded to list. Copy sent to Debian PHP Maintainers <pkg-php-maint@lists.alioth.debian.org>. (full text, mbox, link).


Message #35 received at 347642@bugs.debian.org (full text, mbox, reply):

From: "Christian Kujau" <evil@g-house.de>
To: "Steve Langasek" <vorlon@debian.org>
Cc: 347642@bugs.debian.org, adconrad@0c3.net
Subject: Re: Bug#347642: [php-maint] Bug#347642: php5-5.1.1-1 segfaults
Date: Fri, 13 Jan 2006 09:21:45 -0000 (GMT)
On Fri, January 13, 2006 09:53, Steve Langasek wrote:
>> well, it's debian/unstable anyway and several other packages still
>> depend on libmysqlclient12, so i cannot uninstall it.
>
> Then tell us what packages you're using that depend on it, so we can
> reassign this bug there.

these are the packages depending on libmysqlclient12:

root@sheep:~# dpkg -P libmysqlclient12
dpkg: dependency problems prevent removal of libmysqlclient12:
 libmailutils0 depends on libmysqlclient12.
 mailutils depends on libmysqlclient12.
 courier-authmysql depends on libmysqlclient12.
 libpam-mysql depends on libmysqlclient12.
 proftpd-mysql depends on libmysqlclient12.
 proftpd-mysql depends on libmysqlclient12 (>= 4.0.23).
 proftpd-mysql depends on libmysqlclient12.
 proftpd-mysql depends on libmysqlclient12 (>= 4.0.23).
 snort-mysql depends on libmysqlclient12; however:
  Package libmysqlclient12 is to be removed.
 libapache2-mod-auth-mysql depends on libmysqlclient12.
 libdbd-mysql depends on libmysqlclient12.
 libnss-mysql depends on libmysqlclient12.
dpkg: error processing libmysqlclient12 (--purge):
 dependency problems - not removing
Errors were encountered while processing:
 libmysqlclient12

>>> should still be possible for libmysqlclient12 to call into
>>> libmysqlclient15, but not vice-versa.)  Please confirm which version
>>> of libmysqlclient15 you have installed, as this may warrant a separate
>>> bug report.
>
>> ok, i'll do that.
>
> Uh?  Does this mean I should expect another mail from you soon with this
> information?

hm, did i must've misunderstood you, because i really opened another bug
for libmysqlclient15 (for calling libmysqlclient12):

#347878: libmysqlclient15 calls into libmysqlclient12, leading to apache2
segfault

i'm sorry, if this was the wrong thing to do.

thank your for your assistance,
Christian.
-- 
make bzImage, not war




Information forwarded to debian-bugs-dist@lists.debian.org, Debian PHP Maintainers <pkg-php-maint@lists.alioth.debian.org>:
Bug#347642; Package php5. (full text, mbox, link).


Acknowledgement sent to Steve Langasek <vorlon@debian.org>:
Extra info received and forwarded to list. Copy sent to Debian PHP Maintainers <pkg-php-maint@lists.alioth.debian.org>. (full text, mbox, link).


Message #40 received at 347642@bugs.debian.org (full text, mbox, reply):

From: Steve Langasek <vorlon@debian.org>
To: Christian Kujau <evil@g-house.de>
Cc: 347642@bugs.debian.org, adconrad@0c3.net, 347878@bugs.debian.org
Subject: Re: Bug#347642: [php-maint] Bug#347642: php5-5.1.1-1 segfaults
Date: Fri, 13 Jan 2006 01:43:25 -0800
[Message part 1 (text/plain, inline)]
On Fri, Jan 13, 2006 at 09:21:45AM -0000, Christian Kujau wrote:
> On Fri, January 13, 2006 09:53, Steve Langasek wrote:
> >> well, it's debian/unstable anyway and several other packages still
> >> depend on libmysqlclient12, so i cannot uninstall it.

> > Then tell us what packages you're using that depend on it, so we can
> > reassign this bug there.

> these are the packages depending on libmysqlclient12:

> root@sheep:~# dpkg -P libmysqlclient12
> dpkg: dependency problems prevent removal of libmysqlclient12:
>  libmailutils0 depends on libmysqlclient12.
>  mailutils depends on libmysqlclient12.
>  courier-authmysql depends on libmysqlclient12.
>  libpam-mysql depends on libmysqlclient12.
>  proftpd-mysql depends on libmysqlclient12.
>  proftpd-mysql depends on libmysqlclient12 (>= 4.0.23).
>  proftpd-mysql depends on libmysqlclient12.
>  proftpd-mysql depends on libmysqlclient12 (>= 4.0.23).
>  snort-mysql depends on libmysqlclient12; however:
>   Package libmysqlclient12 is to be removed.
>  libapache2-mod-auth-mysql depends on libmysqlclient12.
>  libdbd-mysql depends on libmysqlclient12.
>  libnss-mysql depends on libmysqlclient12.
> dpkg: error processing libmysqlclient12 (--purge):
>  dependency problems - not removing
> Errors were encountered while processing:
>  libmysqlclient12

Oh, quite a few then... we'll just have to wait for this transition to
complete, in that case.

> >>> should still be possible for libmysqlclient12 to call into
> >>> libmysqlclient15, but not vice-versa.)  Please confirm which version
> >>> of libmysqlclient15 you have installed, as this may warrant a separate
> >>> bug report.

> >> ok, i'll do that.

> > Uh?  Does this mean I should expect another mail from you soon with this
> > information?

> hm, did i must've misunderstood you, because i really opened another bug
> for libmysqlclient15 (for calling libmysqlclient12):

> #347878: libmysqlclient15 calls into libmysqlclient12, leading to apache2
> segfault

> i'm sorry, if this was the wrong thing to do.

Well, I meant I wanted you to tell me what version of libmysqlclient15 you
have installed -- but seeing that you do have a current version installed,
filing a bug against libmysqlclient15 was the right thing to do, yes.

Cheers,
-- 
Steve Langasek                   Give me a lever long enough and a Free OS
Debian Developer                   to set it on, and I can move the world.
vorlon@debian.org                                   http://www.debian.org/
[signature.asc (application/pgp-signature, inline)]

Information forwarded to debian-bugs-dist@lists.debian.org, Debian PHP Maintainers <pkg-php-maint@lists.alioth.debian.org>:
Bug#347642; Package php5. (full text, mbox, link).


Acknowledgement sent to Christian Hammers <ch@debian.org>:
Extra info received and forwarded to list. Copy sent to Debian PHP Maintainers <pkg-php-maint@lists.alioth.debian.org>. (full text, mbox, link).


Message #45 received at 347642@bugs.debian.org (full text, mbox, reply):

From: Christian Hammers <ch@debian.org>
To: "Christian Kujau" <evil@g-house.de>, 347878@bugs.debian.org,
Cc: "Adam Conrad" <adconrad@0c3.net>, 347642@bugs.debian.org, vorlon@debian.org, control@bugs.debian.org
Subject: Re: Bug#347878: libmysqlclient15 calls into libmysqlclient12, leading to apache2 segfault
Date: Fri, 13 Jan 2006 22:26:04 +0100
tags 347878 + help unreproducible moreinfo
thanks

Hello

On 2006-01-13 Christian Kujau wrote:
> here's a snippet of the backtrace, which is also
> included here: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=347642
> 
> > Program received signal SIGSEGV, Segmentation fault.
> > [Switching to Thread -1215121184 (LWP 6378)]
> > 0xb79054cf in vio_in_addr () from /usr/lib/libmysqlclient.so.12
> > (gdb) bt
> > #0  0xb79054cf in vio_in_addr () from /usr/lib/libmysqlclient.so.12
> > #1  0xb77bad4a in mysql_real_connect () from /usr/lib/libmysqlclient.so.15
> 
> if you need further information, please let me know.

I've just installed apache2/php5/torrentflux but could not reproduce this
bug. I couldn't figure out how a torrent URL looks like but I could
login and use the menu without errors.

My package versions and md5sums are as follow. Please report yours using
the same commands:

# dpkg -l apache2 apache2-mpm-prefork php5 php5-mysql libmysqlclient12 libmysqlclient15 libpam-mysql libnss-mysql
  ...
  ii  apache2                           2.0.55-3         
  ii  apache2-mpm-prefork               2.0.55-3         
  ii  libmysqlclient12                  4.0.24-10sarge1  
  ii  libmysqlclient15                  5.0.18-1         
  ii  php5                              5.1.1-1          
  ii  php5-mysql                        5.1.1-1          
  pn  libnss-mysql                      <none>


# md5sum /usr/lib/libmysqlclient.so.15.0.0 /usr/lib/libmysqlclient.so.12.0.0 /usr/lib/php5/20051025/mysql.so  /usr/lib/apache2/modules/libphp5.so /usr/sbin/apache2
  1637d1a0bb72bbb7435646c0f27fb8c0  /usr/lib/libmysqlclient.so.15.0.0
  8c9755ed5e668be02c183b000e4debca  /usr/lib/libmysqlclient.so.12.0.0
  2e0f78067e7e5e7b983f495f7e2fe6b9  /usr/lib/php5/20051025/mysql.so
  1aeb275ae4a624c6c2484b05e760695d  /usr/lib/apache2/modules/libphp5.so
  42fdd97f9282560377b0d754fed85c5e  /usr/sbin/apache2

Are you using MySQL for NSS or PAM (/etc/passwd like usertables)?

bye,

-christian-



Information forwarded to debian-bugs-dist@lists.debian.org, Debian PHP Maintainers <pkg-php-maint@lists.alioth.debian.org>:
Bug#347642; Package php5. (full text, mbox, link).


Acknowledgement sent to "Christian Kujau" <evil@g-house.de>:
Extra info received and forwarded to list. Copy sent to Debian PHP Maintainers <pkg-php-maint@lists.alioth.debian.org>. (full text, mbox, link).


Message #50 received at 347642@bugs.debian.org (full text, mbox, reply):

From: "Christian Kujau" <evil@g-house.de>
To: "Christian Hammers" <ch@debian.org>
Cc: 347878@bugs.debian.org, "Adam Conrad" <adconrad@0c3.net>, 347642@bugs.debian.org, vorlon@debian.org
Subject: Re: Bug#347878: libmysqlclient15 calls into libmysqlclient12, leading to apache2 segfault
Date: Sat, 14 Jan 2006 18:27:36 -0000 (GMT)
On Fri, January 13, 2006 22:26, Christian Hammers wrote:
>
> I've just installed apache2/php5/torrentflux but could not reproduce this
>  bug. I couldn't figure out how a torrent URL looks like but I could login
> and use the menu without errors.

no, i could not even login because i was not even presented the login site.
when i reported the error the forst time i just ran updated the system.
for reproducing it today i ran apt-get update/upgrade again and now my
versions are these ones:

libmysqlclient12: Version: 4.0.24-10sarge1
libmysqlclient14: Version: 4.1.15-1
libmysqlclient15: Version: 5.0.18-4
libmysqlclient15-dev: Version: 5.0.18-4

i've rerun apache in gdb and the just pointed the browser to the
.../index.php file of the torrentflux distribution (browser did not show
anything, white page output, no login attempt possible):

(gdb) run -X
Starting program: /usr/sbin/apache2 -X
(no debugging symbols found)
[...]
[Thread debugging using libthread_db enabled]
[New Thread -1214908192 (LWP 12841)]
(no debugging symbols found)
[...]
[Sat Jan 14 19:09:57 2006] [error] (EAI 2)Name or service not known:
Cannot resolve host name ipv6.housecafe.de --- ignoring!
(no debugging symbols found)
---Type <return> to continue, or q <return> to quit---
(no debugging symbols found)
[...]

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread -1214908192 (LWP 12841)]
0xb79394cf in vio_in_addr () from /usr/lib/libmysqlclient.so.12
(gdb)
(gdb) bt
#0  0xb79394cf in vio_in_addr () from /usr/lib/libmysqlclient.so.12
#1  0xb77eed4a in mysql_real_connect () from /usr/lib/libmysqlclient.so.15
#2  0xb6ccd431 in zif_mysql_field_name () from
/usr/lib/php5/20051025/mysql.so
#3  0xb72370be in execute () from /usr/lib/apache2/modules/libphp5.so
#4  0xb72366d8 in execute () from /usr/lib/apache2/modules/libphp5.so
#5  0xb7236b79 in execute () from /usr/lib/apache2/modules/libphp5.so
#6  0xb72366d8 in execute () from /usr/lib/apache2/modules/libphp5.so
#7  0xb7236b79 in execute () from /usr/lib/apache2/modules/libphp5.so
#8  0xb72366d8 in execute () from /usr/lib/apache2/modules/libphp5.so
#9  0xb7236b79 in execute () from /usr/lib/apache2/modules/libphp5.so
#10 0xb72366d8 in execute () from /usr/lib/apache2/modules/libphp5.so
#11 0xb723c9bf in zend_get_zval_ptr () from
/usr/lib/apache2/modules/libphp5.so
#12 0xb72366d8 in execute () from /usr/lib/apache2/modules/libphp5.so
#13 0xb720e17e in zend_execute_scripts () from
/usr/lib/apache2/modules/libphp5.so
#14 0xb71cda8e in php_execute_script () from
/usr/lib/apache2/modules/libphp5.so
#15 0xb72acea8 in zend_get_zval_ptr () from
/usr/lib/apache2/modules/libphp5.so
#16 0x08077336 in ap_run_handler ()
#17 0x08077732 in ap_invoke_handler ()
#18 0x080696fd in ap_process_request ()
#19 0x08064b19 in _start ()

> My package versions and md5sums are as follow. Please report yours using
> the same commands:
>
> # dpkg -l apache2 apache2-mpm-prefork php5 php5-mysql libmysqlclient12
> libmysqlclient15 libpam-mysql libnss-mysql ...
> ii  apache2                        2.0.55-3 ii  apache2-mpm-prefork
> 2.0.55-3
> ii  libmysqlclient12                  4.0.24-10sarge1 ii  libmysqlclient15
> 5.0.18-1
> ii  php5                              5.1.1-1 ii  php5-mysql
> 5.1.1-1
> pn  libnss-mysql                      <none>

pn  apache2                                        <none>
ii  apache2-mpm-prefork                            2.0.55-3
pi  libmysqlclient12                               4.0.24-10sarge1
ii  libmysqlclient15                               5.0.18-4
ii  libnss-mysql                                   1.0-1
ii  libpam-mysql                                   0.5.0-7
ii  php5                                           5.1.1-1
ii  php5-mysql                                     5.1.1-1

(since today my libmysqlclient15 is even newer :))


>
> # md5sum /usr/lib/libmysqlclient.so.15.0.0
> /usr/lib/libmysqlclient.so.12.0.0 /usr/lib/php5/20051025/mysql.so
> /usr/lib/apache2/modules/libphp5.so /usr/sbin/apache2
> 1637d1a0bb72bbb7435646c0f27fb8c0  /usr/lib/libmysqlclient.so.15.0.0
> 8c9755ed5e668be02c183b000e4debca  /usr/lib/libmysqlclient.so.12.0.0
> 2e0f78067e7e5e7b983f495f7e2fe6b9  /usr/lib/php5/20051025/mysql.so
> 1aeb275ae4a624c6c2484b05e760695d  /usr/lib/apache2/modules/libphp5.so
> 42fdd97f9282560377b0d754fed85c5e  /usr/sbin/apache2

915d718470733b6755070f6b73630b72  /usr/lib/libmysqlclient.so.15.0.0
8c9755ed5e668be02c183b000e4debca  /usr/lib/libmysqlclient.so.12.0.0
2e0f78067e7e5e7b983f495f7e2fe6b9  /usr/lib/php5/20051025/mysql.so
1aeb275ae4a624c6c2484b05e760695d  /usr/lib/apache2/modules/libphp5.so
42fdd97f9282560377b0d754fed85c5e  /usr/sbin/apache2

except for the newer libmysqlclient.so.15.0.0 all checksums look like yours.

> Are you using MySQL for NSS or PAM (/etc/passwd like usertables)?

i've installed libnss/pam-mysql, but did not touch nsswitch.conf yet. so
no, i'm not using mysql for nss/pam.

thank you for your assistance,
Christian.
-- 
make bzImage, not war




Information forwarded to debian-bugs-dist@lists.debian.org, Debian PHP Maintainers <pkg-php-maint@lists.alioth.debian.org>:
Bug#347642; Package php5. (full text, mbox, link).


Acknowledgement sent to "Christian Kujau" <evil@g-house.de>:
Extra info received and forwarded to list. Copy sent to Debian PHP Maintainers <pkg-php-maint@lists.alioth.debian.org>. (full text, mbox, link).


Message #55 received at 347642@bugs.debian.org (full text, mbox, reply):

From: "Christian Kujau" <evil@g-house.de>
To: "Christian Hammers" <ch@debian.org>
Cc: 347878@bugs.debian.org, "Adam Conrad" <adconrad@0c3.net>, 347642@bugs.debian.org, vorlon@debian.org
Subject: Re: Bug#347878: libmysqlclient15 calls into libmysqlclient12, leading to apache2 segfault
Date: Sat, 14 Jan 2006 20:02:39 -0000 (GMT)
hi all[0]

i've debugged the issue a bit further and it seems that not apache2 nor
libmysqlclient15 is to blame, but libmysqlclient12 :)

normally i have apache2 started and both libaries are used:

root@sheep:~# <insert "lsof" and "grep" magic here>
apache2 /usr/lib/libmysqlclient.so.12.0.0
apache2 /usr/lib/libmysqlclient.so.15.0.0

libmysqlclient.so.12 is loaded, because i'm using mod_auth_mysql too and
its module is linked against libmysqlclient.so.12:

% ldd /usr/lib/apache2/modules/mod_auth_mysql.so
        linux-gate.so.1 =>  (0xffffe000)
        libmysqlclient.so.12 => /usr/lib/libmysqlclient.so.12 (0xb7f65000)
        libc.so.6 => /lib/tls/libc.so.6 (0xb7e2e000)
        libz.so.1 => /usr/lib/libz.so.1 (0xb7e1a000)
        libcrypt.so.1 => /lib/tls/libcrypt.so.1 (0xb7dec000)
        libnsl.so.1 => /lib/tls/libnsl.so.1 (0xb7dd6000)
        libm.so.6 => /lib/tls/libm.so.6 (0xb7db0000)
        /lib/ld-linux.so.2 (0x80000000)

so when i disable mod_auth_mysql (from debian's
libapache2-mod-auth-mysql), apache2 won't segfault.

my question is now: why does libmysqlclient.so.15 call
libmysqlclient.so.12 at all? (as shown in the backtrace). because
mod_auth_mysql works as expected: when accessing protected directories
(username/passw prompt). the directory of the torrentflux installation is
not even protected by mod-auth-mysql. and: should i set up another
bugreport for libmysqlclient12? (i doubt that, though)

i could provide shell access to my box if someone wants to play around a
bit...

thank you for your time,
Christian.

[0] if i should remove someone from the Cc next time, pls tell me so in
    private, so we don't spam the bugreport.

-- 
make bzImage, not war




Information forwarded to debian-bugs-dist@lists.debian.org, Debian PHP Maintainers <pkg-php-maint@lists.alioth.debian.org>:
Bug#347642; Package php5. (full text, mbox, link).


Acknowledgement sent to Christian Hammers <ch@debian.org>:
Extra info received and forwarded to list. Copy sent to Debian PHP Maintainers <pkg-php-maint@lists.alioth.debian.org>. (full text, mbox, link).


Message #60 received at 347642@bugs.debian.org (full text, mbox, reply):

From: Christian Hammers <ch@debian.org>
To: "Christian Kujau" <evil@g-house.de>, 347878@bugs.debian.org
Cc: 347878@bugs.debian.org, "Adam Conrad" <adconrad@0c3.net>, 347642@bugs.debian.org, vorlon@debian.org
Subject: Re: Bug#347878: libmysqlclient15 calls into libmysqlclient12, leading to apache2 segfault
Date: Tue, 17 Jan 2006 21:11:27 +0100
Hello

On 2006-01-14 Christian Kujau wrote:
> > I've just installed apache2/php5/torrentflux but could not reproduce this
> >  bug. I couldn't figure out how a torrent URL looks like but I could login
> > and use the menu without errors.
> 
> no, i could not even login because i was not even presented the login site.

Your md5sums and versions look but I still can't reproduce it.
I enabled "Auth_MySQL On" in the config, visible in /server-info and verified
that both shared libraries are loaded:

$ ps ax|grep apache
	15542 ?        Ss     0:00 /usr/sbin/apache2 -k start -DSSL
	15543 ?        S      0:00 /usr/sbin/apache2 -k start -DSSL
	15547 ?        S      0:00 /usr/sbin/apache2 -k start -DSSL
	15548 ?        S      0:00 /usr/sbin/apache2 -k start -DSSL
	15549 ?        S      0:00 /usr/sbin/apache2 -k start -DSSL
	15550 ?        S      0:00 /usr/sbin/apache2 -k start -DSSL
	15553 ?        S      0:00 /usr/sbin/apache2 -k start -DSSL
	15703 pts/0    R+     0:00 grep apache

$ grep mysql /proc/15550/maps 
	5556d000-55572000 r-xp 00000000 fe:00 556047 /usr/lib/apache2/modules/mod_auth_mysql.so
	55572000-55573000 rwxp 00005000 fe:00 556047 /usr/lib/apache2/modules/mod_auth_mysql.so
	55b6b000-55b90000 r-xp 00000000 fe:00 529963 /usr/lib/libmysqlclient.so.12.0.0
	55b90000-55ba7000 rwxp 00025000 fe:00 529963 /usr/lib/libmysqlclient.so.12.0.0
	56077000-56082000 r-xp 00000000 fe:00 1297279 /usr/lib/php5/20051025/mysql.so
	56082000-56083000 rwxp 0000a000 fe:00 1297279 /usr/lib/php5/20051025/mysql.so
	56293000-562d7000 r-xp 00000000 fe:00 531358 /usr/lib/libmysqlclient.so.15.0.0
	562d7000-563ce000 rwxp 00043000 fe:00 531358 /usr/lib/libmysqlclient.so.15.0.0

$ lynx -dump http://localhost/torrentflux/html/index.php

   TorrentFlux Login

   Username: _______________
    Password: _______________
            Login

Maybe you really send me your /etc/apache2 directory as a tarball or give
me SSH login to your host.

bye,

-christian-




Information forwarded to debian-bugs-dist@lists.debian.org, Debian PHP Maintainers <pkg-php-maint@lists.alioth.debian.org>:
Bug#347642; Package php5. (full text, mbox, link).


Acknowledgement sent to Pekka Järvinen <pekkajarvinen@kolumbus.fi>:
Extra info received and forwarded to list. Copy sent to Debian PHP Maintainers <pkg-php-maint@lists.alioth.debian.org>. (full text, mbox, link).


Message #65 received at 347642@bugs.debian.org (full text, mbox, reply):

From: Pekka Järvinen <pekkajarvinen@kolumbus.fi>
To: 347642@bugs.debian.org
Subject: php5-5.1.1-1 segfaults
Date: Fri, 20 Jan 2006 19:29:39 +0200
See also http://bugs.php.net/bug.php?id=36105



Reply sent to sean finney <seanius@seanius.net>:
You have taken responsibility. (full text, mbox, link).


Notification sent to "Christian Kujau" <evil@g-house.de>:
Bug acknowledged by developer. (full text, mbox, link).


Message #70 received at 347642-done@bugs.debian.org (full text, mbox, reply):

From: sean finney <seanius@seanius.net>
To: 347642-done@bugs.debian.org
Subject: libmysqlclient12 removed from testing/unstable
Date: Tue, 19 Sep 2006 09:09:33 +0200
[Message part 1 (text/plain, inline)]
hi there,

since the offending package in this bug report is libmysqlclient12, and
this package has been removed from the archive (we now only have
libmysqlclient 14 (4.1) and 15 (5.x)), i'm closing this bug report.
[signature.asc (application/pgp-signature, inline)]

Bug archived. Request was from Debbugs Internal Request <owner@bugs.debian.org> to internal_control@bugs.debian.org. (Mon, 18 Jun 2007 04:11:45 GMT) (full text, mbox, link).


Send a report that this bug log contains spam.


Debian bug tracking system administrator <owner@bugs.debian.org>. Last modified: Sun Jul 2 01:15:32 2023; Machine Name: bembo

Debian Bug tracking system

Debbugs is free software and licensed under the terms of the GNU Public License version 2. The current version can be obtained from https://bugs.debian.org/debbugs-source/.

Copyright © 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson, 2005-2017 Don Armstrong, and many other contributors.