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!

A killed session is still waiting for "library cache lock" for hours

Alessandro RossiNov 11 2008 — edited Nov 11 2008
Hello everybody

Today on my environment I killed a session while compiling a procedure that was taking too much time. Now, after more than a couple of hours that session is still there waiting for "library cache lock". I really can't understand why it's taking that much. Can anyone give me some hints about this. I already read the docs to find something to explain this case but I haven't been able to find the source of this lock.

Down here I past a description of what that procedure has been doing.
Processing ...
SELECT saddr, SID, command,taddr,lockwait,status,action
FROM v$session
WHERE SID = 636
Query finished, retrieving results...
      SADDR      SID     COMMAND         TADDR      LOCKWAIT   STATUS              ACTION
---------------- ------- --------- ---------------- -------- -------- -------------------
C00000023C7A2438     636        24 C000000238FB1650          KILLED   Main session       

1 row(s) retrieved

Processing ...
SELECT *
FROM v$session_wait
WHERE SID = 636
Query finished, retrieving results...
SID SEQ# EVENT               P1TEXT         P1                   P1RAW            P2TEXT       P2                   P2RAW            P3TEXT             P3  P3RAW            WAIT_CLASS_ID  WAIT_CLASS#   WAIT_CLASS   WAIT_TIME SECONDS_IN_WAIT  STATE
--- ---- ------------------- -------------- -------------------- ---------------- ------------ -------------------- ---------------- ------------------ --- ---------------- -------------- ------------- ------------ --------- --------------- -----------------
636 247  library cache lock  handle address 13835058063333980008 C0000001DFECF768 lock address 13835058064378433728 C00000021E2E10C0 100*mode+namespace 301 000000000000012D 3875070507     4             Concurrency  38        6089            WAITED KNOWN TIME

1 row(s) retrieved

Processing ...
select *
from v$session_event
where sid = 636

Query finished, retrieving results...
SID EVENT                         TOTAL_WAITS TOTAL_TIMEOUTS TIME_WAITED AVERAGE_WAIT MAX_WAIT TIME_WAITED_MICRO   EVENT_ID WAIT_CLASS_ID WAIT_CLASS# WAIT_CLASS 
--- ----------------------------- ----------- -------------- ----------- ------------ -------- ----------------- ---------- ------------- ----------- ----------- 
636 db file sequential read                 3              0           4          1,5        3             44994 2652584166    1740759767           8  User I/O   
636 library cache lock                     58             57       16737       288,56      293         167366653  916468430    3875070507           4  Concurrency
636 SQL*Net message to client              94              0           0            0        0                46 2067390145    2000153315           7  Network    
636 SQL*Net more data to client            25              0           0            0        0               294  554161347    2000153315           7  Network    
636 SQL*Net message from client            94              0        2848         30,3     2246          28480966 1421975091    2723168908           6  Idle       
636 SQL*Net more data from client          28              0           0         0,02        0              4471 3530226808    2000153315           7  Network    
636 SQL*Net break/reset to client           2              0           0         0,01        0               194 1963888671    4217450380           1  Application
                                                                                                                                                       
7 row(s) retrieved                            
Thanks
Bye Alessandro

Edited by: Alessandro Rossi on 11-nov-2008 11.37
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Dec 9 2008
Added on Nov 11 2008
6 comments
1,235 views