Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> end of infinite recursion in pl/sql?

end of infinite recursion in pl/sql?

From: bonminh lam <hansmayer1962_at_hotmail.com>
Date: 21 Jan 2003 02:18:40 -0800
Message-ID: <3c6b1bcf.0301210218.14fc6e34@posting.google.com>


During development of a pl/sql package I bumped into an interesting phenomena that should be familiar to those who had their lession in other high level programming language. I coded a a package like this:

package pck as
procedure proc(
  a number,
) as

begin

When I run a test procedure

begin
  pck.proc(1, 2);
end;

the associated server process entered an infinite loop. TOP shows its is using close to 100% CPU time (it was on a multiprocessor machine). Now the question is, if one does not get the DBA or Sys Admin to kill the process, would it ever finish or respectively abort? Or would it run forever until shutdown?

In other programming language, afik each recursive call uses up a chunk of memory on the stack and when the stack crashed into some boundaries, the process will abend. However does it work on Oracle? Where does Oracle create the stack and where could one find this stack growing? Would it run into some boundary eventually?

I am curious to what experience the community has made and is ready to share.

Thanks

Bon-Minh Lam Received on Tue Jan 21 2003 - 04:18:40 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US