#22929 [Csd->Opn]: pb of exit handler in OCI8 module

From: Date: Thu, 08 May 2003 19:16:51 +0000
Subject: #22929 [Csd->Opn]: pb of exit handler in OCI8 module
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-39332@lists.php.net to get a copy of this message
ID: 22929 User updated by: soula at lifl dot fr Reported By: soula at lifl dot fr -Status: Closed +Status: Open Bug Type: OCI8 related Operating System: tru64 PHP Version: 4.3.2RC1 New Comment: Sorry for late answer... I have just tested the version "php4-STABLE-200305060930" and it seems that the bug is already here : The crash backtrace is : Core file created by program "php" thread 0xb signal Segmentation fault at warning: PC value 0x30003737d60 not valid, trying RA > [exit, 0x3ff800d8850] ldq t0, 8(s0) (dbx) where 0 exit(0x1, 0x0, 0x120195b64, 0x0, 0x120195b50) [0x3ff800d8850] 1 main(argc = 3, argv = 0x11fffc018) ["/usr/local/tmp/php4-STABLE-200305060930/sapi/cli/php_cli.c":853, 0x120195b60] whereas, during the script, the faulty address "0x30003737d60" is well defined : (dbx) 0x30003737d60/i [epc_exit_handler:692, 0x30003737d60] ldah gp, 16387(t12) PS : At the other side, the OCI_SHARED flag now works well. Sincerly, -- Julien Previous Comments: ------------------------------------------------------------------------ [2003-04-21 09:19:25] sniper@php.net This bug has been fixed in CVS. In case this was a PHP problem, 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/. In case this was a documentation problem, the fix will show up soon at http://www.php.net/manual/. In case this was a PHP.net website problem, the change will show up on the PHP.net site and on the mirror sites in short time. Thank you for the report, and for helping us make PHP better. ------------------------------------------------------------------------ [2003-04-10 13:05:08] michael dot mauch at gmx dot de php4-STABLE-200304101530 works fine for me on Linux and on Tru64 5.1. No core dump anymore (and the OCI_SHARED problem is also fixed). ------------------------------------------------------------------------ [2003-04-09 16:47:15] sniper@php.net Please try using this CVS snapshot: http://snaps.php.net/php4-STABLE-latest.tar.gz For Windows: http://snaps.php.net/win32/php4-win32-STABLE-latest.zip ------------------------------------------------------------------------ [2003-03-27 12:14:44] michael dot mauch at gmx dot de Yes, I see this too on Linux (latest CVS with #undef HAVE_OCI8_SHARED_MODE in oci8.c). # php -r 'if(!extension_loaded("oci8")) dl("oci8.so"); print_r(ocilogon("user","pw"));' Resource id #6zsh: segmentation fault (core dumped) php -r ------------------------------------------------------------------------ [2003-03-27 09:45:46] soula at lifl dot fr I use php4-STABLE-200303241630 version, Oracle-8.1.7 and Tru64/5.1 . Note: For technical reason, we have clear the OCI_SHARED in the OCI8 initialize call (cf. #22927) The Oracle client (libclntsh.so) set a exit handler via "atexit()" when we connect DB. But PHP unload the module and le library before exiting and so the handler doesn't exist any more and cause a SIGSEGV. The solution we found is either commenting the "dlclose()" in zend_API.c or compiling OCI8 module in static. Here the compilation config : Configure Command => './configure' '--prefix=/usr/local/php-200303241630-ap1' '--enable-memory-limit' '--enable-shared' '--enable-sockets' '--enable-trans-sid' '--enable-debug' '--with-config-file-path=/usr/local/lib' '--with-apxs=/usr/local/apache/bin/apxs' '--enable-debugger=yes' '--enable-safe-mode' '--with-exec-dir=/usr/bin' '--with-mod_charset' '--with-openssl' '--with-bz2' '--with-zlib-dir' '--with-gettext' '--with-kerberos' '--with-regex=system' '--with-zlib' '--with-gd=shared' '--with-jpeg-dir=/usr/local/jpeg/lib' '--with-png-dir=/usr/local/lib' '--with-xpm-dir=/usr/local/lib' '--with-oci8=shared,/usr/oracle/product/8.1.6' '--with-ldap=shared' '--with-mysql=shared,/usr/local/mysql' '--with-pgsql=shared,/usr/local/pgsql' Sincerly, -- Julien ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=22929&edit=1

« previous php.bugs (#39332) next »