2 Replies Latest reply on Oct 20, 2011 12:10 AM by "Oracle, Sandra Whitman-Oracle"

    suspicious db_stat output

    689065
      Is this db_stat output lock statistics OK for a CDS environment?


      Lock conflict matrix:
      =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
      Locks grouped by lockers:
      Locker Mode Count Status ----------------- Object ---------------
      1 dd= 0 locks held 1 write locks 0 pid/thread 23158/1 priority 100
      1 READ 1 HELD (26 40030001 27c4f418 e1616 0) handle 0
      2 dd= 0 locks held 0 write locks 0 pid/thread 23158/1 priority 100
      =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
      Locks grouped by object:
      Locker Mode Count Status ----------------- Object ---------------
      1 READ 1 HELD (26 40030001 27c4f418 e1616 0) handle 0

      What do the handle id's represent under the object column?

      In a TDS environment we see db file names under the Object column.
        • 1. Re: suspicious db_stat output
          689065
          Tried running the example in ex_thread.c by changing the environment to a CDS environment and turning all transaction related stuff off.
          db_stat gives a similar output. Why are the Object/Handles displaying information that looks like garbage (highlighted in bold). Does this point to any kind of corruption in the DB environment?

          Any help will be appreciated.

          Output from db_stat -CA

          =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
          Lock conflict matrix:
          =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
          Locks grouped by lockers:
          Locker Mode Count Status ----------------- Object ---------------
          1 dd= 3 locks held 2 write locks 0 pid/thread 25778/1 priority 100
          1 READ 1 HELD *(fd211 400000b 3c8e2a1b 64b2 0)* handle 2
          1 READ 1 HELD *(fd211 400000b 3c8e2a1b 64b2 0)* handle 0
          4 dd= 2 locks held 0 write locks 0 pid/thread 25778/2 priority 100
          5 dd= 1 locks held 1 write locks 0 pid/thread 25778/3 priority 100
          5 READ 1 FREE *0x1c6b0 len: 20 data: 000fd2110400000b3c8e2a1b000064b200000000*
          6 dd= 0 locks held 0 write locks 0 pid/thread 25778/2 priority 100
          6 WRITE 1 HELD 0x1c6b0 len: 20 data: 000fd2110400000b3c8e2a1b000064b200000000
          =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
          Locks grouped by object:
          Locker Mode Count Status ----------------- Object ---------------
          5 READ 1 PENDING 0x1c6b0 len: 20 data: 000fd2110400000b3c8e2a1b000064b200000000
          4 READ 1 HELD 0x1c6b0 len: 20 data: 000fd2110400000b3c8e2a1b000064b200000000

          1 READ 1 HELD (fd211 400000b 3c8e2a1b 64b2 0) handle 2

          1 READ 1 HELD (fd211 400000b 3c8e2a1b 64b2 0) handle 0
          • 2. Re: suspicious db_stat output
            "Oracle, Sandra Whitman-Oracle"
            Hello,

            The db_stat output you are seeing for a CDS environment which
            looks like:
            1 READ 1 HELD (26 40030001 27c4f418 e1616 0) handle 0

            is expected.

            Note that with CDS locking is performed on an entire database (or
            on an entire environment if DB_CDB_ALLDB is set). What you are seeing
            in the output (26 40030001 27c4f418 e1616 0) is the identifier for
            the database handle 0. In BDB 5.2.36 for example you can see the
            output in lock/lock_stat.c/__lock_printlock

            if (fname == NULL && dname == NULL)
            __db_msgadd(env, mbp, "(%lx %lx %lx %lx %lx) ",
            (u_long)fidp[0], (u_long)fidp[1], (u_long)fidp[2],
            (u_long)fidp[3], (u_long)fidp[4]);


            where the identifier for the object locked, the db handle, is printed.

            Thanks,
            Sandra