Skip to Main Content

Oracle Database Discussions

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

how to stop infinite call with recursive procedure

Mustafa KALAYCIFeb 27 2018 — edited Feb 28 2018

Hi All,

One of the developers has written a very very bad code like:

(!!!!PLEASE DON'T RUN THIS CODE!!!!)

Declare

  procedure do_something as

  begin

    do_something;

  end;

 

  x number;

begin

  x := utl_ctp.open_connection('some ip address for email server here',25);

  do_something

 

end;

/

I wrote the code with a missing semicolon to prevent you running code by mistake.

now this code open a connection to mail server and then starts to call do_something procedure infinitely. this session's wait event is "TCP Socket (KGAS)". now when I run alter session kill immediate, Oracle tells me that session is marked to kill. Probably Oracle waits session to complete it's job but it won't and session is just running forever. How can I stop this session?

thanks.

db version: 11.2.0.4

This post has been answered by GregV on Feb 27 2018
Jump to Answer
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Mar 28 2018
Added on Feb 27 2018
17 comments
1,452 views