php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #57262 oci8 crashes when inserting multiple LOBs with one prepared statement
Submitted: 2006-09-27 11:51 UTC Modified: 2007-02-13 18:36 UTC
From: justinpatrin@php.net Assigned: tony2001 (profile)
Status: Closed Package: oci8 (PECL)
PHP Version: 5.1.6 OS: Linux (Gentoo)
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: justinpatrin@php.net
New email:
PHP Version: OS:

 

 [2006-09-27 11:51 UTC] justinpatrin@php.net
Description:
------------
In writing a test case for a new issue with LOBs and MDB2 I ran into a crash that happens when I try to use one prepared query to insert multiple records with LOBs. In this case, thhe code is inserting 10 records, 2 lob columns to each record. I have also tested with only inserting 1 LOB column per record. It also crashes. The crash happens when I try to execute the statement the second time.

Reproduce code:
---------------
I do not have simple reproduce code at the moment. The ocde I am using to test this is the MDB2 test case testLOBRead. The code in CVS now will not cause this issues as I have altered it to prepare a new query for each insert. I will try to get a simpler script for you if you need it (and if I can get oracle back up....it's died on me).

Actual result:
--------------
#0  0xb64b13a7 in kpufGetRcvInfo () from /opt/oracle/product/10.1.0.3/lib/libclntsh.so.10.1
#1  0xb6724be8 in ttcacr () from /opt/oracle/product/10.1.0.3/lib/libclntsh.so.10.1
#2  0xb66b2bda in ttcdrv () from /opt/oracle/product/10.1.0.3/lib/libclntsh.so.10.1
#3  0xb65a6f1d in nioqwa () from /opt/oracle/product/10.1.0.3/lib/libclntsh.so.10.1
#4  0xb640b333 in upirtrc () from /opt/oracle/product/10.1.0.3/lib/libclntsh.so.10.1
#5  0xb6380fd2 in kpurcsc () from /opt/oracle/product/10.1.0.3/lib/libclntsh.so.10.1
#6  0xb6336617 in kpuexecv8 () from /opt/oracle/product/10.1.0.3/lib/libclntsh.so.10.1
#7  0xb63389a6 in kpuexec () from /opt/oracle/product/10.1.0.3/lib/libclntsh.so.10.1
#8  0xb640fe9e in OCIStmtExecute () from /opt/oracle/product/10.1.0.3/lib/libclntsh.so.10.1
#9  0xb6f38d07 in php_oci_statement_execute (statement=0x8c75d24, mode=0) at /tmp/pear/cache/oci8-1.2.2/oci8_statement.c:345
#10 0xb6f40bc5 in zif_oci_execute (ht=0, return_value=0x8c7435c, return_value_ptr=0x0, this_ptr=0x0, return_value_used=1)
    at /tmp/pear/cache/oci8-1.2.2/oci8_interface.c:1276
#11 0x0836d26e in execute ()
#12 0x0836cbcb in execute ()
#13 0x0836ce46 in execute ()
#14 0x0836cbcb in execute ()
#15 0x0836ce46 in execute ()
#16 0x0836cbcb in execute ()
#17 0x08340f5b in zend_call_function ()
#18 0x08341b60 in call_user_function_ex ()
#19 0x0828294f in zif_call_user_func ()
#20 0x0836d26e in execute ()
#21 0x0836cbcb in execute ()
#22 0x0836ce46 in execute ()
#23 0x0836cbcb in execute ()
#24 0x0836ce46 in execute ()
#25 0x0836cbcb in execute ()
#26 0x0836ce46 in execute ()
#27 0x0836cbcb in execute ()
#28 0x0836ce46 in execute ()
#29 0x0836cbcb in execute ()
#30 0x0836ce46 in execute ()
#31 0x0836cbcb in execute ()
#32 0x0834ef24 in zend_execute_scripts ()
#33 0x08308728 in php_execute_script ()
#34 0x00000000 in ?? ()


Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2006-09-27 11:54 UTC] justinpatrin@php.net
(gdb) frame 11
#11 0x0836d26e in execute ()
(gdb) print (char *)(executor_globals.function_state_ptr->function)->common.function_name
$1 = 0xb6ec1508 "ociexecute"
(gdb) print (char *)executor_globals.active_op_array->function_name
$2 = 0x89c158c "_execute"
(gdb) print (char *)executor_globals.active_op_array->filename
$3 = 0x88d4134 "/home/papercrane/pear/MDB2/MDB2/Driver/oci8.php"
 [2006-09-27 13:18 UTC] tony2001 at phpclub dot net
See test case: ext/oci8/tests/oci_execute_segfault.phpt
The backtrace seems to be identical, so I believe the cause is the same too.
I don't know of any solution yet.
 [2006-09-27 13:40 UTC] justinpatrin@php.net
Yep, that seems to be the test case for this. Thanks for the quick response. I've altered our test case to re-prepare per-insert for now.
 [2007-02-13 18:36 UTC] tony2001 at phpclub dot net
JFYI: this is fixed in PHP 5.2.1.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Dec 26 11:01:30 2024 UTC