Re: deadlock

From: Jonathan Lewis <jonathan_at_jlcomp.demon.co.uk>
Date: Wed, 27 Mar 2013 21:24:19 -0000
Message-ID: <ED7696C4EDA6498FA8B6BBA0C65808F2_at_Primary>


| Show of hands: who thinks it is good development to lock a table on a
| select and then allow Oracle to terminate one of the sessions??

The table isn't being locked, or we'd see a TM lock in the lock graph - nevertheless it is not a good idea to design code without trying rather hard to avoid deadlocks. Since the user application code received the deadlock message, presumably it has some method of hiding the error ORA-00060 from the user, otherwise there would be complaints about errors rather than slowness. If that's the case then:

| program: ORACLE.EXE (J000)
|

since the other program (the one that didn't get a statement rolled back by Oracle) in this case is from the job queue, we should be worried that (a) one day the job will be the unlucky one, and jobs are sometimes major batch operations that take a long time to run and just as long to roll back; and (b) maybe the user code hides the error the user by re-trying, and has to keep deadlocking until the job completes.

Regards

Jonathan Lewis
http://jonathanlewis.wordpress.com/all-postings

Author: Oracle Core (Apress 2011)
http://www.apress.com/9781430239543

  • Original Message ----- From: "Barbara Baker" <barb.baker_at_gmail.com> To: "ORACLE-L" <oracle-l_at_freelists.org> Sent: Wednesday, March 27, 2013 6:43 PM Subject: deadlock

| 10.2.0.1.1 database on windows. Response is slow. Application seems to
be
| a piece of crap.
| I set trace on for his session, and he re-enacted the "slowness"
| Details of the deadlock are below. After I traced the session and
| explained to the developer that his code created a deadlock when it
should
| not have, here's what I got back from him:
| Barb,****
|
| ** **
|

--
http://www.freelists.org/webpage/oracle-l
Received on Wed Mar 27 2013 - 22:24:19 CET

Original text of this message