Oracle 12.1.0.2 on Exadata
I am investigating library cache contention in a busy data warehouse. Looking at V$ACTIVE_SESSION_HISTORY, I found sessions stuck on "library cache lock" for several minutes, but the object referenced by CURRENT_OBJ# is not used in the sampled SQL.
Does this mean the session is being blocked on an object it doesn't need to access, or is the sampled data is incorrect (perhaps showing a stale value from a previous event)?
I note that CURRENT_OBJ# does not feature in V$SESSION, so presumably this is resolved at the time of sampling, perhaps via P1RAW?