1
.\" Manual Page for Berkely DB utils, created from upstream
2
.\" documentation by Thijs Kinkhorst <thijs@kinkhorst.com>.
3
.TH DB5.2_DEADLOCK 1 "28 January 2005"
5
db5.2_deadlock \- Detect and abort deadlocks
8
[-Vv] [-a e | m | n | o | W | w | y] [-h home] [-L file] [-t sec.usec]
10
The db5.2_deadlock utility traverses the database environment lock region, and
11
aborts a lock request each time it detects a deadlock or a lock request that
12
has timed out. By default, in the case of a deadlock, a random lock request is
15
This utility should be run as a background daemon, or the underlying Berkeley
16
DB deadlock detection interfaces should be called in some other way, whenever
17
there are multiple threads or processes accessing a database and at least one
18
of them is modifying it.
21
When a deadlock is detected, abort the locker:
30
with the most write locks
32
with the fewest write locks
34
with the youngest lock
37
When lock or transaction timeouts have been specified:
40
abort any lock request that has timed out
43
Specify a home directory for the database environment; by
44
default, the current working directory is used.
46
Log the execution of the db5.2_deadlock utility to the specified file in the
47
following format, where \fI###\fR is the process ID, and the date
48
is the time the utility was started.
51
db_deadlock: ### Wed Jun 15 01:23:45 EDT 1995
53
This file will be removed if the db5.2_deadlock utility exits gracefully.
55
Check the database environment every \fBsec\fR seconds plus
56
\fBusec\fR microseconds to see if a process has been forced to wait
57
for a lock; if one has, review the database environment lock
60
Write the library version number to the standard output, and exit.
62
Run in verbose mode, generating messages each time the detector runs.
64
If the \fB-t\fR option is not specified, db5.2_deadlock will
67
The db5.2_deadlock utility uses a Berkeley DB environment (as described for the
68
\fB-h\fR option, the environment variable \fBDB_HOME\fR, or
69
because the utility was run in a directory containing a Berkeley DB
70
environment). In order to avoid environment corruption when using a
71
Berkeley DB environment, db5.2_deadlock should always be given the chance to
72
detach from the environment and exit gracefully. To cause db5.2_deadlock
73
to release all environment resources and exit cleanly, send it an
74
interrupt signal (SIGINT).
76
The db5.2_deadlock utility does not attempt to create the Berkeley DB
77
shared memory regions if they do not already exist. The application
78
which creates the region should be started first, and then, once the
79
region is created, the db5.2_deadlock utility should be started.
81
The DB_ENV->lock_detect method is the underlying method used by the
82
db_deadlock utility. See the db_deadlock utility source code for an
83
example of using DB_ENV->lock_detect
84
in a IEEE/ANSI Std 1003.1 (POSIX) environment.
86
The db5.2_deadlock utility exits 0 on success, and >0 if an error occurs.
90
If the \fB-h\fR option is not specified and the environment variable
91
DB_HOME is set, it is used as the path of the database home, as described
94
Sleepycat Software, Inc. This manual page was created based on
95
the HTML documentation for db_deadlock from Sleepycat,
96
by Thijs Kinkhorst <thijs@kinkhorst.com>,
97
for the Debian system (but may be used by others).