Bug #71600 [Opn->Fbk]: oci_fetch_all results in segfault on apache 2.4
| From: | sixd@php.net | Date: | Tue, 08 Mar 2016 00:45:59 +0000 |
| Subject: | Bug #71600 [Opn->Fbk]: oci_fetch_all results in segfault on apache 2.4 | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-199655@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=71600&edit=1
ID: 71600
Updated by: sixd@php.net
Reported by: nick dot saraniti at gmail dot com
-Summary: oci_get_all results in segfault on apache 2.4
+Summary: oci_fetch_all results in segfault on apache 2.4
-Status: Open
+Status: Feedback
Type: Bug
-Package: Oracle related
+Package: OCI8 related
Operating System: CentOS 7.2.1511
PHP Version: 7.0.3
Block user comment: N
Private report: N
New Comment:
Please post the DDL to create the table used in your testcase. Thanks
Previous Comments:
------------------------------------------------------------------------
[2016-03-08 00:21:00] bigmage at web dot de
maybe you should change the topic to: oci_fetch_all
------------------------------------------------------------------------
[2016-02-22 14:58:01] nick dot saraniti at gmail dot com
camporter1 thanks for confirming, For me at least this only happens about 40% of the time when
returning multi-row sets from oracle. I'm trying to find some commonality on the queries which
fail, possibly with returned NULL values from oracle?
------------------------------------------------------------------------
[2016-02-22 07:33:04] camporter1 at gmail dot com
The issue seems to be that when more than one row is in the result, the first row writes over
outarrs[i]->value when zend_hash_index_update is called. The address of the first bucket's
key is the same as outarrs[i]. I haven't figured out why. The key gets set to NULL, which
erases the value in outarrs[i], which causes the segfault.
------------------------------------------------------------------------
[2016-02-17 02:03:12] nick dot saraniti at gmail dot com
Some more info,
Oracle Database 11g Release 11.2.0.1.0 - 64bit Production
PL/SQL Release 11.2.0.1.0 - Production
"CORE 11.2.0.1.0 Production"
TNS for Linux: Version 11.2.0.1.0 - Production
NLSRTL Version 11.2.0.1.0 - Production
Used rpm to install instaclient's, PECL for oci8
[New Thread 0x7ffff7f396c0 (LWP 7676)]
Program received signal SIGSEGV, Segmentation fault.
0x00007fffea529df5 in _zend_hash_index_update ()
from /etc/httpd/modules/libphp7.so
(gdb)
(gdb) bt
#0 0x00007fffea529df5 in _zend_hash_index_update ()
from /etc/httpd/modules/libphp7.so
#1 0x00007fffddd3c395 in zif_oci_fetch_all (execute_data=<optimized out>,
return_value=0x7fffe8217500) at /var/tmp/oci8/oci8_interface.c:1495
#2 0x00007fffea50b35b in dtrace_execute_internal ()
from /etc/httpd/modules/libphp7.so
#3 0x00007fffea596db3 in ?? () from /etc/httpd/modules/libphp7.so
#4 0x00007fffea558fcb in execute_ex () from /etc/httpd/modules/libphp7.so
#5 0x00007fffea50b239 in dtrace_execute_ex ()
from /etc/httpd/modules/libphp7.so
#6 0x00007fffea596a90 in ?? () from /etc/httpd/modules/libphp7.so
#7 0x00007fffea558fcb in execute_ex () from /etc/httpd/modules/libphp7.so
#8 0x00007fffea50b239 in dtrace_execute_ex ()
from /etc/httpd/modules/libphp7.so
#9 0x00007fffea5a0378 in ?? () from /etc/httpd/modules/libphp7.so
#10 0x00007fffea558fcb in execute_ex () from /etc/httpd/modules/libphp7.so
#11 0x00007fffea50b239 in dtrace_execute_ex ()
from /etc/httpd/modules/libphp7.so
#12 0x00007fffea5a0378 in ?? () from /etc/httpd/modules/libphp7.so
#13 0x00007fffea558fcb in execute_ex () from /etc/httpd/modules/libphp7.so
#14 0x00007fffea50b239 in dtrace_execute_ex ()
from /etc/httpd/modules/libphp7.so
#15 0x00007fffea5a2cef in zend_execute () from /etc/httpd/modules/libphp7.so
#16 0x00007fffea51af63 in zend_execute_scripts ()
from /etc/httpd/modules/libphp7.so
#17 0x00007fffea4bc3a8 in php_execute_script ()
from /etc/httpd/modules/libphp7.so
#18 0x00007fffea5a46ad in ?? () from /etc/httpd/modules/libphp7.so
#19 0x0000555555593270 in ap_run_handler ()
#20 0x00005555555937b9 in ap_invoke_handler ()
#21 0x00005555555a7b3a in ap_process_async_request ()
#22 0x00005555555a7e14 in ap_process_request ()
#23 0x00005555555a47a2 in ?? ()
#24 0x000055555559c840 in ap_run_process_connection ()
#25 0x00007fffeda1980f in ?? () from /etc/httpd/modules/mod_mpm_prefork.so
#26 0x00007fffeda19a0c in ?? () from /etc/httpd/modules/mod_mpm_prefork.so
#27 0x00007fffeda1a791 in ?? () from /etc/httpd/modules/mod_mpm_prefork.so
#28 0x00005555555795ae in ap_run_mpm ()
#29 0x0000555555572b36 in main ()
------------------------------------------------------------------------
[2016-02-15 19:03:42] nick dot saraniti at gmail dot com
Reproduced on Centos 7/ PHP 7 / Apache 2.4
------------------------------------------------------------------------
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
https://bugs.php.net/bug.php?id=71600
--
Edit this bug report at https://bugs.php.net/bug.php?id=71600&edit=1