ID: 43199 Updated by: paj...@php.net Reported By: eugene dot pikalov at gmail dot com -Status: No Feedback +Status: Feedback Bug Type: PDO related Operating System: Linux Fedora 2.6.22.5-76.fc7 PHP Version: 5.2.4 New Comment:
Please try using this snapshot: http://snaps.php.net/php5.2-latest.tar.gz For Windows: http://windows.php.net/snapshots/ Or at least with 5.2.13RC Previous Comments: ------------------------------------------------------------------------ [2010-02-16 14:29:19] geniusweb dot llc at gmail dot com This bug affects me in exactly the same way. A lightly loaded server running this for about 12 hours ends up with hundreds of apache2 almost-zombies that need kill -9 treatment, and frequent page mis-loads. Thanks to the person who suggested that it's persistence related, I've disabled that and Here's my backtrace: [New process 29052] #0 0xb7586bf1 in ?? () from /usr/lib/apache2/modules/libphp5.so (gdb) bt #0 0xb7586bf1 in ?? () from /usr/lib/apache2/modules/libphp5.so #1 0xb74c0c2f in sapi_getenv () from /usr/lib/apache2/modules/libphp5.so #2 0xb74cc760 in ?? () from /usr/lib/apache2/modules/libphp5.so #3 0xb74e51f8 in ?? () from /usr/lib/apache2/modules/libphp5.so #4 0xb64e41d7 in ?? () from /usr/lib/php5/20060613+lfs/pdo.so #5 0xb64e4285 in php_pdo_pdbh_dtor () from /usr/lib/php5/20060613+lfs/pdo.so #6 0xb750fc23 in plist_entry_destructor () from /usr/lib/apache2/modules/libphp5.so #7 0xb750ca15 in ?? () from /usr/lib/apache2/modules/libphp5.so #8 0xb750cca7 in zend_hash_graceful_reverse_destroy () from /usr/lib/apache2/modules/libphp5.so #9 0xb750fb0d in zend_destroy_rsrc_list () from /usr/lib/apache2/modules/libphp5.so #10 0xb750212e in zend_shutdown () from /usr/lib/apache2/modules/libphp5.so #11 0xb74b7b65 in php_module_shutdown () from /usr/lib/apache2/modules/libphp5.so #12 0xb74b7c37 in php_module_shutdown_wrapper () from /usr/lib/apache2/modules/libphp5.so #13 0xb7586831 in ?? () from /usr/lib/apache2/modules/libphp5.so #14 0xb7f10f7d in ?? () from /usr/lib/libapr-1.so.0 #15 0xb7f1172d in apr_pool_destroy () from /usr/lib/libapr-1.so.0 #16 0x0808dfb4 in ?? () #17 0x0808e502 in ?? () #18 0x0808e707 in ?? () #19 0x0808f0f7 in ap_mpm_run () #20 0x08066dd5 in main () ------------------------------------------------------------------------ [2008-09-03 23:32:43] tikitiki at mybboard dot com We btw, aren't using PDO so I don't think that is the direct cause. ------------------------------------------------------------------------ [2008-09-03 23:31:03] tikitiki at mybboard dot com Hello, I help run a site (http://ncaabbs.com/) which has recently been experiencing the same thing - It's reproducible in PHP 5.2.6 (that's what we're running right now) # cat /var/log/apache2/error_log | grep Segmentation [Wed Sep 03 17:32:50 2008] [notice] child pid 25431 exit signal Segmentation fault (11) [Wed Sep 03 17:32:53 2008] [notice] child pid 26658 exit signal Segmentation fault (11) [Wed Sep 03 17:32:53 2008] [notice] child pid 26777 exit signal Segmentation fault (11) It's causing apache to crash every few minutes ------------------------------------------------------------------------ [2008-08-15 22:21:46] jfrisby at adknowledge dot com Follow-up: Changing the DSN in the sample code to "sqlite::memory:" per Johannes' suggestion -- and removing the actual query since the table doesn't exist -- produces the same behavior. We will attempt to test 5.2.6, and if it occurs there, 5.3.0. ------------------------------------------------------------------------ [2008-08-15 21:17:24] jfrisby at adknowledge dot com We're seeing an almost identical stack trace from a php commandline program. Basically, if we connect to a DB using PDO_mysql, we get an exit code of 1 after all our code has successfully executed without error -- but only if we use persistent connections. This is on PHP 5.2.4 under Ubuntu Hardy. Per suggestions on #php.pecl, will try SQLite driver, and if possible, 5.3. ---snip--- <?php error_reporting(E_ALL|E_STRICT); try { $obj = new PDO("mysql:host=localhost;dbname=ls_dev_jfrisby","root","" ,array(PDO::ATTR_PERSISTENT => true)); $stmt = $obj->prepare("select count(1) cnt from channel_map_bids"); $stmt->execute(); var_dump($stmt->fetchAll()); $obj = null; } catch (Exception $e) { print "exception: " . (string)$e . "\n"; } exit(0); ?> ------------------------------------------------------------------------ The remainder of the comments for this report are too long. To view the rest of the comments, please view the bug report online at http://bugs.php.net/43199 -- Edit this bug report at http://bugs.php.net/?id=43199&edit=1