Edit report at http://bugs.php.net/bug.php?id=44589&edit=1
ID: 44589 Updated by: s...@php.net Reported by: s dot rost at ewerk dot com Summary: pdo_oci crashes and aborts php script for LOB columns -Status: Assigned +Status: Duplicate Type: Bug Package: PDO related Operating System: Debian 2.6.18.dfsg.1-18etch1 PHP Version: 5.*, 6CVS (2009-04-25) -Assigned To: cjorcl +Assigned To: sixd Block user comment: N Private report: N New Comment: Duplicate of http://pecl.php.net/bugs/bug.php?id=11320 Previous Comments: ------------------------------------------------------------------------ [2009-08-31 20:59:44] kenashkov at gmail dot com I have a very similar problem. Segfaults when executing two exactly same queries each after another. The query must contain a JOIN and one of the tables a CLOB (if it is against a single table without a join works fine). If the query is executed only once it works. ============== CODE =========== <? $db = new \PDO('oci:host=192.168.1.231;port=1521;dbname=192.168.1.231/orcl;charset=AL32UTF8','user','pass'); $q = " SELECT clob_column FROM table1 INNER JOIN table2 ON table2.tid=table1.tid WHERE main_table.tid = :tid "; $b = array('tid'=>1); $s = $db->prepare($q); $s->execute($b); $data = $s->fetchAll(); $q = " SELECT clob_column FROM table1 INNER JOIN table2 ON table2.tid=table1.tid WHERE main_table.tid = :tid "; $b = array('tid'=>1); $s = $db->prepare($q); $s->execute($b); $data = $s->fetchAll(); print 'ok';//never reached ?> =================== CONFIGURE OPTIONS =========== './configure' '--prefix=/web/php5.3-debug' '--with-apxs2=/web/apache2.2-php5.3-debug/bin/apxs' '--enable-bcmath=shared' '--with-bz2=shared' '--enable-calendar=shared' '--with-curl=shared' '--enable-dbase=shared' '--enable-dbx=shared' '--enable-exif=shared' '--with-fam=shared' '--with-gettext=shared' '--with-gmp=shared' '--with-iconv=shared' '--with-gd=shared' '--with-ttf' '--with-freetype-dir' '--enable-gd-native-ttf' '--with-jpeg-dir' '--with-png-dir' '--with-xpm-dir--with-imap-ssl' '--with-kerberos' '--with-ldap=shared' '--with-ldap-sasl' '--with-mcal=shared' '--with-mcrypt=shared' '--with-mhash=shared' '--enable-mbstring=shared' '--with-mysql=shared,/usr' '--with-mysqli=shared,/usr/bin/mysql_config' '--with-ncurses=shared' '--with-openssl=shared' '--enable-pcntl=shared' '--with-pgsql=shared,/usr/bin/pg_config' '--with-imap=shared' '--with-imap-ssl' '--with-oci8=shared,instantclient,/opt/oracle_instantclient_11,11.1.0.6.0' '--enable-sysvsem=shared' '--enable-sysvshm=shared' '--enable-sysvmsg=shared' '--enable-shmop' '--enable-mbstring' '--with-zlib=shared' '--with-bz2=shared' '--with-xsl=shared' '--with-pdo-mysql=shared' '--with-pdo-pgsql=shared' '--with-pdo-oci=shared,instantclient,/opt/oracle_instantclient_11,11.1.0.6.0' '--enable-debug' =================== BACKTRACE ============== #0 0x00002b46f4b7148c in kohfri () from /opt/oracle_instantclient_11/libclntsh.so.11.1 #1 0x00002b46f5fe1fd1 in kohfrr () from /opt/oracle_instantclient_11/libclntsh.so.11.1 #2 0x00002b46f4b710e2 in kohfrw () from /opt/oracle_instantclient_11/libclntsh.so.11.1 #3 0x00002b46f4abdbeb in kollfrfn () from /opt/oracle_instantclient_11/libclntsh.so.11.1 #4 0x00002b46f47d472e in kpufdesc2 () from /opt/oracle_instantclient_11/libclntsh.so.11.1 #5 0x00002b46f47d3ebb in kpufdesc () from /opt/oracle_instantclient_11/libclntsh.so.11.1 #6 0x00002b46f47a8af9 in OCIDescriptorFree () from /opt/oracle_instantclient_11/libclntsh.so.11.1 #7 0x00002b46f7621aa6 in oci_blob_close (stream=0xa94680, close_handle=1) at /home/DATA/temp_compile/php-5.3.0/ext/pdo_oci/oci_statement.c:652 #8 0x00002b46f0cc1105 in _php_stream_free (stream=0xa94680, close_options=11) at /home/DATA/temp_compile/php-5.3.0/main/streams/streams.c:356 #9 0x00002b46f0cc3d7d in stream_resource_regular_dtor (rsrc=0xa94868) at /home/DATA/temp_compile/php-5.3.0/main/streams/streams.c:1426 #10 0x00002b46f0d35e38 in list_entry_destructor (ptr=0xa94868) at /home/DATA/temp_compile/php-5.3.0/Zend/zend_list.c:184 #11 0x00002b46f0d32d7b in zend_hash_del_key_or_index (ht=0x2b46f15286b0, arKey=0x0, nKeyLength=0, h=3, flag=1) at /home/DATA/temp_compile/php-5.3.0/Zend/zend_hash.c:497 #12 0x00002b46f0d35905 in _zend_list_delete (id=3) at /home/DATA/temp_compile/php-5.3.0/Zend/zend_list.c:58 #13 0x00002b46f0d1fd57 in _zval_dtor_func (zvalue=0xa94590, __zend_filename=0x2b46f1224d28 "/home/DATA/temp_compile/php-5.3.0/Zend/zend_execute_API.c", __zend_lineno=435) at /home/DATA/temp_compile/php-5.3.0/Zend/zend_variables.c:60 #14 0x00002b46f0d0f6d5 in _zval_dtor (zvalue=0xa94590, __zend_filename=0x2b46f1224d28 "/home/DATA/temp_compile/php-5.3.0/Zend/zend_execute_API.c", __zend_lineno=435) at /home/DATA/temp_compile/php-5.3.0/Zend/zend_variables.h:35 #15 0x00002b46f0d0f9fc in _zval_ptr_dtor (zval_ptr=0xa94990, __zend_filename=0x2b46f1225e80 "/home/DATA/temp_compile/php-5.3.0/Zend/zend_variables.c", __zend_lineno=175) at /home/DATA/temp_compile/php-5.3.0/Zend/zend_execute_API.c:435 #16 0x00002b46f0d20106 in _zval_ptr_dtor_wrapper (zval_ptr=0xa94990) at /home/DATA/temp_compile/php-5.3.0/Zend/zend_variables.c:175 #17 0x00002b46f0d32ece in zend_hash_destroy (ht=0xa94458) at /home/DATA/temp_compile/php-5.3.0/Zend/zend_hash.c:526 #18 0x00002b46f0d1fd10 in _zval_dtor_func (zvalue=0xa943e0, __zend_filename=0x2b46f1224d28 "/home/DATA/temp_compile/php-5.3.0/Zend/zend_execute_API.c", __zend_lineno=435) at /home/DATA/temp_compile/php-5.3.0/Zend/zend_variables.c:43 #19 0x00002b46f0d0f6d5 in _zval_dtor (zvalue=0xa943e0, __zend_filename=0x2b46f1224d28 "/home/DATA/temp_compile/php-5.3.0/Zend/zend_execute_API.c", __zend_lineno=435) at /home/DATA/temp_compile/php-5.3.0/Zend/zend_variables.h:35 #20 0x00002b46f0d0f9fc in _zval_ptr_dtor (zval_ptr=0xa94a30, __zend_filename=0x2b46f1225e80 "/home/DATA/temp_compile/php-5.3.0/Zend/zend_variables.c", __zend_lineno=175) at /home/DATA/temp_compile/php-5.3.0/Zend/zend_execute_API.c:435 #21 0x00002b46f0d20106 in _zval_ptr_dtor_wrapper (zval_ptr=0xa94a30) at /home/DATA/temp_compile/php-5.3.0/Zend/zend_variables.c:175 #22 0x00002b46f0d32ece in zend_hash_destroy (ht=0xa94208) at /home/DATA/temp_compile/php-5.3.0/Zend/zend_hash.c:526 #23 0x00002b46f0d1fd10 in _zval_dtor_func (zvalue=0xa93468, __zend_filename=0x2b46f1229b38 "/home/DATA/temp_compile/php-5.3.0/Zend/zend_execute.c", __zend_lineno=698) at /home/DATA/temp_compile/php-5.3.0/Zend/zend_variables.c:43 #24 0x00002b46f0d5195d in _zval_dtor (zvalue=0xa93468, __zend_filename=0x2b46f1229b38 "/home/DATA/temp_compile/php-5.3.0/Zend/zend_execute.c", __zend_lineno=698) at /home/DATA/temp_compile/php-5.3.0/Zend/zend_variables.h:35 #25 0x00002b46f0d89dee in zend_assign_to_variable (variable_ptr_ptr=0xa94b48, value=0xa929e0, is_tmp_var=0) at /home/DATA/temp_compile/php-5.3.0/Zend/zend_execute.c:698 #26 0x00002b46f0e014e0 in ZEND_ASSIGN_SPEC_CV_VAR_HANDLER (execute_data=0x2b46fd11f090) at /home/DATA/temp_compile/php-5.3.0/Zend/zend_vm_execute.h:27263 #27 0x00002b46f0d540ee in execute (op_array=0xa8f240) at /home/DATA/temp_compile/php-5.3.0/Zend/zend_vm_execute.h:104 #28 0x00002b46f0d229db in zend_execute_scripts (type=8, retval=0x0, file_count=3) at /home/DATA/temp_compile/php-5.3.0/Zend/zend.c:1188 #29 0x00002b46f0ca6c6c in php_execute_script (primary_file=0x7fffc2c2ca30) at /home/DATA/temp_compile/php-5.3.0/main/main.c:2196 #30 0x00002b46f0e11fc6 in php_handler (r=0xac6878) at /home/DATA/temp_compile/php-5.3.0/sapi/apache2handler/sapi_apache2.c:648 #31 0x000000000044151c in ap_run_handler () #32 0x0000000000441db5 in ap_invoke_handler () #33 0x0000000000452600 in ap_process_request () #34 0x000000000044f5e1 in ap_process_http_connection () #35 0x000000000044a89a in ap_run_process_connection () #36 0x000000000044acd4 in ap_process_connection () #37 0x0000000000458f47 in child_main () #38 0x00000000004590ed in make_child () #39 0x000000000045915b in startup_children () #40 0x0000000000459615 in ap_mpm_run ------------------------------------------------------------------------ [2009-04-25 15:00:22] j...@php.net See also bug #44852 ------------------------------------------------------------------------ [2009-03-03 15:36:03] simong at bluhalo dot com We are receiving the same segfault in PHP 5.2.8 This is our backtrace: Program received signal SIGSEGV, Segmentation fault. [Switching to Thread -1208256752 (LWP 8743)] 0x0324e96f in kghufree () from /usr/lib/oracle/10.2.0.4/client/lib/libclntsh.so.10.1 (gdb) bt #0 0x0324e96f in kghufree () from /usr/lib/oracle/10.2.0.4/client/lib/libclntsh.so.10.1 #1 0x031eea1f in kohfrem () from /usr/lib/oracle/10.2.0.4/client/lib/libclntsh.so.10.1 #2 0x031ee29c in kohfrr () from /usr/lib/oracle/10.2.0.4/client/lib/libclntsh.so.10.1 #3 0x031eeca7 in kohfrw () from /usr/lib/oracle/10.2.0.4/client/lib/libclntsh.so.10.1 #4 0x0308a438 in kollfrfn () from /usr/lib/oracle/10.2.0.4/client/lib/libclntsh.so.10.1 #5 0x02b369f9 in kpufdesc () from /usr/lib/oracle/10.2.0.4/client/lib/libclntsh.so.10.1 #6 0x02c079be in OCIDescriptorFree () from /usr/lib/oracle/10.2.0.4/client/lib/libclntsh.so.10.1 #7 0x011e129c in oci_blob_close (stream=0xa11026c, close_handle=1) at /root/php-5.2.8/ext/pdo_oci/oci_statement.c:652 #8 0x013626b1 in _php_stream_free (stream=0xa11026c, close_options=56830048) at /root/php-5.2.8/main/streams/streams.c:350 #9 0x013628db in stream_resource_regular_dtor (rsrc=0xa1102f0) at /root/php-5.2.8/main/streams/streams.c:1371 #10 0x0139bc22 in list_entry_destructor (ptr=0xa1102f0) at /root/php-5.2.8/Zend/zend_list.c:184 #11 0x0139a16d in zend_hash_del_key_or_index (ht=0x151f720, arKey=0xa12cd <Address 0xa12cd out of bounds>, nKeyLength=0, h=173, flag=1) at /root/php-5.2.8/Zend/zend_hash.c:497 #12 0x0139be6c in _zend_list_delete (id=173) at /root/php-5.2.8/Zend/zend_list.c:58 #13 0x0138321f in _zval_ptr_dtor (zval_ptr=0xa110a58) at /root/php-5.2.8/Zend/zend_variables.h:35 #14 0x013993e6 in zend_hash_destroy (ht=0xa110b94) at /root/php-5.2.8/Zend/zend_hash.c:526 #15 0x0138f2c5 in _zval_dtor_func (zvalue=0xa1107bc) at /root/php-5.2.8/Zend/zend_variables.c:43 #16 0x0138321f in _zval_ptr_dtor (zval_ptr=0xa10f97c) at /root/php-5.2.8/Zend/zend_variables.h:35 #17 0x013993e6 in zend_hash_destroy (ht=0xa11051c) at /root/php-5.2.8/Zend/zend_hash.c:526 #18 0x013a7f73 in zend_object_std_dtor (object=0xa1104f0) at /root/php-5.2.8/Zend/zend_objects.c:45 #19 0x013a7fa2 in zend_objects_free_object_storage (object=0xa1104f0) at /root/php-5.2.8/Zend/zend_objects.c:122 #20 0x013ab2a9 in zend_objects_store_del_ref_by_handle (handle=156) at /root/php-5.2.8/Zend/zend_objects_API.c:206 #21 0x013ab2e8 in zend_objects_store_del_ref (zobject=0xa110504) at /root/php-5.2.8/Zend/zend_objects_API.c:168 #22 0x0138321f in _zval_ptr_dtor (zval_ptr=0xa110cec) at /root/php-5.2.8/Zend/zend_variables.h:35 #23 0x013993e6 in zend_hash_destroy (ht=0xa10fb88) at /root/php-5.2.8/Zend/zend_hash.c:526 #24 0x0138f2c5 in _zval_dtor_func (zvalue=0xa10fd88) at /root/php-5.2.8/Zend/zend_variables.c:43 #25 0x0138321f in _zval_ptr_dtor (zval_ptr=0x9f22dd0) at /root/php-5.2.8/Zend/zend_variables.h:35 #26 0x013993e6 in zend_hash_destroy (ht=0x9ee9718) at /root/php-5.2.8/Zend/zend_hash.c:526 #27 0x013a7f73 in zend_object_std_dtor (object=0x9f1832c) at /root/php-5.2.8/Zend/zend_objects.c:45 #28 0x013a7fa2 in zend_objects_free_object_storage (object=0x9f1832c) at /root/php-5.2.8/Zend/zend_objects.c:122 #29 0x013ab2a9 in zend_objects_store_del_ref_by_handle (handle=118) at /root/php-5.2.8/Zend/zend_objects_API.c:206 #30 0x013ab2e8 in zend_objects_store_del_ref (zobject=0x9f22c58) at /root/php-5.2.8/Zend/zend_objects_API.c:168 #31 0x0138321f in _zval_ptr_dtor (zval_ptr=0x9e3bab4) at /root/php-5.2.8/Zend/zend_variables.h:35 #32 0x013993e6 in zend_hash_destroy (ht=0x9e3b958) at /root/php-5.2.8/Zend/zend_hash.c:526 #33 0x013a7f73 in zend_object_std_dtor (object=0x9dcf218) at /root/php-5.2.8/Zend/zend_objects.c:45 #34 0x013a7fa2 in zend_objects_free_object_storage (object=0x9dcf218) at /root/php-5.2.8/Zend/zend_objects.c:122 #35 0x013aaecd in zend_objects_store_free_object_storage (objects=0x151f7c8) at /root/php-5.2.8/Zend/zend_objects_API.c:89 #36 0x01383a21 in shutdown_executor () at /root/php-5.2.8/Zend/zend_execute_API.c:299 #37 0x0138f833 in zend_deactivate () at /root/php-5.2.8/Zend/zend.c:860 #38 0x0134f6d7 in php_request_shutdown (dummy=0x0) at /root/php-5.2.8/main/main.c:1492 #39 0x01409946 in php_handler (r=0x99ba468) at /root/php-5.2.8/sapi/apache2handler/sapi_apache2.c:469 #40 0x0029c96d in ap_run_handler () from /usr/sbin/httpd #41 0x002a0318 in ap_invoke_handler () from /usr/sbin/httpd #42 0x002ac38e in ap_process_request () from /usr/sbin/httpd #43 0x002a916f in ap_register_input_filter () from /usr/sbin/httpd #44 0x002a483d in ap_run_process_connection () from /usr/sbin/httpd #45 0x002a493c in ap_process_connection () from /usr/sbin/httpd #46 0x002b0952 in ap_graceful_stop_signalled () from /usr/sbin/httpd #47 0x002b0bc4 in ap_graceful_stop_signalled () from /usr/sbin/httpd #48 0x002b1ad9 in ap_mpm_run () from /usr/sbin/httpd #49 0x00288147 in main () from /usr/sbin/httpd ------------------------------------------------------------------------ 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/bug.php?id=44589 -- Edit this bug report at http://bugs.php.net/bug.php?id=44589&edit=1