1DB_DEADLOCK(1)               BerkeleyDB Utilities               DB_DEADLOCK(1)
2
3
4

NAME

6       db_deadlock - Detect deadlocks and abort lock requests
7

SYNOPSIS

9       db_deadlock  [-Vv]  [-a e | m | n | o | W | w | y ] [-h home] [-L file]
10       [-t sec.usec]
11

DESCRIPTION

13       The db_deadlock utility traverses the database environment lock region,
14       and  aborts  a  lock  request each time it detects a deadlock or a lock
15       request that has timed out. By default, in the case of  a  deadlock,  a
16       random lock request is chosen to be aborted.
17
18       This  utility  should  be run as a background daemon, or the underlying
19       Berkeley DB deadlock detection interfaces  should  be  called  in  some
20       other way, whenever there are multiple threads or processes accessing a
21       database and at least one of them is modifying it.
22

OPTIONS

24       -a     When a deadlock is detected, abort the locker:
25
26              m      with the most locks
27
28              n      with the fewest locks
29
30              o      with the oldest lock
31
32              W      with the most write locks
33
34              w      with the fewest write locks
35
36              y      with the youngest lock
37
38              e      When lock or transaction timeouts  have  been  specified,
39                     abort any lock request that has timed out. Note that this
40                     option does not perform  the  entire  deadlock  detection
41                     algorithm, but instead only checks for timeouts.
42
43       -h home
44              Specify  a  home  directory  for  the  database  environment; by
45              default, the current working directory is used.
46
47       -L file
48              Log the execution of the db_deadlock utility  to  the  specified
49              file  in  the following format, where ### is the process ID, and
50              the date is the time the utility was started.
51
52              db_deadlock: ### Wed Jun 15 01:23:45 EDT 1995
53
54              This file will be  removed  if  the  db_deadlock  utility  exits
55              gracefully.
56
57       -t sec.usec
58              Check  the  database  environment  every  sec  seconds plus usec
59              microseconds to see if a process has been forced to wait  for  a
60              lock;  if  one  has, review the database environment lock struc‐
61              tures.
62
63       -V     Write the library version number to  the  standard  output,  and
64              exit.
65
66       -v     Run  in verbose mode, generating messages each time the detector
67              runs.
68
69       If the -t option is not specified, db_deadlock will run once and exit.
70
71       The db_deadlock utility uses a Berkeley DB  environment  (as  described
72       for  the  -h  option,  the environment variable DB_HOME, or because the
73       utility was run in a directory containing a Berkeley  DB  environment).
74       In order to avoid environment corruption when using a Berkeley DB envi‐
75       ronment, db_deadlock should always be given the chance to  detach  from
76       the  environment  and exit gracefully.  To cause db_deadlock to release
77       all environment resources and exit cleanly, send it an interrupt signal
78       (SIGINT).
79
80       The  db_deadlock  utility  does  not  attempt to create the Berkeley DB
81       shared memory regions if they do not already  exist.   The  application
82       which  creates  the  region should be started first, and then, once the
83       region is created, the db_deadlock utility should be started.
84
85       The DB_ENV->lock_detect method is the underlying  method  used  by  the
86       db_deadlock  utility.  See  the  db_deadlock utility source code for an
87       example of using DB_ENV->lock_detect in a IEEE/ANSI Std 1003.1  (POSIX)
88       environment.
89

EXIT STATUS

91       The db_deadlock utility exits 0 on success, and >0 if an error occurs.
92

ENVIRONMENT

94       DB_HOME
95              If  the  -h option is not specified and the environment variable
96              DB_HOME is set, it is used as the path of the database home,  as
97              described in DB_ENV->open.
98

SEE ALSO

100       db_archive(1)  db_checkpoint(1)  db_dump(1) db_hotbackup(1) db_log_ver‐
101       ify(1)   db_load(1)   db_printlog(1)   db_recover(1)    db_replicate(1)
102       db_stat(1) db_tuner(1) db_upgrade(1) db_verify(1)
103
104
105
106BerkeleyDB 5.3.21              06 December 2016                 DB_DEADLOCK(1)
Impressum