ek9_query_deadlock_chain

Answers first: chains[] - per detected lock risk its errorCode, path, outerLock/innerLock and ordered steps[] with file/line/column - chains:[] when nothing is at risk.

Category: Enquiry · Compare: Lock Catalogue / Deadlock Detective

When to use it

Why does the analyser report E08252 / E08253 - the ordered, navigable steps behind every detected lock risk - one call, no arguments.

When not to use it

Details

status discriminates available (analysis ran; chains[] may be empty=clean) vs no-analysis (LockAnalysis absent — recompile to PRE_IR_CHECKS). Each chain: errorCode (E08252 same-thread order cycle / E08253 cross-thread same-lock hold), path (analysis-path enum), outerLock/innerLock (lock-identity descriptors; correlate stableId with ek9_query_lock_identity; an unresolvable identity degrades to {stableId,status:'unresolved'}), and steps[] (kind, description, location{1-based line,0-based column}, contextFunction, optional stepTarget). Dynamic anonymous symbols render in the friendly fn/cls form (the volatile mangled hash is suppressed) — disambiguate by location.

Arguments

None of its own.

Recorded calls

Real calls, recorded against small projects and checked on every build - a changed answer fails it. 3 of the 4 recorded are shown.

No locks workspace

Request

{ }

Response

{
  "chains" : [ ],
  "meta" : {
    "serverMs" : "<timing>"
  },
  "status" : "available"
}

Populated workspace

Request

{ }

Response

{
  "chains" : [ ],
  "meta" : {
    "serverMs" : "<timing>"
  },
  "status" : "available"
}

Polymorphic chain

Request

{ }

Response

{
  "chains" : [ {
    "errorCode" : "E08252",
    "innerLock" : {
      "displayName" : "com.example.polymorphic::lockB",
      "origin" : "FIELD_ROOTED",
      "originLocation" : {
        "column" : 6,
        "file" : "file://<workspace-root>/Polymorphic.ek9",
        "line" : 20
      },
      "originSymbol" : {
        "category" : "VARIABLE",
        "displayName" : "lockB",
        "fullyQualifiedName" : "com.example.polymorphic::lockB",
        "location" : {
          "column" : 6,
          "file" : "file://<workspace-root>/Polymorphic.ek9",
          "line" : 20
        },
        "name" : "lockB"
      },
      "stableId" : "field:com.example.polymorphic::lockB@20:6"
    },
...

Cut short here: 97 more lines. The whole recorded call.