Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Deadlock question

Deadlock question

From: Jan Gelbrich <j_gelbrich_at_westfalen-blatt.de>
Date: Thu, 23 Jan 2003 13:51:57 +0100
Message-ID: <b0oojc$rvm56$1@ID-152732.news.dfncis.de>


Hello, this time I would like to ask what I might be missing about deadlocks:

This was fascinating: deadlock occurring while trying to truncate a table
while nobody is locking anything at all
(as could be seen in v$session and v$locks by using HORA and my own scripts
too)

The funny event was this:

A Developer of our team called me saying he has a deadlock. I should try his task in SQL*Plus

I am user NORMAL_USER:

(messages in German, sorry, but ORA-* should be clear)

SQL> truncate table testtimes_advertizements; truncate table testtimes_advertizements

               *
FEHLER in Zeile 1:
ORA-04020: Deadlock festgestellt beim Versuch, Objekt 310161426609561345801008232312 zu sperren
(=failed)

... so I am having same problem as him ...

... then I connect as a "masteruser" who has DBA-Role and a bunch of other privs ...

SQL> connect MASTERMIND/MASTERMIND
Connect durchgeführt.

SQL> truncate table testtimes_advertizements;

Tabelle mit TRUNCATE geleert.
(=successful)

Hmmmmmmmmmmmmmmm .... reconnecting as NORMAL_USER, having no clue what was this ...

What is so strange about all this is:
All the time I had been looking at all sessions, trying to find out who has locked something to cause that deadlock, and *there was no locking whatsoever by anyone* !

I must be missing some kind of information about deadlocks, concerning priviliges and/or roles,
because before this I thought, deadlocks are just a result of trying cross-over locking.

The table that was to be truncated was owned by MASTERMIND and had a public synonym. afaik all privs to truncate were granted to NORMAL_USER. I could understand that there maybe problems when having privs not set properly, but I would never expect a *deadlock* in this context ...

Has anybody here ever observed something like this ?

I would appreciate any comments.

Jan

--

My system:
Oracle EE 8.1.7 on AIX 4.3.3
with Windows Clients
Received on Thu Jan 23 2003 - 06:51:57 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US