|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
|
Thank you for your help!
If the status of the bug report you submitted changes, you will be notified.
You may return here and check the status or update your report at any time. The URL for your bug report is: https://bugs.php.net/bug.php?id=32751.
[2005-04-18 21:49 UTC] prism at pld-linux dot org
Description: ------------ Zend engine or all modules which use persistent_list. persistent_list is destroyed after modules are unloaded. But some modules register own destructors for elements put on persistent_list. When Zend destroys such entry from persistent_list, it tries to call destructor from unloaded module and segfaults. Reproduce code: --------------- Look here: http://comments.gmane.org/gmane.linux.pld.devel.english/785 and start reading from post written at 16 Apr 17:33 by Michal Lukaszek, and below from that. Expected result: ---------------- No segfault. Actual result: -------------- > (gdb) bt > #0 0xb78a6978 in ?? () > #1 0xb7f557da in plist_entry_destructor (ptr=0x81e11b8) > at /home/comp/rpm/BUILD/php-5.0.4/Zend/zend_list.c:204 > #2 0xb7f5385f in zend_hash_apply_deleter (ht=0x8052c50, p=0x81ec1a0) > at /home/comp/rpm/BUILD/php-5.0.4/Zend/zend_hash.c:574 > #3 0xb7f53ab0 in zend_hash_graceful_reverse_destroy (ht=0x8052c50) > at /home/comp/rpm/BUILD/php-5.0.4/Zend/zend_hash.c:640 > #4 0xb7f558f6 in zend_destroy_rsrc_list (ht=0x8052c50, tsrm_ls=0x804f0a0) > at /home/comp/rpm/BUILD/php-5.0.4/Zend/zend_list.c:234 > #5 0xb7f49c20 in zend_shutdown (tsrm_ls=0x804f0a0) > at /home/comp/rpm/BUILD/php-5.0.4/Zend/zend.c:714 > #6 0xb7ef42d5 in php_module_shutdown (tsrm_ls=0x804f0a0) > at /home/comp/rpm/BUILD/php-5.0.4/main/main.c:1518 > #7 0x0804be1e in main (argc=2, argv=0xbffff174) > at /home/comp/rpm/BUILD/php-5.0.4/sapi/cli/php_cli.c:1055 > (gdb) f 1 > #1 0xb7f557da in plist_entry_destructor (ptr=0x81e11b8) > at /home/comp/rpm/BUILD/php-5.0.4/Zend/zend_list.c:204 > 204 ld->plist_dtor_ex(le TSRMLS_CC); > (gdb) p ld->plist_dtor_ex > $1 = 0xb78a6978 > (gdb) x ld->plist_dtor_ex > 0xb78a6978: Cannot access memory at address 0xb78a6978 it's in (unloaded) php-mysql module > The list here is "persistent_list", which is used by php-mysql for > persistent connection - so it's probably bug in php-mysql module or php > engine itself. PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Wed Oct 29 04:00:01 2025 UTC |
Using this code, from the url you posted: <?php $link = mysql_pconnect('localhost', 'aaa', 'bbb'); mysql_select_db('ccc', $link); if($link) mysql_close($link); echo 'I am still alive'; ?> And I can not reproduce this. Not with PHP 4.3.12-dev, PHP 5.1-dev..and I have glibc 2.3.4 (FC2) What is the configure line you are using with PHP?Successful reproduction. Running through the CLI, the following works fine: <?php $conn = pg_connect('dbname=lod user=lod'); ?> the following will segfault on termination: <?php $conn = pg_pconnect('dbname=lod user=lod'); ?> Running Debian Sarge. libc-2.3.2 Fresh cvs version of PHP php -v: PHP 5.1.0-dev (cli) (built: Jul 6 2005 10:55:39) Copyright (c) 1997-2005 The PHP Group Zend Engine v2.1.0-dev, Copyright (c) 1998-2004 Zend Technologies stack trace: #0 0xb7c4d900 in ?? () #1 0x0816af31 in plist_entry_destructor (ptr=0x8337578) at /home/lod/Downloads/php-cvs/Zend/zend_list.c:210 #2 0x081699d8 in zend_hash_apply_deleter (ht=0x826cd18, p=0x833d260) at /home/lod/Downloads/php-cvs/Zend/zend_hash.c:574 #3 0x08169a7c in zend_hash_graceful_reverse_destroy (ht=0x826cd18) at /home/lod/Downloads/php-cvs/Zend/zend_hash.c:640 #4 0x08161bef in zend_shutdown (tsrm_ls=0x0) at /home/lod/Downloads/php-cvs/Zend/zend.c:713 #5 0x081229fe in php_module_shutdown (tsrm_ls=0x8268018) at /home/lod/Downloads/php-cvs/main/main.c:1558 #6 0x081dc959 in main (argc=1, argv=0xbffffba4) at /home/lod/Downloads/php-cvs/sapi/cli/php_cli.c:1148