php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #53157 Core dump in _php_pgsql_notice_ptr_dtor
Submitted: 2010-10-25 22:11 UTC Modified: 2010-10-25 22:14 UTC
From: php at maxnet dot eu Assigned:
Status: Duplicate Package: PostgreSQL related
PHP Version: 5.2.14 OS: FreeBSD
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 you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: php at maxnet dot eu
New email:
PHP Version: OS:

 

 [2010-10-25 22:11 UTC] php at maxnet dot eu
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) 


Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2010-10-25 22:14 UTC] felipe@php.net
-Status: Open +Status: Duplicate
 [2010-10-25 22:14 UTC] felipe@php.net
Duplicated of bug #52389

Thanks.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sun Dec 22 02:01:28 2024 UTC