Oracle trace events hunting : dbgdChkEventIntV

Few days ago i published a blog post talking about write consistency & DML restart  . During my investigation i was interested in the function “dmltrace” and i noticed that this function was instrumented with the dbk*/dbg*  debug functions introduced in 11g.

Capture 151

The question is how to enable this tracing facility ?  Which events are checked by that function ?

We know how to extract the trace events number from the old ksdpec function (kernel service debug internal errors parser post event and check trigger condition using http://orafun.info/ of course 😀  ) thank to Dennis Yurichev see here and here. 

We also know how to extract it from dbkdChkEventRdbmsErr (DB kernel debug check event of RDBMS error) thanks to Yong Huang see here.

But here the function is instrumented differently !

Test env : oracle 18c/OEL6/UEK4

Armed with Intel pin tools “debugtrace.so”  and with the option “-instruction -memory” i started navigating the oracle code documentation :p

I found that many interesting stuffs are happening inside the functions “dbgfcsIlcsGetDefByName” and “dbgdChkEventIntV”  ! And based on that i created a mapping file dbgdChkEventIntV_event_list.txt !

Capture 11

Without going into detail here is the findings :

Let’s analyze the function “dmltrace” (showing only what’s necessary :p ) :

Capture 01

We are interested here into two function arguments passed to dbgdChkEventIntV into edx and ecx registry. Basically if edx= 0x1160001 then we can activate this event using the trace[]  event : Main event to control UTS tracing.

Capture 03

The value in ecx indicate which component to trace. in this case the component with id 0x2050049 ! which is :

Capture 02

That’s the one i used in my previous blog post !

Ok let’s try another one in function “qksqbRegister”

Capture 09

in this case edx=0x1160001 so we have to use the trace[] event ! Lets check which component in this case ecx=0x2050005 :

Capture 10

Ok let’s try another one in function “kslwtectx”

Capture 04

in this case edx=0x216000e

Capture 06

For that one we have to use the sql_trace event !

Another one !

Capture 07

in this case edx=0x2160002

Capture 08

And for this we have to use the wait_event[] !

This is not an exhaustive research and the mapping file is far from being complete but it may give some clue on where to start !

UPDATE 16/10/2018 : I updated the mapping file with more information

Download : dbgdChkEventIntV_event_list.txt

That’s it 😀

 

3 thoughts on “Oracle trace events hunting : dbgdChkEventIntV

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s