87 lines
5.7 KiB
HTML
87 lines
5.7 KiB
HTML
|
<?xml version="1.0" encoding="UTF-8"?>
|
||
|
<!DOCTYPE html
|
||
|
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||
|
<html lang="en-us" xml:lang="en-us">
|
||
|
<head>
|
||
|
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||
|
<meta name="security" content="public" />
|
||
|
<meta name="Robots" content="index,follow" />
|
||
|
<meta http-equiv="PICS-Label" content='(PICS-1.1 "http://www.icra.org/ratingsv02.html" l gen true r (cz 1 lz 1 nz 1 oz 1 vz 1) "http://www.rsac.org/ratingsv01.html" l gen true r (n 0 s 0 v 0 l 0) "http://www.classify.org/safesurf/" l gen true r (SS~~000 1))' />
|
||
|
<meta name="DC.Type" content="task" />
|
||
|
<meta name="DC.Title" content="Detect deadlocks" />
|
||
|
<meta name="abstract" content="Find deadlock conditions by using these instructions." />
|
||
|
<meta name="description" content="Find deadlock conditions by using these instructions." />
|
||
|
<meta name="DC.Relation" scheme="URI" content="rzakjtrouble.htm" />
|
||
|
<meta name="DC.Relation" scheme="URI" content="rzakjminimizelock.htm" />
|
||
|
<meta name="DC.Relation" scheme="URI" content="../rzaks/rzaksdetstatjob.htm" />
|
||
|
<meta name="DC.Relation" scheme="URI" content="rzakjdsplock.htm" />
|
||
|
<meta name="DC.Relation" scheme="URI" content="rzakjdspjob.htm" />
|
||
|
<meta name="DC.Relation" scheme="URI" content="rzakjdspstatus.htm" />
|
||
|
<meta name="DC.Relation" scheme="URI" content="../cl/rtvjrne.htm" />
|
||
|
<meta name="DC.Relation" scheme="URI" content="rzakjheuristic.htm" />
|
||
|
<meta name="copyright" content="(C) Copyright IBM Corporation 2004, 2006" />
|
||
|
<meta name="DC.Rights.Owner" content="(C) Copyright IBM Corporation 2004, 2006" />
|
||
|
<meta name="DC.Format" content="XHTML" />
|
||
|
<meta name="DC.Identifier" content="rzakjdeadlocks" />
|
||
|
<meta name="DC.Language" content="en-us" />
|
||
|
<!-- All rights reserved. Licensed Materials Property of IBM -->
|
||
|
<!-- US Government Users Restricted Rights -->
|
||
|
<!-- Use, duplication or disclosure restricted by -->
|
||
|
<!-- GSA ADP Schedule Contract with IBM Corp. -->
|
||
|
<link rel="stylesheet" type="text/css" href="./ibmdita.css" />
|
||
|
<link rel="stylesheet" type="text/css" href="./ic.css" />
|
||
|
<title>Detect deadlocks</title>
|
||
|
</head>
|
||
|
<body id="rzakjdeadlocks"><a name="rzakjdeadlocks"><!-- --></a>
|
||
|
<!-- Java sync-link --><script language="Javascript" src="../rzahg/synch.js" type="text/javascript"></script>
|
||
|
<h1 class="topictitle1">Detect deadlocks</h1>
|
||
|
<div><p>Find deadlock conditions by using these instructions.</p>
|
||
|
<div class="section"><p>A deadlock condition can occur when a job holds a lock on an object,
|
||
|
object A, and is waiting to obtain a lock on another object, object B. At
|
||
|
the same time, another job or transaction currently holds a lock on object
|
||
|
B and is waiting to obtain a lock on object A.</p>
|
||
|
<p>Do the following steps
|
||
|
to find out if a deadlock condition has occurred and fix it if it has:</p>
|
||
|
</div>
|
||
|
<ol><li><span>Locate the suspended job in the list of active jobs.</span></li>
|
||
|
<li><span>Look at the objects the job is waiting to lock.</span></li>
|
||
|
<li><span>For all the objects the job is waiting to lock, look at the list
|
||
|
of lock holders (transactions or jobs) and try to find a conflicting lock
|
||
|
corresponding to the level requested by the suspended job.</span></li>
|
||
|
<li><span>If a transaction is holding a conflicting lock, display the jobs
|
||
|
associated with this transaction and see if one of them is waiting to lock.</span></li>
|
||
|
<li><span>Determine if this waiting job is trying to lock one of the objects
|
||
|
locked by the initial suspended job. When you find the job that is trying
|
||
|
to lock on of the objects locked by the initial suspended job, you can identify
|
||
|
the objects in question as the trouble spots.</span></li>
|
||
|
<li><span>Investigate the transaction in order to determine the appropriate
|
||
|
course of action.</span><ol type="a"><li><span>Look at the transaction properties to find out what application
|
||
|
initiated it and then look at the application code.</span></li>
|
||
|
<li><span>Or trace the transaction's actions up to this point by finding
|
||
|
the Commit cycle ID in the transaction properties and then searching in a
|
||
|
journal for entries containing this ID. To do this, you can use
|
||
|
the Retrieve Journal Entry (RTVJRNE) command and specify the CMTCYCID parameter.</span></li>
|
||
|
<li><span>After obtaining relevant information, you can choose to force
|
||
|
a rollback or commit operation.</span></li>
|
||
|
</ol>
|
||
|
</li>
|
||
|
</ol>
|
||
|
</div>
|
||
|
<div>
|
||
|
<div class="familylinks">
|
||
|
<div class="parentlink"><strong>Parent topic:</strong> <a href="rzakjtrouble.htm" title="You can read this information when you need to troubleshoot commitment control.">Troubleshoot transactions and commitment control</a></div>
|
||
|
</div>
|
||
|
<div class="reltasks"><strong>Related tasks</strong><br />
|
||
|
<div><a href="rzakjminimizelock.htm" title="A typical way to minimize record locks is to release the record lock. (This technique does not work if LCKLVL(*ALL) has been specified.)">Minimize locks</a></div>
|
||
|
<div><a href="../rzaks/rzaksdetstatjob.htm">Determine the status of a job</a></div>
|
||
|
<div><a href="rzakjdsplock.htm">Display locked objects for a transaction</a></div>
|
||
|
<div><a href="rzakjdspjob.htm">Display jobs associated with a transaction</a></div>
|
||
|
<div><a href="rzakjdspstatus.htm" title="You can use iSeries Navigator to display information about all transactions (logical units of work) on the system. You can also look at information about the job, if any, associated with a transaction.">Display commitment control information</a></div>
|
||
|
<div><a href="rzakjheuristic.htm" title="You can find when and how to force a rollback or commit, and when to cancel resynchronization in this topic.">When to force commits and rollbacks and when to cancel resynchronization</a></div>
|
||
|
</div>
|
||
|
<div class="relref"><strong>Related reference</strong><br />
|
||
|
<div><a href="../cl/rtvjrne.htm">Retrieve Journal Entry (RTVJRNE) command</a></div>
|
||
|
</div>
|
||
|
</div>
|
||
|
</body>
|
||
|
</html>
|