{"record":{"id":"2baafc28e57ffede","repo":"NationalSecurityAgency/ghidra","slug":"usage-ghidra-trace-tx-abort","errorCode":null,"errorMessage":"Usage: ghidra trace tx-abort","messagePattern":"Usage: ghidra trace tx-abort","errorType":"validation","errorClass":"RuntimeError","httpStatus":null,"severity":"error","filePath":"Ghidra/Debug/Debugger-agent-lldb/src/main/py/src/ghidralldb/commands.py","lineNumber":560,"sourceCode":"    STATE.require_tx()[1].commit()\n    STATE.reset_tx()\n\n\n@convert_errors\ndef ghidra_trace_txabort(debugger: lldb.SBDebugger, command: str,\n                         result: lldb.SBCommandReturnObject,\n                         internal_dict: Dict[str, Any]) -> None:\n    \"\"\"Abort the current transaction.\n\n    Usage: ghidra trace tx-abort\n\n    Use only in emergencies. This may not always succeed, and it may leave the\n    trace in an inconsistent state.\n    \"\"\"\n\n    args = shlex.split(command)\n    if len(args) != 0:\n        raise RuntimeError(\"Usage: ghidra trace tx-abort\")\n\n    trace, tx = STATE.require_tx()\n    print(\"Aborting trace transaction!\")\n    tx.abort()\n    STATE.reset_tx()\n\n\n@contextmanager\ndef open_tracked_tx(description: str) -> Generator[Transaction, None, None]:\n    with STATE.require_trace().open_tx(description) as tx:\n        STATE.tx = tx\n        yield tx\n    STATE.reset_tx()\n\n\n@convert_errors\ndef ghidra_trace_txopen(debugger: lldb.SBDebugger, command: str,\n                        result: lldb.SBCommandReturnObject,","sourceCodeStart":542,"sourceCodeEnd":578,"githubUrl":"https://github.com/NationalSecurityAgency/ghidra/blob/d5f144c24d6bc53c9cbf4448c6d11143e7696206/Ghidra/Debug/Debugger-agent-lldb/src/main/py/src/ghidralldb/commands.py#L542-L578","documentation":"`ghidra trace tx-abort` aborts the current transaction (emergency use only; it may leave the trace inconsistent) and takes no arguments. Any extra token aborts before the abort.","triggerScenarios":"`ghidra trace tx-abort now`; `ghidra trace tx-abort yes`.","commonSituations":"Appending a confirmation keyword this command does not recognize.","solutions":["Call it with no arguments: `ghidra trace tx-abort`"],"exampleFix":"// before\nghidra trace tx-abort now\n// after\nghidra trace tx-abort","handlingStrategy":"validation","validationCode":"import shlex\ndef no_args(command: str) -> bool:\n    return len(shlex.split(command)) == 0","typeGuard":null,"tryCatchPattern":"try:\n    ghidra_trace_txabort(debugger, command, result, internal_dict)\nexcept RuntimeError as e:\n    if str(e).startswith('Usage: ghidra trace tx-abort'):\n        # drop arguments and retry\n        ...\n    raise","preventionTips":["tx-abort takes no arguments","Treat tx-abort as emergency-only; it may leave the trace inconsistent"],"tags":["ghidra","lldb","cli","validation","transaction"],"backgroundTag":null,"analyzedSha":"d5f144c24d6bc53c9cbf4448c6d11143e7696206","analyzedAt":"2026-08-14T01:00:57.564Z","schemaVersion":2},"datasetVersion":"2026-08-14T05:17:29.042Z"}