php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #58012 PDO_MySQL segfault (with full gdb backtrace!)
Submitted: 2008-01-17 20:18 UTC Modified: 2008-07-03 08:51 UTC
From: sylvain at sylvainzimmer dot com Assigned:
Status: Not a bug Package: PDO_MYSQL (PECL)
PHP Version: 5.2.1 OS: Linux
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If this is not your bug, you can add a comment by following this link.
If this is your bug, but you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: sylvain at sylvainzimmer dot com
New email:
PHP Version: OS:

 

 [2008-01-17 20:18 UTC] sylvain at sylvainzimmer dot com
Description:
------------
We're having this segfault in all our production servers :

root@lando:~#  gdb /usr/local/jamendo/apache/bin/httpd /var/log/japache/dump/core
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/i686/cmov/libthread_db.so.1".

(no debugging symbols found)
Core was generated by `/usr/local/jamendo/apache/bin/httpd -k start'.
Program terminated with signal 11, Segmentation fault.

warning: Can't read pathname for load map: Input/output error.
Reading symbols from /lib/tls/i686/cmov/libm.so.6...(no debugging symbols found)...done.
Loaded symbols for /lib/tls/i686/cmov/libm.so.6
Reading symbols from /home/kbmaz/makepizzadebs/japache-2.2.6/debian/japache/usr/local/jamendo/apache/lib/libaprutil-1.so.0...(no debugging symbols found)...done.
Loaded symbols for /home/kbmaz/makepizzadebs/japache-2.2.6/debian/japache/usr/local/jamendo/apache/lib/libaprutil-1.so.0
Reading symbols from /usr/lib/libexpat.so.1...(no debugging symbols found)...done.
Loaded symbols for /usr/lib/libexpat.so.1
Reading symbols from /home/kbmaz/makepizzadebs/japache-2.2.6/debian/japache/usr/local/jamendo/apache/lib/libapr-1.so.0...(no debugging symbols found)...done.
Loaded symbols for /home/kbmaz/makepizzadebs/japache-2.2.6/debian/japache/usr/local/jamendo/apache/lib/libapr-1.so.0
Reading symbols from /lib/tls/i686/cmov/librt.so.1...
(no debugging symbols found)...done.
Loaded symbols for /lib/tls/i686/cmov/librt.so.1
Reading symbols from /lib/tls/i686/cmov/libcrypt.so.1...(no debugging symbols found)...done.
Loaded symbols for /lib/tls/i686/cmov/libcrypt.so.1
Reading symbols from /lib/tls/i686/cmov/libpthread.so.0...(no debugging symbols found)...done.
Loaded symbols for /lib/tls/i686/cmov/libpthread.so.0
Reading symbols from /lib/tls/i686/cmov/libdl.so.2...(no debugging symbols found)...done.
Loaded symbols for /lib/tls/i686/cmov/libdl.so.2
Reading symbols from /lib/tls/i686/cmov/libc.so.6...
(no debugging symbols found)...done.
Loaded symbols for /lib/tls/i686/cmov/libc.so.6
Reading symbols from /lib/ld-linux.so.2...(no debugging symbols found)...done.
Loaded symbols for /lib/ld-linux.so.2
Reading symbols from /lib/tls/i686/cmov/libnsl.so.1...(no debugging symbols found)...done.
Loaded symbols for /lib/tls/i686/cmov/libnsl.so.1
Reading symbols from /lib/tls/i686/cmov/libnss_compat.so.2...(no debugging symbols found)...done.
Loaded symbols for /lib/tls/i686/cmov/libnss_compat.so.2
Reading symbols from /lib/tls/i686/cmov/libnss_nis.so.2...
(no debugging symbols found)...done.
Loaded symbols for /lib/tls/i686/cmov/libnss_nis.so.2
Reading symbols from /lib/tls/i686/cmov/libnss_files.so.2...(no debugging symbols found)...done.
Loaded symbols for /lib/tls/i686/cmov/libnss_files.so.2
Reading symbols from /usr/local/jamendo/apache/modules/libphp5.so...(no debugging symbols found)...done.
Loaded symbols for /usr/local/jamendo/apache/modules/libphp5.so
Reading symbols from /usr/lib/libmysqlclient.so.15...(no debugging symbols found)...done.
Loaded symbols for /usr/lib/libmysqlclient.so.15
Reading symbols from /usr/lib/libfreetype.so.6...
(no debugging symbols found)...done.
Loaded symbols for /usr/lib/libfreetype.so.6
Reading symbols from /usr/lib/libpng12.so.0...(no debugging symbols found)...done.
Loaded symbols for /usr/lib/libpng12.so.0
Reading symbols from /usr/lib/libz.so.1...(no debugging symbols found)...done.
Loaded symbols for /usr/lib/libz.so.1
Reading symbols from /usr/lib/libjpeg.so.62...(no debugging symbols found)...done.
Loaded symbols for /usr/lib/libjpeg.so.62
Reading symbols from /lib/tls/i686/cmov/libresolv.so.2...
(no debugging symbols found)...done.
Loaded symbols for /lib/tls/i686/cmov/libresolv.so.2
Reading symbols from /usr/lib/i686/cmov/libssl.so.0.9.8...(no debugging symbols found)...done.
Loaded symbols for /usr/lib/i686/cmov/libssl.so.0.9.8
Reading symbols from /usr/lib/i686/cmov/libcrypto.so.0.9.8...(no debugging symbols found)...done.
Loaded symbols for /usr/lib/i686/cmov/libcrypto.so.0.9.8
Reading symbols from /usr/lib/libcurl.so.3...(no debugging symbols found)...done.
Loaded symbols for /usr/lib/libcurl.so.3
Reading symbols from /usr/lib/libgssapi_krb5.so.2...
(no debugging symbols found)...done.
Loaded symbols for /usr/lib/libgssapi_krb5.so.2
Reading symbols from /usr/lib/libkrb5.so.3...(no debugging symbols found)...done.
Loaded symbols for /usr/lib/libkrb5.so.3
Reading symbols from /usr/lib/libk5crypto.so.3...(no debugging symbols found)...done.
Loaded symbols for /usr/lib/libk5crypto.so.3
Reading symbols from /usr/lib/libkrb5support.so.0...(no debugging symbols found)...done.
Loaded symbols for /usr/lib/libkrb5support.so.0
Reading symbols from /lib/libcom_err.so.2...
(no debugging symbols found)...done.
Loaded symbols for /lib/libcom_err.so.2
Reading symbols from /usr/lib/libidn.so.11...(no debugging symbols found)...done.
Loaded symbols for /usr/lib/libidn.so.11
Reading symbols from /usr/lib/libxml2.so.2...(no debugging symbols found)...done.
Loaded symbols for /usr/lib/libxml2.so.2
Reading symbols from /usr/local/jamendo/php/lib/php/extensions/no-debug-non-zts-20060613/memcache.so...done.
Loaded symbols for /usr/local/jamendo/php/lib/php/extensions/no-debug-non-zts-20060613/memcache.so
Reading symbols from /usr/local/jamendo/php/lib/php/extensions/no-debug-non-zts-20060613/apc.so...done.
Loaded symbols for /usr/local/jamendo/php/lib/php/extensions/no-debug-non-zts-20060613/apc.so
Reading symbols from /usr/local/jamendo/php/lib/php/extensions/no-debug-non-zts-20060613/geoip.so...done.
Loaded symbols for /usr/local/jamendo/php/lib/php/extensions/no-debug-non-zts-20060613/geoip.so
Reading symbols from /usr/local/lib/libGeoIP.so.1...done.
Loaded symbols for /usr/local/lib/libGeoIP.so.1
Reading symbols from /usr/local/jamendo/php/lib/php/extensions/no-debug-non-zts-20060613/pdo.so...done.
Loaded symbols for /usr/local/jamendo/php/lib/php/extensions/no-debug-non-zts-20060613/pdo.so
Reading symbols from /usr/local/jamendo/php/lib/php/extensions/no-debug-non-zts-20060613/pdo_mysql.so...done.
Loaded symbols for /usr/local/jamendo/php/lib/php/extensions/no-debug-non-zts-20060613/pdo_mysql.so
#0  0xb7675956 in mysql_more_results ()
   from /usr/lib/libmysqlclient.so.15
(gdb) bt full
#0  0xb7675956 in mysql_more_results () from /usr/lib/libmysqlclient.so.15
No symbol table info available.
#1  0xb7184600 in pdo_mysql_stmt_dtor (stmt=0xaefb9934) at /tmp/pear/cache/PDO_MYSQL-1.0.2/mysql_statement.c:71
        i = -1359326072
        S = (pdo_mysql_stmt *) 0xaefa6560
#2  0xb71911e1 in free_statement (stmt=0xaefb9934) at /tmp/pear/cache/PDO-1.0.3/pdo_stmt.c:2200
No locals.
#3  0xb71912e1 in pdo_dbstmt_free_storage (stmt=0x29) at /tmp/pear/cache/PDO-1.0.3/pdo_stmt.c:2245
No locals.
#4  0xb7a22f71 in zend_objects_store_free_object_storage () from /usr/local/jamendo/apache/modules/libphp5.so
No symbol table info available.
#5  0xb7cc06f4 in ?? () from /usr/local/jamendo/apache/modules/libphp5.so
No symbol table info available.
#6  0xb7cfb9a0 in executor_globals () from /usr/local/jamendo/apache/modules/libphp5.so
No symbol table info available.
#7  0xb7cfbb48 in executor_globals () from /usr/local/jamendo/apache/modules/libphp5.so
No symbol table info available.
#8  0x0814fe70 in ?? ()
No symbol table info available.
#9  0xb79f7916 in shutdown_executor () from /usr/local/jamendo/apache/modules/libphp5.so
No symbol table info available.
#10 0x00000000 in ?? ()
No symbol table info available.
(gdb) 


Thanks for any help!


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2008-01-17 21:22 UTC] sylvain at sylvainzimmer dot com
The segfault is actually quite easily reproductible :

	function query($query,$params=null) {
		try {
		
			list($stmt,$ret)=$this->_prepareAndExecute($query,$params);
			return $stmt;
			
		} catch (PDOException $e) {
			return $e;
		}
	}

function segfault() {
 $q = query("UPDATE whatever");
}

segfault();
 [2008-01-17 21:24 UTC] sylvain at sylvainzimmer dot com
(sorry for missing function)
list($stmt,$ret)=$this->_prepareAndExecute($query,$params);
=>
$stmt = $this->pdo->prepare($query);
$ret = $stmt->execute($params);
 [2008-07-03 08:51 UTC] johannes at schlueters dot de
PDO_MYSQL-1.0.2 is the last independent release, please check with a version bundled in PHP's distribution not this stand alone module.
 
PHP Copyright © 2001-2019 The PHP Group
All rights reserved.
Last updated: Fri Dec 06 06:01:23 2019 UTC