{
    "content": [
        {
            "type": "text",
            "text": "# db_deadlock (man)\n\n## NAME\n\ndb5.3deadlock - Detect and abort deadlocks\n\n## SYNOPSIS\n\ndb5.3deadlock [-Vv] [-a e | m | n | o | W | w | y] [-h home] [-L file] [-t sec.usec]\n\n## DESCRIPTION\n\nThe  db5.3deadlock utility traverses the database environment lock region, and aborts a lock\nrequest each time it detects a deadlock or a lock request that has timed out. By default,  in\nthe case of a deadlock, a random lock request is chosen to be aborted.\n\n## Sections\n\n- **NAME**\n- **SYNOPSIS**\n- **DESCRIPTION**\n- **OPTIONS** (6 subsections)\n- **ENVIRONMENT**\n- **AUTHORS**\n\nUse structuredContent.sections for detailed options, examples, and full documentation.\n"
        }
    ],
    "structuredContent": {
        "command": "db_deadlock",
        "section": "",
        "mode": "man",
        "summary": "db5.3deadlock - Detect and abort deadlocks",
        "synopsis": "db5.3deadlock [-Vv] [-a e | m | n | o | W | w | y] [-h home] [-L file] [-t sec.usec]",
        "tldr_summary": null,
        "tldr_examples": [],
        "tldr_source": null,
        "flags": [
            {
                "flag": "-a",
                "long": null,
                "arg": null,
                "description": "m with the most locks n with the fewest locks o with the oldest lock W with the most write locks w with the fewest write locks y with the youngest lock When lock or transaction timeouts have been specified: e abort any lock request that has timed out"
            },
            {
                "flag": "-h",
                "long": null,
                "arg": null,
                "description": "directory is used."
            },
            {
                "flag": "-L",
                "long": null,
                "arg": null,
                "description": "format, where ### is the process ID, and the date is the time the utility was started. dbdeadlock: ### Wed Jun 15 01:23:45 EDT 1995 This file will be removed if the db5.3deadlock utility exits gracefully."
            },
            {
                "flag": "-t",
                "long": null,
                "arg": null,
                "description": "process has been forced to wait for a lock; if one has, review the database environ‐ ment lock structures."
            },
            {
                "flag": "-V",
                "long": null,
                "arg": null,
                "description": ""
            },
            {
                "flag": "-v",
                "long": null,
                "arg": null,
                "description": "If the -t option is not specified, db5.3deadlock will run once and exit. The db5.3deadlock utility uses a Berkeley DB environment (as described for the -h option, the environment variable DBHOME, or because the utility was run in a directory containing a Berkeley DB environment). In order to avoid environment corruption when using a Berkeley DB environment, db5.3deadlock should always be given the chance to detach from the environment and exit gracefully. To cause db5.3deadlock to release all environment resources and exit cleanly, send it an interrupt signal (SIGINT). The db5.3deadlock utility does not attempt to create the Berkeley DB shared memory regions if they do not already exist. The application which creates the region should be started first, and then, once the region is created, the db5.3deadlock utility should be started. The DBENV->lockdetect method is the underlying method used by the dbdeadlock utility. See the dbdeadlock utility source code for an example of using DBENV->lockdetect in a IEEE/ANSI Std 1003.1 (POSIX) environment. The db5.3deadlock utility exits 0 on success, and >0 if an error occurs."
            }
        ],
        "examples": [],
        "see_also": [],
        "section_outline": [
            {
                "name": "NAME",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "SYNOPSIS",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "DESCRIPTION",
                "lines": 8,
                "subsections": []
            },
            {
                "name": "OPTIONS",
                "lines": 1,
                "subsections": [
                    {
                        "name": "-a",
                        "lines": 16,
                        "flag": "-a"
                    },
                    {
                        "name": "-h",
                        "lines": 2,
                        "flag": "-h"
                    },
                    {
                        "name": "-L",
                        "lines": 7,
                        "flag": "-L"
                    },
                    {
                        "name": "-t",
                        "lines": 3,
                        "flag": "-t"
                    },
                    {
                        "name": "-V",
                        "lines": 1,
                        "flag": "-V"
                    },
                    {
                        "name": "-v",
                        "lines": 19,
                        "flag": "-v"
                    }
                ]
            },
            {
                "name": "ENVIRONMENT",
                "lines": 4,
                "subsections": []
            },
            {
                "name": "AUTHORS",
                "lines": 7,
                "subsections": []
            }
        ],
        "sections": {
            "NAME": {
                "content": "db5.3deadlock - Detect and abort deadlocks\n",
                "subsections": []
            },
            "SYNOPSIS": {
                "content": "db5.3deadlock [-Vv] [-a e | m | n | o | W | w | y] [-h home] [-L file] [-t sec.usec]\n",
                "subsections": []
            },
            "DESCRIPTION": {
                "content": "The  db5.3deadlock utility traverses the database environment lock region, and aborts a lock\nrequest each time it detects a deadlock or a lock request that has timed out. By default,  in\nthe case of a deadlock, a random lock request is chosen to be aborted.\n\nThis utility should be run as a background daemon, or the underlying Berkeley DB deadlock de‐\ntection interfaces should be called in some other way, whenever there are multiple threads or\nprocesses accessing a database and at least one of them is modifying it.\n",
                "subsections": []
            },
            "OPTIONS": {
                "content": "",
                "subsections": [
                    {
                        "name": "-a",
                        "content": "m      with the most locks\n\nn      with the fewest locks\n\no      with the oldest lock\n\nW      with the most write locks\n\nw      with the fewest write locks\n\ny      with the youngest lock\n\nWhen lock or transaction timeouts have been specified:\n\ne      abort any lock request that has timed out\n",
                        "flag": "-a"
                    },
                    {
                        "name": "-h",
                        "content": "directory is used.\n",
                        "flag": "-h"
                    },
                    {
                        "name": "-L",
                        "content": "format, where ### is the process ID, and the date is the time the utility was started.\n\n\ndbdeadlock: ### Wed Jun 15 01:23:45 EDT 1995\n\nThis file will be removed if the db5.3deadlock utility exits gracefully.\n",
                        "flag": "-L"
                    },
                    {
                        "name": "-t",
                        "content": "process has been forced to wait for a lock; if one has, review the database  environ‐\nment lock structures.\n",
                        "flag": "-t"
                    },
                    {
                        "name": "-V",
                        "content": "",
                        "flag": "-V"
                    },
                    {
                        "name": "-v",
                        "content": "If the -t option is not specified, db5.3deadlock will run once and exit.\n\nThe  db5.3deadlock  utility  uses a Berkeley DB environment (as described for the -h option,\nthe environment variable DBHOME, or because the utility was run in a directory containing  a\nBerkeley  DB environment).  In order to avoid environment corruption when using a Berkeley DB\nenvironment, db5.3deadlock should always be given the chance to detach from the  environment\nand  exit  gracefully.  To cause db5.3deadlock to release all environment resources and exit\ncleanly, send it an interrupt signal (SIGINT).\n\nThe db5.3deadlock utility does not attempt to create the Berkeley DB shared  memory  regions\nif  they  do  not  already exist.  The application which creates the region should be started\nfirst, and then, once the region is created, the db5.3deadlock utility should be started.\n\nThe DBENV->lockdetect method is the underlying method used by the dbdeadlock utility.  See\nthe  dbdeadlock  utility  source  code  for  an  example  of  using DBENV->lockdetect in a\nIEEE/ANSI Std 1003.1 (POSIX) environment.\n\nThe db5.3deadlock utility exits 0 on success, and >0 if an error occurs.\n",
                        "flag": "-v"
                    }
                ]
            },
            "ENVIRONMENT": {
                "content": "DBHOME\nIf the -h option is not specified and the environment variable DBHOME is set,  it  is\nused as the path of the database home, as described in DBENV->open.\n",
                "subsections": []
            },
            "AUTHORS": {
                "content": "Sleepycat  Software,  Inc.  This  manual page was created based on the HTML documentation for\ndbdeadlock from Sleepycat, by Thijs Kinkhorst <thijs@kinkhorst.com>, for the  Debian  system\n(but may be used by others).\n\n\n\n28 January 2005                         DB5.3DEADLOCK(1)",
                "subsections": []
            }
        }
    }
}