php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #35415 crash with persistent connection
Submitted: 2005-11-27 01:11 UTC Modified: 2005-11-30 15:14 UTC
Votes:3
Avg. Score:4.0 ± 0.8
Reproduced:3 of 3 (100.0%)
Same Version:3 (100.0%)
Same OS:0 (0.0%)
From: gm at html dot it Assigned: wez (profile)
Status: Closed Package: PDO related
PHP Version: 5.1.1 OS: Linux Fedora Core 4
Private report: No CVE-ID: None
 [2005-11-27 01:11 UTC] gm at html dot it
Description:
------------
The code reported causes an apache crash.

It happens only with persistent connection, if i set PDO::ATTR_PERSISTENT = false, the script works fine.

Reproduce code:
---------------
<?php

try {
    $dbo = new PDO(
                        'mysql:host=localhost;dbname=test',
                        'user',
                        'pass',
                        array(PDO::ATTR_PERSISTENT => true)
                    );
} catch(PDOException $e) {
    echo 'Errore di connessione: '.$e->getMessage();
}

$pdostatement = $dbo->prepare('SELECT * FROM fake_table');
$pdostatement->execute();

echo 'print something';

?>

Expected result:
----------------
The script should just print out 'print something'.

Actual result:
--------------
Apache crash, this is the error in apache error.log: 

Sun Nov 27 00:48:48 2005] [notice] child pid 3051 exit signal Segmentation fault (11)

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2005-11-28 17:37 UTC] gm at html dot it
Here is the backtrace

#0  0x080cc915 in shutdown_memory_manager (silent=0, full_shutdown=0)
    at /home/giancarlo/sorgenti/php-5.1.1/Zend/zend_alloc.c:511
#1  0x080b344d in php_request_shutdown (dummy=0x0) at /home/giancarlo/sorgenti/php-5.1.1/main/main.c:1287
#2  0x0815e7be in apache_php_module_main (r=0x920ab84, display_source_mode=0)
    at /home/giancarlo/sorgenti/php-5.1.1/sapi/apache/sapi_apache.c:59
#3  0x080ac6d5 in send_php ()
#4  0x080ac73a in send_parsed_php ()
#5  0x082fcf3f in ap_invoke_handler ()
#6  0x083127fa in process_request_internal ()
#7  0x0831285a in ap_process_request ()
#8  0x08309349 in child_main ()
#9  0x0830956c in make_child ()
#10 0x083096c0 in startup_children ()
#11 0x08309d56 in standalone_main ()
#12 0x0830a55d in main ()
 [2005-11-28 17:53 UTC] tony2001@php.net
Please try using this CVS snapshot:

  http://snaps.php.net/php5-latest.tar.gz
 
For Windows:
 
  http://snaps.php.net/win32/php5-win32-latest.zip

Can't reproduce.
 [2005-11-28 18:24 UTC] gm at html dot it
Always the same

#0  0x080cc965 in shutdown_memory_manager (silent=0, full_shutdown=0)
    at /home/giancarlo/sorgenti/php5-200511281530/Zend/zend_alloc.c:511
#1  0x080b349d in php_request_shutdown (dummy=0x0) at /home/giancarlo/sorgenti/php5-200511281530/main/main.c:1287
#2  0x0815e822 in apache_php_module_main (r=0x9752bb4, display_source_mode=0)
    at /home/giancarlo/sorgenti/php5-200511281530/sapi/apache/sapi_apache.c:59
#3  0x080ac725 in send_php ()
#4  0x080ac78a in send_parsed_php ()
#5  0x082fd123 in ap_invoke_handler ()
#6  0x083129de in process_request_internal ()
#7  0x08312a3e in ap_process_request ()
#8  0x0830952d in child_main ()
#9  0x08309750 in make_child ()
#10 0x083098a4 in startup_children ()
#11 0x08309f3a in standalone_main ()
#12 0x0830a741 in main ()
 [2005-11-28 20:02 UTC] wez@php.net
What version of mysql are you running?
 [2005-11-29 08:24 UTC] gm at html dot it
MySql 4.0.26
 [2005-11-30 14:08 UTC] sniper@php.net
Please try using this CVS snapshot:

  http://snaps.php.net/php5.1-latest.tar.gz
 
For Windows:
 
  http://snaps.php.net/win32/php5.1-win32-latest.zip


 [2005-11-30 15:03 UTC] gm at html dot it
It looks like everything works good now
 [2005-11-30 15:14 UTC] tony2001@php.net
Fixed -> closed.
 
PHP Copyright © 2001-2021 The PHP Group
All rights reserved.
Last updated: Tue Oct 19 08:03:37 2021 UTC