php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #33311 PDO/PgSQL-Driver crashes Apache
Submitted: 2005-06-11 14:45 UTC Modified: 2005-06-12 22:20 UTC
From: martin dot stricker at rz dot hu-berlin dot de Assigned:
Status: Closed Package: PDO related
PHP Version: 5.1 snapshot 050611-1230 OS: OS X 10.4.1
Private report: No CVE-ID: None
View Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
If you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: martin dot stricker at rz dot hu-berlin dot de
New email:
PHP Version: OS:

 

 [2005-06-11 14:45 UTC] martin dot stricker at rz dot hu-berlin dot de
Description:
------------
PgSQL-Driver crashes Apache when attempting to connect to database-server, see Apache error-log:
[Sat Jun 11 14:37:27 2005] [notice] child pid 490 exit signal Bus error (10)
PgSQL Version 7.4.6 / Apache 1.3.33

Reproduce code:
---------------
$dsn = "pgsql:host=localhost port=5432  dbname=xxxxx user=xxxxx pass=xxxxx";

try {
	$p =& new PDO($dsn);
}  catch(PDOException $e) {
	echo $e->getMessage() . "\n";
} 


Expected result:
----------------
PDO-Object

Actual result:
--------------
Apache Bus error

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2005-06-11 14:48 UTC] martin dot stricker at rz dot hu-berlin dot de
Bug concerns 5.1beta1
 [2005-06-11 18:23 UTC] martin dot stricker at rz dot hu-berlin dot de
I couldn't get gdb to work properly, but I think this crashdump report could be helpful. When I tested the PDO/PgSQL on the command line, the script executed properly just until the end, when the BUS Error ocurred (crashdump pretty much the same, without httpd sections, naturally).

== chrashdump report

Host Name:      pBook
Date/Time:      2005-06-11 17:53:02.408 +0200
OS Version:     10.4.1 (Build 8B15)
Report Version: 3

Command: httpd
Path:    /usr/sbin/httpd
Parent:  httpd [8775]

Version: ??? (???)

PID:    8826
Thread: 0

Exception:  EXC_BAD_ACCESS (0x0001)
Codes:      KERN_PROTECTION_FAILURE (0x0002) at 0x00000000

Thread 0 Crashed:
0   libphp5.so 	0x0212aee4 pdo_pgsql_transaction_cmd + 52 (pgsql_driver.c:314)
1   libphp5.so 	0x0212b004 pgsql_handle_rollback + 48 (pgsql_driver.c:336)
2   libphp5.so 	0x0211ebf4 pdo_dbh_free_storage + 96 (pdo_dbh.c:1123)
3   libphp5.so 	0x023a9fb8 zend_objects_store_free_object_storage + 208 (zend_objects_API.c:76)
4   libphp5.so 	0x0236c55c shutdown_executor + 1152 (zend_execute_API.c:273)
5   libphp5.so 	0x02381600 zend_deactivate + 220 (zend.c:825)
6   libphp5.so 	0x023167b8 php_request_shutdown + 1052 (main.c:1240)
7   libphp5.so 	0x024464e8 apache_php_module_main + 336 (sapi_apache.c:60)
8   libphp5.so 	0x02447a0c send_php + 964 (mod_php5.c:644)
9   libphp5.so 	0x02447a98 send_parsed_php + 40 (mod_php5.c:656)
10  httpd      	0x0000dd18 ap_invoke_handler + 232
11  httpd      	0x00017dd4 process_request_internal + 640
12  httpd      	0x00017e54 ap_process_request + 72
13  httpd      	0x00006b60 child_main + 1832
14  httpd      	0x00006dc4 make_child + 312
15  httpd      	0x000070f4 perform_idle_server_maintenance + 572
16  httpd      	0x000076d0 standalone_main + 964
17  httpd      	0x00007d74 main + 1052
18  httpd      	0x0000238c _start + 348
19  httpd      	0x0000222c start + 60

Thread 0 crashed with PPC Thread State:
  srr0: 0x0212aee4 srr1: 0x0200f030                vrsave: 0x00000000
    cr: 0x24000444  xer: 0x00000006   lr: 0x0212b004  ctr: 0x0212afd4
    r0: 0x00000001   r1: 0xbfffdac0   r2: 0x00000000   r3: 0x02478898
    r4: 0x003a7448   r5: 0x000002d5   r6: 0x003a8c5b   r7: 0x0000a753
    r8: 0x00000001   r9: 0x0211eb94  r10: 0x0236bab8  r11: 0x00058194
   r12: 0x0212afd4  r13: 0x00000000  r14: 0x00000000  r15: 0x00000000
   r16: 0x00000000  r17: 0x00000000  r18: 0x00000000  r19: 0x00000000
   r20: 0x00000000  r21: 0x00000000  r22: 0xffffffff  r23: 0x00056ec0
   r24: 0x00000001  r25: 0x00000002  r26: 0x0183c038  r27: 0x000001f4
   r28: 0x00000017  r29: 0x0183ffc0  r30: 0xbfffdac0  r31: 0x0212afec

Binary Images Description:
 ... very lengthy part, which you probably wouldn't need, if otherwise, please give notice
 [2005-06-11 18:38 UTC] martin dot stricker at rz dot hu-berlin dot de
chrashdump above concerns snapshot from today (with solved PDO/MySQL problem, bug <a href="http://bugs.php.net/bug.php?id=33310">#33310</a>)
 [2005-06-11 19:08 UTC] martin dot stricker at rz dot hu-berlin dot de
And this is from gdb:

#0  0x00124c68 in pdo_pgsql_transaction_cmd (cmd=0x471384 "ROLLBACK", dbh=0x1da6a88) at /xxx/5dev0506111230/ext/pdo_pgsql/pgsql_driver.c:314
#1  0x00124d88 in pgsql_handle_rollback (dbh=0x1da6a88) at /xxx/5dev0506111230/ext/pdo_pgsql/pgsql_driver.c:336
#2  0x00118978 in pdo_dbh_free_storage (dbh=0x1da6a88) at /xxx/5dev0506111230/ext/pdo/pdo_dbh.c:1122
#3  0x003a3d3c in zend_objects_store_free_object_storage (objects=0x68c3f0) at /xxx/5dev0506111230/Zend/zend_objects_API.c:82
#4  0x003662e0 in shutdown_executor () at /xxx/5dev0506111230/Zend/zend_execute_API.c:272
#5  0x0037b384 in zend_deactivate () at /xxx/5dev0506111230/Zend/zend.c:823
#6  0x0031053c in php_request_shutdown (dummy=0x0) at /xxx/5dev0506111230/main/main.c:1237
#7  0x00442678 in main (argc=2, argv=0xbffff794) at /xxx/5dev0506111230/sapi/cli/php_cli.c:1139
(gdb)
 [2005-06-12 19:19 UTC] iliaa@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


 [2005-06-12 22:20 UTC] martin dot stricker at rz dot hu-berlin dot de
fix confirmed with snapshot 200506012-1830
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sun Dec 08 13:01:28 2024 UTC