My Oracle Support Banner

Many sessions hang waiting for 'library cache lock' While the blocker is in 'Not in wait' status due to many "OR" operator in SQL statement (Doc ID 1640255.1)

Last updated on DECEMBER 20, 2022

Applies to:

Oracle Database - Enterprise Edition - Version 11.2.0.1 and later
Oracle Database Cloud Schema Service - Version N/A and later
Oracle Database Exadata Cloud Machine - Version N/A and later
Oracle Cloud Infrastructure - Database Service - Version N/A and later
Oracle Database Backup Service - Version N/A and later
Information in this document applies to any platform.

Symptoms

On one of the instance in a RAC Active Dataguard cluster, many sessions hang waiting for 'library cache lock' while the blocker is in 'Not in wait' status. Despite many sessions hanging, the managed recovery continues to apply logs. This lasts for hours until the instance is shutdown to resolve the hang. (Please note, this issue is not specific to Active DataGuard or RAC).

System state dump shows:

*** ACTION NAME:() 2014-03-07 06:16:06.026
PROCESS 30: LGWR   <<< one of the waiter
    0: waiting for 'library cache lock'
       handle address=0x1b8ee2b5a8, lock address=0x1b7fc1e9d8, 100*mode+namespace=0x1004a0003
       wait_id=284267742 seq_num=42688 snap_id=1
       wait times: snap=158 min 15 sec, exc=158 min 15 sec, total=158 min 15 sec

    There is at least one session blocking this session.
      Dumping 1 direct blocker(s):
        inst: 1, sid: 11281, ser: 37241
      Dumping final blocker:
        inst: 1, sid: 11281, ser: 37241
    There are 25 sessions blocked by this session.

PROCESS 60:        <<< holder  

   OSD pid info: Unix process pid: 8684, image: oracle@h121580dcss3001
   (session) sid: 11281 ser: 37241 trans: (nil), creator: 0x1bd28e6fd8

    client details:
      O/S info: user: orauser, term: unknown, ospid: 4232
      machine: CLINODE program: SQL Developer
      application name: SQL Developer, hash value=1012150930
    Current Wait Stack:
      Not in wait; last wait ended 158 min 25 sec ago
    There are 26 sessions blocked by this session.
    Dumping one waiter:
      inst: 1, sid: 5641, ser: 1
      wait event: 'library cache lock'
        p1: 'handle address'=0x1b8ee2b5a8
        p2: 'lock address'=0x1b7fc1e9d8
        p3: '100*mode+namespace'=0x1004a0003
      row_wait_obj#: 4294967295, block#: 0, row#: 0, file# 0
      min_blocked_time: 9462 secs, waiter_cache_ver: 47343

 The stack trace for the holder PROCESS 60 is:

ksedsts()+461<-ksdxfstk()+32<-ksdxcb()+1876<-sspuser()+112<-__sighandler()<-kghalf()+247<-kghalp()+89<-qcopCreateOpt()+240<-qkebCreateOptWithArgs()+145<-apanlg()+171<-apanlg()+243<-apanlg()+61<-apanlg()+61<-apanlg()+61<-apanlg()+61<-apanlg()+61<-apanlg()+6......
<<< repeated apanlg stack

Cause

To view full details, sign in with your My Oracle Support account.

Don't have a My Oracle Support account? Click to get started!


In this Document
Symptoms
Cause
Solution
References


My Oracle Support provides customers with access to over a million knowledge articles and a vibrant support community of peers and Oracle experts.