[oci8] bug #33915 (segfault in _oci_close_session) with fix
| From: | BUSTARRET, Jean-Francois | Date: | Fri, 29 Jul 2005 14:54:31 +0000 |
| Subject: | [oci8] bug #33915 (segfault in _oci_close_session) with fix | ||
| Groups: | php.internals | ||
| Request: | Send a blank email to internals+get-17465@lists.php.net to get a copy of this message | ||
I have quite a few segfaults on my production servers.
The crashes occur on :
#0 0xb78f3779 in _oci_close_session (session=0x8382a20)
at /soft/sources/php/php-5.0.4/ext/oci8/oci8.c:2961
2961 CALL_OCI_RETURN(OCI(error),
where
(gdb) print *session
$1 = {num = 137800016, persistent = 0 '\0', is_open = 253 'ý',
exclusive = 49 '1', thread = 8 '\b', sessions_list = 0x0, server = 0x0,
pSession = 0x0, pEnv = 0x0, charsetId = 0}
At the same time, I have :
[29-Jul-2005 07:57:41] PHP Warning: Unknown: _oci_close_session OCIHandleAlloc OCI_HTYPE_SVCCTX:
OCI_INVALID_HANDLE in Unknown on line 0
I use my oci8 ping_freq patch (http://www.jeuxdecartes.net/static/oci8.ping_freq.patch) - that
explains the line numbering difference.
(more info on http://bugs.php.net/bug.php?id=33915)
This small fix corrects the crash (there could be a problem somewhere else - why do I have a session
without a server ?) :
--- php-5.0.4/ext/oci8/oci8.c 2005-07-29 08:13:21.829128377 +0200
+++ php-5.0.4-orig/ext/oci8.fromcvs/oci8.c 2005-07-15 14:56:42.000000000 +0200
@@ -2939,10 +2924,6 @@
return;
}
+ /* JFBustarret - fix for bug #33915 */
+ if (!session->server) {
+ return;
+ }
+
oci_debug("START _oci_close_session: logging-off sess=%d",session->num);
if (session->is_open) {
I updated my ping_freq patch with the fix at :
http://www.jeuxdecartes.net/static/oci8.ping_freq.new.patch
Jean-François Bustarret
eTF1 - Architecte
-------------------------------------
Le present message (y compris tous les elements attaches) est confidentiel et est destine a ses
seuls destinataires. Si vous
l'avez recu par erreur, merci de l'indiquer a son expediteur par retour et de proceder a
sa destruction dans vos systemes.
Toute utilisation ou diffusion non autorisee de son contenu, en totalite ou en partie, est
strictement interdite. Les idees et
opinions presentees dans ce message sont celles de son auteur, et ne representent pas necessairement
celles de TF1 (et/ou des
entites membres du Groupe TF1).
This message (including any attachments) is confidential and may be privileged. If you have received
it by mistake please notify
the sender by return email and delete this message from your system. Any unauthorised use or
dissemination of this message in
whole or in part is strictly prohibited. Any views or opinions presented are solely those of its
author and do not necessarily
represent those of TF1 (and/or its group companies).