You are viewing a plain text version of this content. The canonical link for it is here.
Posted to derby-commits@db.apache.org by Apache Wiki <wi...@apache.org> on 2007/07/31 10:37:10 UTC

[Db-derby Wiki] Update of "LockDebugging" by JohnHEmbretsen

Dear Wiki user,

You have subscribed to a wiki page or wiki category on "Db-derby Wiki" for change notification.

The following page has been changed by JohnHEmbretsen:
http://wiki.apache.org/db-derby/LockDebugging

------------------------------------------------------------------------------
  = Debugging locking situations =
  
- Sometimes, when multiple users or threads are accessing a database at the same time, locking situations may occur. Lock timeouts happen when a transaction has waited "long enough" for a resource that is locked by another transaction. Deadlocks occur when two or more transactions are waiting for each other, and it is impossible to get further without rolling back at least one of the transactions. 
+ Sometimes, when multiple users or threads are accessing a database at the same time, locking situations may occur. ''Lock timeouts'' happen when a transaction has waited "long enough" for a resource that is locked by another transaction. ''Deadlocks'' occur when two or more transactions are waiting for each other, and it is impossible to get further without rolling back at least one of the transactions. 
  
  Although locking situations are not necessarily an indication of faults in your application, it is always useful to know ''why'' it happened, and possibly how to avoid it in the future.
  
@@ -64, +64 @@

  select * from syscs_diag.lock_table; 
  }}}
  
+ More information about the lock table and other diagnostic tables and functions can be found on the [http://db.apache.org/derby/docs/dev/ref/rrefsyscsdiagtables.html SYSCS_DIAG diagnostic tables and functions] page in the Derby Reference Manual.
+ 
  === Interpreting the diagnostics ===
  
  Not every aspect of the debug information mentioned above (deadlock traces or lock table dumps) is intuitive to the average user of Derby. This section is intended to provide information that may be helpful in deciphering the output. 
  
  Much of the format of the lock table is described [http://db.apache.org/derby/javadoc/engine/org/apache/derby/diag/LockTable.html in the Javadoc of the internal class org.apache.derby.diag.LockTable].
  
+ There is also a useful page showing example usage of two relevant diagnostics tables in [http://publib.boulder.ibm.com/infocenter/cldscp10/index.jsp?topic=/com.ibm.cloudscape.doc/hubprnt57.htm the Cloudscape Administration Guide] (mind that some information on that page might be outdated).
+ 
  A walk-through of a lock timeout debugging session on IRC [http://www.mail-archive.com/derby-user@db.apache.org/msg04584.html is available in the mailing list archives] for the derby-user mailing list.
  
  Please add any other useful information you can think of to this page :)
  
+ 
+ == Related Issues ==
+ 
+  * [https://issues.apache.org/jira/browse/DERBY-360 DERBY-360]: ''Add doc info to print lock table for timeout errors''
+  * [https://issues.apache.org/jira/browse/DERBY-666 DERBY-666]: ''Enhance derby.locks.deadlockTrace to print stack traces for all threads involved in a deadlock''
+  * [https://issues.apache.org/jira/browse/DERBY-2828 DERBY-2828]: ''derby.locks.deadlockTrace docs claim the property is meaningless without derby.locks.monitor=true''
+  * [https://issues.apache.org/jira/browse/DERBY-2845 DERBY-2845]: ''Devguide tips on debugging deadlocks should be clearer''
+  * [https://issues.apache.org/jira/browse/DERBY-2877 DERBY-2877]: ''Print the entire lock list when a deadlock occurs and deadlock tracing is on''
+