Discussions
Categories
- 197.1K All Categories
- 2.5K Data
- 546 Big Data Appliance
- 1.9K Data Science
- 450.7K Databases
- 221.9K General Database Discussions
- 3.8K Java and JavaScript in the Database
- 31 Multilingual Engine
- 552 MySQL Community Space
- 479 NoSQL Database
- 7.9K Oracle Database Express Edition (XE)
- 3.1K ORDS, SODA & JSON in the Database
- 555 SQLcl
- 4K SQL Developer Data Modeler
- 187.2K SQL & PL/SQL
- 21.3K SQL Developer
- 296.3K Development
- 17 Developer Projects
- 139 Programming Languages
- 293K Development Tools
- 110 DevOps
- 3.1K QA/Testing
- 646.1K Java
- 28 Java Learning Subscription
- 37K Database Connectivity
- 158 Java Community Process
- 105 Java 25
- 22.1K Java APIs
- 138.2K Java Development Tools
- 165.3K Java EE (Java Enterprise Edition)
- 19 Java Essentials
- 162 Java 8 Questions
- 86K Java Programming
- 81 Java Puzzle Ball
- 65.1K New To Java
- 1.7K Training / Learning / Certification
- 13.8K Java HotSpot Virtual Machine
- 94.3K Java SE
- 13.8K Java Security
- 204 Java User Groups
- 24 JavaScript - Nashorn
- Programs
- 466 LiveLabs
- 39 Workshops
- 10.2K Software
- 6.7K Berkeley DB Family
- 3.5K JHeadstart
- 5.7K Other Languages
- 2.3K Chinese
- 175 Deutsche Oracle Community
- 1.1K Español
- 1.9K Japanese
- 233 Portuguese
SIGSEGV on Instantclient 12.2+ (18.5, 19.6) with OCI8-2.2.0

