php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #21203 Php Warning: 'OCI8 Recursive call!'
Submitted: 2002-12-26 16:09 UTC Modified: 2002-12-26 16:50 UTC
From: ldixon at mail dot communityconnect dot com Assigned:
Status: Not a bug Package: OCI8 related
PHP Version: 4.2.2 OS: Linux 2.2
Private report: No CVE-ID: None
 [2002-12-26 16:09 UTC] ldixon at mail dot communityconnect dot com
This error is referenced in a closed bug (Bug #15198) which I was unable to get a response from.  I have more information on it, and am seeking alternative handling other than having the apache process completely exit().

-----

I've narrowed down a cause of this error to a lockwait on one or more
rows that a query is trying to modify.  This is the simplest way to
reproduce:

1) in sqlplus: update table_name set column_2 = column_2_val where
column_1 = column_1_val; (do not commit)
2) run the same query from php
3) immediately run this query from another session (a client with a GUI
is best for viewing results of this query).  Pay attention to the
lockwait column, it will not be null:

select
	count(*) instances,
	se.machine,
	se.osuser,
	sa.executions,
	se.lockwait,
	sa.sql_text
from
	v$sqlarea sa,
	v$session se
where
	sa.address = se.sql_address
and
	sa.hash_value = se.sql_hash_value
and
	sa.executions > 0
and
	se.status = 'ACTIVE'
group by
	se.machine,
	se.osuser,
	sa.executions,
	se.lockwait,
	sa.sql_text
order by instances desc;

4) after a while your php script will come back with OCI8 Recursive
call!
5) don't forget to rollback your update in sqlplus!

This is the most simple scenario causing the bug.  The problem also
happens on queries I use that operate (DML) on the same data and take a
while.  Possible causes of this are users clicking multiple times on
links to pages that execute DML queries.  However, sometimes I get this
error when there is only one query with a non-null lockwait value.. very
strange.

I've tried registering shutdown functions and wrapping the queries that
most often produce this error with checks on connection_status() to
prevent running the query if user has abandoned the request.  None of
these measures have helped the problem.

It's disturbing that the entire apache process has to die because of
this.  Any suggestions are welome.

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2002-12-26 16:14 UTC] derick@php.net
Please do not submit the same bug more than once. An existing
bug report already describes this very problem. Even if you feel
that your issue is somewhat different, the resolution is likely
to be the same. Because of this, we hope you add your comments
to the existing bug instead.

Thank you for your interest in PHP.
 [2002-12-26 16:34 UTC] ldixon at mail dot communityconnect dot com
I posted to the other bug your referring to 3 weeks ago and got no response.  It was already closed due to lack of information, and no resolution was ever given.  I've searched the bug database and found no solution for linux.
 [2002-12-26 16:34 UTC] derick@php.net
Didn't I just mail you to re-open the older one?

Please keep this one closed and add your comments to the older bug report.

Derick
 [2002-12-26 16:42 UTC] ldixon at mail dot communityconnect dot com
1) I already did post the exact comments to the other one 3 weeks ago and got no response because it's closed
2) I didn't create the other bug report so I can't update the status because I don't have the password
 [2002-12-26 16:50 UTC] derick@php.net
thick-skulled today?

leave this one as bogus.
 [2002-12-26 18:33 UTC] kkk at b2b dot se
Derick sucks
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Tue May 07 21:01:30 2024 UTC