php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #36010 Crash when executing SQL statment with lob parameter after another SQL statment
Submitted: 2006-01-14 15:38 UTC Modified: 2006-02-04 12:37 UTC
Votes:2
Avg. Score:4.0 ± 0.0
Reproduced:2 of 2 (100.0%)
Same Version:1 (50.0%)
Same OS:0 (0.0%)
From: spatar at mail dot nnov dot ru Assigned: tony2001 (profile)
Status: Closed Package: OCI8 related
PHP Version: 5.1.2 OS: SuSE Linux 9.2 (i586)
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: spatar at mail dot nnov dot ru
New email:
PHP Version: OS:

 

 [2006-01-14 15:38 UTC] spatar at mail dot nnov dot ru
Description:
------------
OCI8 crashes in call "oci_execute" when executing some SQL statment with binded lob parameter after another SQL statment.
Previous version (PHP 5.1.1) doesn't produce this bug.

More details:
OS: SuSE Linux 9.2 (i586)
uname -a: Linux www 2.6.8-24-smp #1 SMP Wed Oct 6 09:16:23 UTC 2004 i686 i686 i386 GNU/Linux
Apache 2.2.0
Oracle 10.1.0.3.0
PHP 5.1.2

Reproduce code:
---------------
<?php
        function f($conn)
        {
                $sql =  "begin :p_clob := 'lob string'; end;";
                $stid = oci_parse($conn, $sql);
                $clob = oci_new_descriptor($conn, OCI_D_LOB);
                oci_bind_by_name($stid, ":p_clob", $clob, -1, OCI_B_CLOB);
                $r = oci_execute($stid, OCI_DEFAULT);
                if ($r)
                {
                        echo $clob->load(), "\n";
                }
                $clob->free();
                oci_free_statement($stid);
        }
        $conn = oci_connect("voip_dev", "9", "RS21");
        f($conn);
        f($conn);
        oci_close($conn);
?>

Expected result:
----------------
lob string
lob string

Actual result:
--------------
#0  0xb6cfdc73 in kpufGetRcvInfo () from /u01/app/oracle/OraHome2/lib/libclntsh.so.10.1
#1  0xb6f489b5 in ttcacr () from /u01/app/oracle/OraHome2/lib/libclntsh.so.10.1
#2  0xb6f4a807 in ttcdrv () from /u01/app/oracle/OraHome2/lib/libclntsh.so.10.1
#3  0xb6dec4ad in nioqwa () from /u01/app/oracle/OraHome2/lib/libclntsh.so.10.1
#4  0xb6c5e07e in upirtrc () from /u01/app/oracle/OraHome2/lib/libclntsh.so.10.1
#5  0xb6bf4d35 in kpurcsc () from /u01/app/oracle/OraHome2/lib/libclntsh.so.10.1
#6  0xb6bb1831 in kpuexecv8 () from /u01/app/oracle/OraHome2/lib/libclntsh.so.10.1
#7  0xb6bb33ac in kpuexec () from /u01/app/oracle/OraHome2/lib/libclntsh.so.10.1
#8  0xb6c27b86 in OCIStmtExecute () from /u01/app/oracle/OraHome2/lib/libclntsh.so.10.1
#9  0xb788ba64 in php_oci_statement_execute (statement=0x82f6c84, mode=137325732)
    at /home/spatar/mvtm-www/php-5.1.2/ext/oci8/oci8_statement.c:321
#10 0xb788fa7a in zif_oci_execute (ht=2, return_value=0xb640b02c, return_value_ptr=0x0, this_ptr=0x0,
    return_value_used=1) at /home/spatar/mvtm-www/php-5.1.2/ext/oci8/oci8_interface.c:1276
#11 0xb7a07d7b in zend_do_fcall_common_helper_SPEC (execute_data=0xbfffc240) at zend_vm_execute.h:192
#12 0xb7a56fbd in execute (op_array=0x82a6330) at zend_vm_execute.h:92
#13 0xb7a07836 in zend_do_fcall_common_helper_SPEC (execute_data=0xbfffc390) at zend_vm_execute.h:226
#14 0xb7a56fbd in execute (op_array=0x829df04) at zend_vm_execute.h:92
#15 0xb79eaf8f in zend_execute_scripts (type=8, retval=0x0, file_count=3)
    at /home/spatar/mvtm-www/php-5.1.2/Zend/zend.c:1101
#16 0xb79b01ae in php_execute_script (primary_file=0xbfffe6e0) at /home/spatar/mvtm-www/php-5.1.2/main/main.c:1720
#17 0xb7a57ac1 in php_handler (r=0x82799d0) at /home/spatar/mvtm-www/php-5.1.2/sapi/apache2handler/sapi_apache2.c:584
#18 0x0807756b in ap_run_handler ()
...

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2006-01-14 15:48 UTC] sniper@php.net
Assigned to the maintainer.
 [2006-02-03 12:42 UTC] robertg2 at hope dot ac dot uk
I have the same problem.

Apache/2.0.54
Oracle InstantClient 10.2.0.1
PHP 5.0.4
oci8 from cvs (1.292 at 2006-02-03)
Suse Linux 10.0 (2.6.13-15-default)

Reverted back to oci8 pecl beta release 1.1.1 which doesn't  suffer from the issue.
 [2006-02-03 15:47 UTC] tony2001@php.net
This bug has been fixed in CVS.

Snapshots of the sources are packaged every three hours; this change
will be in the next snapshot. You can grab the snapshot at
http://snaps.php.net/.
 
Thank you for the report, and for helping us make PHP better.

Thanks for the last comment, it was _very_ helpful.
 [2006-02-04 12:37 UTC] spatar at mail dot nnov dot ru
Thank you. It works now.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sat Dec 21 14:01:32 2024 UTC