Hello.
I'm facing strange problems with 19.6. instant client and OCI8 2.2.0 + PHP 7.2.24 on OL7 x86-64, but the same can be produced with 12.2+ instantclient. Some SQL called from php are failing due to instantclient SIGSEGV :
oci-24550 [11] [[si_signo=11] [si_errno=0] [si_code=1] [si_int=381] [si_ptr=0x17d] [si_addr=0xffffffef]] [] [] [] [] [] [] [] [] [] []
Shortstack:
php_execute_script()+736 -> zend_execute_scripts()+195 -> zend_execute()+307 -> execute_ex()+394 -> zif_oci_execute()+106 oci8_interface.c:1405 -> php_oci_statement_execute()+194 oci8_statement.c:556 -> OCIStmtExecute()+41 -> kpuexec()+10079 -> kpurcsc()+100 -> upirtrc()+1522 -> nioqwa()+61 -> ttcdrv()+1315 -> ttcacs()+2581 -> ttcGetSendInfo()+1009 -> __intel_ssse3_rep_memcpy()+6710 [SIGSEGV]
Has anyone faced this problem?
With 12.1.0.2 instant client is all OK.
Best Regards,
Stanislav
Comments
-
I haven't seen it. Do you have any trace files in some oradiag_xxxx directory? I generally set the log directory by adding something like this to my sqlnet.ora file:
adr_base=/tmp/mylogs
and then run 'mkdir /tmp/mylogs' before running my application
Does it happen on multiple machines?
Do you have a complete, runnable test case that you can share?
-
Hi.
Sure, I'll provide all detailed traces from instantclient's SIGSEGV handler.
I'm working on reproducible (minimal) testcase.
All our web cluster machines are affected.
Stanislav
-
Traces are here : https://drive.google.com/file/d/1w3yW8WbS7VLkAxv23m0OfwxSmmz21XG2/view?usp=sharing
Regards,
Stanislav
-
What's the PHP configuration? Do you have a reproducible test case?
-
Hi.
Phpinfo here : https://drive.google.com/file/d/1cpwdNarX4AR6ejKE2BBT1AvzBhPmbHAx/view?usp=sharing
I'm still working on reproductible and public testcase. Codebase is quite big and I need to minimize to be as small as possible. Running simple single SQL (which is failing) is not sufficient, because it doesn't reproduce problem. It looks like several conditions must be met and also identified to provide successfull testcase.
Regards,
Stanislav
-
Try over php 7.1, may be issue with the compatibility. as its working fine with php 7.1 so Downgrade PHP 7.2 to 7.1
-
Okay, after some time of settling down here is the testcase. Actually it's about binding NULL.
It will SIGSEGV all clients (instant and full) from version 12.2. to 21.1.
Reported in SR 3-25065306931 : 19.9. Instantclient SIGSEGV (__intel_ssse3_rep_memcpy) @ libclntsh.so.19.1
putenv("ORACLE_BASE=/u01/app/oracle");
putenv("LD_LIBRARY_PATH=/u01/app/oracle/client/lib:/usr/lib:/lib");
putenv("ORACLE_HOME=/u01/app/oracle/client");
putenv("NLS_LANG=AMERICAN_AMERICA.AL32UTF8");
putenv("NLS_SORT=BINARY");
putenv("TNS_ADMIN=/u01/app/oracle/client/network/admin");
putenv("ORA_CLIENTTRACE_DIR=/tmp");
putenv("EVENT_10842=server=all;user=W3;stmt=all;level=15");
$per_id = null;
$sql = "SELECT count(*) FROM dual WHERE (:p_per_id IS NULL OR X = :p_per_id) AND :p_right_level_code = 'RA'";
$bax = array(
'p_per_id' => $per_id
,'p_right_level_code' => 'RA'
);
$connection = oci_pconnect('DB_USERNAME', 'DB_PASSWORD', 'POOLED_DB_DSN', 'AL32UTF8');
if ($connection === false) {
if (isset($connection)) {
$error = oci_error($connection);
} else {
$error = oci_error();
}
die("ERROR connection : $error");
}
$ociStatement = oci_parse($connection, $sql);
if ($ociStatement === false) {
$error = oci_error($connection);
oci_close($connection);
$connection = null;
die("oci_prepare error: $error");
}
foreach ($bax as $param => &$value) {
if (!oci_bind_by_name($ociStatement, $param, $value, -1, SQLT_CHR )) {
$error = oci_error($ociStatement);
oci_free_statement($ociStatement);
oci_close($connection);
$connection = null;
die("oci_bin_by_name error: $error");
}
}
if (!oci_execute($ociStatement, OCI_NO_AUTO_COMMIT)) {
$error = oci_error($ociStatement);
oci_free_statement($ociStatement);
oci_close($connection);
$connection = null;
die("oci_execute error: $error");
}
oci_free_statement($ociStatement);
oci_close($connection);
$connection = null;
-
Failing stacktrace is always :
#0 0x00007f6fc9838fe6 __intel_ssse3_rep_memcpy (libclntsh.so.21.1)
#1 0x00007f6fca180a66 ttcGetSendInfo (libclntsh.so.21.1)
#2 0x00007f6fcb93ee6f ttcacs (libclntsh.so.21.1)
#3 0x00007f6fcb93fb75 ttcdrv (libclntsh.so.21.1)
#4 0x00007f6fcb90c1bd nioqwa (libclntsh.so.21.1)
#5 0x00007f6fcb8de645 upirtrc (libclntsh.so.21.1)
#6 0x00007f6fcb8f14c1 kpurcsc (libclntsh.so.21.1)
#7 0x00007f6fcb8e2d3b kpuexec (libclntsh.so.21.1)
#8 0x00007f6fcb8ddd69 OCIStmtExecute (libclntsh.so.21.1)
-
PHP 7.2 + OCI8 2.2.0
-
- Don't set Oracle environment variables in the script. Behavior can be undefined, e.g. https://stackoverflow.com/questions/66006203/php-putenv-return-inconsistent-value/66017553#66017553
- LD_LIBRARY_PATH is not read after the process starts on Linux. Make sure you really have a clean environment.
- Your SQL statement gives: PHP Warning: oci_execute(): ORA-00904: "X": invalid identifier
- If I change the SQL to use 'X' I don't see any crash with Instant Client 21.1 on Linux - and a fetch returns 1.