Why debug sess.is in state of waiting for pipe when trigger on sys.err.exists on db?

Albert

Member²
Hi!
There is a trigger on system errors in the database. As consequence of it there is some troubles with integrated debugger. In many cases target session hangs up (realy it in the state of waiting for pipe at this time)
You can see here listing of calls to oci.dll from PL/SQL developer debug session at final steps:
Code:
DECLARE
   runtime_info   SYS.DBMS_DEBUG.runtime_info;
   sync_result    INTEGER;
BEGIN
   SYS.DBMS_DEBUG.default_timeout := :default_timeout;
   runtime_info.program.namespace := :program_namespace;
   runtime_info.program.NAME := :program_name;
   runtime_info.program.owner := :program_owner;
   runtime_info.program.dblink := :program_dblink;
   runtime_info.line# := :line#;
   runtime_info.TERMINATED := :TERMINATED;
   runtime_info.breakpoint := :breakpoint;
   runtime_info.stackdepth := :stackdepth;
   runtime_info.interpreterdepth := :interpreterdepth;
   runtime_info.reason := :reason;

   IF :do_sync = 1
   THEN
      sync_result :=
         SYS.DBMS_DEBUG.SYNCHRONIZE
                       (run_info            => runtime_info,
                        info_requested      =>   SYS.DBMS_DEBUG.info_getstackdepth
                                               + SYS.DBMS_DEBUG.info_getlineinfo
                                               + SYS.DBMS_DEBUG.info_getbreakpoint
                       );
   END IF;

   :cont_result :=
      SYS.DBMS_DEBUG.CONTINUE
                        (run_info            => runtime_info,
                         breakflags          => :breakflags,
                         info_requested      =>   SYS.DBMS_DEBUG.info_getstackdepth
                                                + SYS.DBMS_DEBUG.info_getlineinfo
                                                + SYS.DBMS_DEBUG.info_getbreakpoint
                        );
   :program_namespace := runtime_info.program.namespace;
   :program_name := runtime_info.program.NAME;
   :program_owner := runtime_info.program.owner;
   :program_dblink := runtime_info.program.dblink;
   :line# := runtime_info.line#;
   :TERMINATED := runtime_info.TERMINATED;
   :breakpoint := runtime_info.breakpoint;
   :stackdepth := runtime_info.stackdepth;
   :interpreterdepth := runtime_info.interpreterdepth;
   :reason := runtime_info.reason;
   SYS.DBMS_DEBUG.default_timeout := 3600;
END;
:PROGRAM_NAMESPACE = <NULL>
:PROGRAM_NAME = <NULL>
:PROGRAM_OWNER = <NULL>
:PROGRAM_DBLINK = <NULL>
:LINE# = <NULL>
:TERMINATED = 1
:BREAKPOINT = <NULL>
:STACKDEPTH = <NULL>
:INTERPRETERDEPTH = 0
:REASON = 25
:BREAKFLAGS = 12
:DEFAULT_TIMEOUT = 3600
:CONT_RESULT = 0
:DO_SYNC = 0
Execution time: 0 ms
----------------------------------
Timestamp: 11:53:30.312
DECLARE
   runtime_info   SYS.DBMS_DEBUG.runtime_info;
   sync_result    INTEGER;
BEGIN
   SYS.DBMS_DEBUG.default_timeout := :default_timeout;
   runtime_info.program.namespace := :program_namespace;
   runtime_info.program.NAME := :program_name;
   runtime_info.program.owner := :program_owner;
   runtime_info.program.dblink := :program_dblink;
   runtime_info.line# := :line#;
   runtime_info.TERMINATED := :TERMINATED;
   runtime_info.breakpoint := :breakpoint;
   runtime_info.stackdepth := :stackdepth;
   runtime_info.interpreterdepth := :interpreterdepth;
   runtime_info.reason := :reason;

   IF :do_sync = 1
   THEN
      sync_result :=
         SYS.DBMS_DEBUG.SYNCHRONIZE
                       (run_info            => runtime_info,
                        info_requested      =>   SYS.DBMS_DEBUG.info_getstackdepth
                                               + SYS.DBMS_DEBUG.info_getlineinfo
                                               + SYS.DBMS_DEBUG.info_getbreakpoint
                       );
   END IF;

   :cont_result :=
      SYS.DBMS_DEBUG.CONTINUE
                        (run_info            => runtime_info,
                         breakflags          => :breakflags,
                         info_requested      =>   SYS.DBMS_DEBUG.info_getstackdepth
                                                + SYS.DBMS_DEBUG.info_getlineinfo
                                                + SYS.DBMS_DEBUG.info_getbreakpoint
                        );
   :program_namespace := runtime_info.program.namespace;
   :program_name := runtime_info.program.NAME;
   :program_owner := runtime_info.program.owner;
   :program_dblink := runtime_info.program.dblink;
   :line# := runtime_info.line#;
   :TERMINATED := runtime_info.TERMINATED;
   :breakpoint := runtime_info.breakpoint;
   :stackdepth := runtime_info.stackdepth;
   :interpreterdepth := runtime_info.interpreterdepth;
   :reason := runtime_info.reason;
   SYS.DBMS_DEBUG.default_timeout := 3600;
END;
:PROGRAM_NAMESPACE = <NULL>
:PROGRAM_NAME = <NULL>
:PROGRAM_OWNER = <NULL>
:PROGRAM_DBLINK = <NULL>
:LINE# = <NULL>
:TERMINATED = 1
:BREAKPOINT = <NULL>
:STACKDEPTH = <NULL>
:INTERPRETERDEPTH = 0
:REASON = 25
:BREAKFLAGS = 2
:DEFAULT_TIMEOUT = 1
:CONT_RESULT = 0
:DO_SYNC = 1
Execution time: 0 ms
----------------------------------
Timestamp: 11:53:30.390
BEGIN
   SYS.DBMS_DEBUG.detach_session;
END;
Execution time: 0 ms
As you can see Interpreter has exited after first step (first Pl/SQL block). Then we try to do "step into" .Pl/SQL Developer give for this last synchronizing SMALL timeout time(1 sec) (may be due to this we have trouble here. Unfortunately we cant see the result of synchronisation (a value of "sync_result" variable). And the second variant. May be "Pl/Sql developer" doesn't wait for next Pl/SQL block that target session executes?
Thus target session is executing code and waiting for a command from debug session at a time when debug session is detuching.
I think that it is PL/SQL Developer (NOT Oracle) error
Thank you for great soft! :)
 
Back
Top