From: Operating system: FreeBSD PHP version: 5.2.14 Package: PostgreSQL related Bug Type: Bug Bug description:Core dump in _php_pgsql_notice_ptr_dtor
Description: ------------ On a high-traffic website PHP dumps core 1 to 2 times a day. == Oct 24 09:32:39 www3 kernel: pid 92149 (php), uid 80: exited on signal 10 (core dumped) Oct 24 11:00:04 www3 kernel: pid 1285 (php), uid 80: exited on signal 6 (core dumped) Oct 25 19:27:37 www3 kernel: pid 27511 (php), uid 80: exited on signal 11 (core dumped) == The website uses normal pg_query() to do a lot of read-only queries, as well as pg_send_query() for asynchronous updates. Perhaps the last is causing problems sporadically in pgsql's cleanup routine? PostgreSQL client libraries are version 9.0.1, but seen same issues with 8.4 Test script: --------------- Not easy to reproduce. Actual result: -------------- www3# gdb /usr/local/bin/php php.core GNU gdb 6.1.1 [FreeBSD] Copyright 2004 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 "amd64-marcel-freebsd"... Core was generated by `php'. Program terminated with signal 11, Segmentation fault. Reading symbols from /lib/libcrypt.so.3...done. Loaded symbols for /lib/libcrypt.so.3 Reading symbols from /lib/libz.so.3...done. Loaded symbols for /lib/libz.so.3 Reading symbols from /usr/local/pgsql/lib/libpq.so.5...done. Loaded symbols for /usr/local/pgsql/lib/libpq.so.5 Reading symbols from /lib/libm.so.4...done. Loaded symbols for /lib/libm.so.4 Reading symbols from /usr/local/lib/libxml2.so.5...done. Loaded symbols for /usr/local/lib/libxml2.so.5 Reading symbols from /usr/local/lib/libiconv.so.3...done. Loaded symbols for /usr/local/lib/libiconv.so.3 Reading symbols from /lib/libc.so.6...done. Loaded symbols for /lib/libc.so.6 Reading symbols from /lib/libpthread.so.2...done. Loaded symbols for /lib/libpthread.so.2 Reading symbols from /libexec/ld-elf.so.1...done. Loaded symbols for /libexec/ld-elf.so.1 #0 _zend_mm_free_int (heap=0x870000, p=0x69) at /usr/home/max/tmp/php- 5.2.14/Zend/zend_alloc.c:1948 1948 size = ZEND_MM_BLOCK_SIZE(mm_block); [New LWP 100171] (gdb) bt #0 _zend_mm_free_int (heap=0x870000, p=0x69) at /usr/home/max/tmp/php- 5.2.14/Zend/zend_alloc.c:1948 #1 0x00000000004a6371 in _php_pgsql_notice_ptr_dtor (ptr=0x870000) at /usr/home/max/tmp/php-5.2.14/ext/pgsql/pgsql.c:379 #2 0x00000000005b1ee2 in zend_hash_clean (ht=0x85b848) at /usr/home/max/tmp/php-5.2.14/Zend/zend_hash.c:552 #3 0x00000000004a6a90 in zm_deactivate_pgsql (type=8847360, module_number=105) at /usr/home/max/tmp/php-5.2.14/ext/pgsql/pgsql.c:578 #4 0x00000000005ab973 in module_registry_cleanup (module=0x870000) at /usr/home/max/tmp/php-5.2.14/Zend/zend_API.c:1976 #5 0x00000000005b23b3 in zend_hash_reverse_apply (ht=0x85fb80, apply_func=0x5ab950 <module_registry_cleanup>) at /usr/home/max/tmp/php-5.2.14/Zend/zend_hash.c:755 #6 0x00000000005a6650 in zend_deactivate_modules () at /usr/home/max/tmp/php- 5.2.14/Zend/zend.c:838 #7 0x0000000000565d4b in php_request_shutdown (dummy=0x870000) at /usr/home/max/tmp/php-5.2.14/main/main.c:1478 #8 0x00000000006346d3 in main (argc=1, argv=0x7fffffffedc8) at /usr/home/max/tmp/php-5.2.14/sapi/cgi/cgi_main.c:2062 (gdb) -- Edit bug report at http://bugs.php.net/bug.php?id=53157&edit=1 -- Try a snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=53157&r=trysnapshot52 Try a snapshot (PHP 5.3): http://bugs.php.net/fix.php?id=53157&r=trysnapshot53 Try a snapshot (trunk): http://bugs.php.net/fix.php?id=53157&r=trysnapshottrunk Fixed in SVN: http://bugs.php.net/fix.php?id=53157&r=fixed Fixed in SVN and need be documented: http://bugs.php.net/fix.php?id=53157&r=needdocs Fixed in release: http://bugs.php.net/fix.php?id=53157&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=53157&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=53157&r=needscript Try newer version: http://bugs.php.net/fix.php?id=53157&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=53157&r=support Expected behavior: http://bugs.php.net/fix.php?id=53157&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=53157&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=53157&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=53157&r=globals PHP 4 support discontinued: http://bugs.php.net/fix.php?id=53157&r=php4 Daylight Savings: http://bugs.php.net/fix.php?id=53157&r=dst IIS Stability: http://bugs.php.net/fix.php?id=53157&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=53157&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=53157&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=53157&r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=53157&r=mysqlcfg