Argus.Analyses.TimeoutChain (Panoptes v0.13.0)

Copy Markdown View Source

GenServer timeout chain detection.

Detects two dangerous patterns in GenServer callback implementations:

  1. Timeout chainshandle_call/3 callbacks that make synchronous calls to other GenServer modules, which in turn make their own sync calls. GenServer.call defaults to 5000ms, and when handle_call makes downstream sync calls, timeouts compose unpredictably: a chain A→B→C means A's timeout must accommodate B+C latency.

  2. Blocking cast handlershandle_cast/2 callbacks that make synchronous calls, defeating the async purpose of cast and silently blocking the GenServer.

Requires the OTP extractor for behaviour and sync_call facts.

Output relations

  • timeout_chain_risk(from, to, depth) — chain of depth >= 2 through GenServer handle_call callbacks.
  • blocking_cast_handler(mod, target) — handle_cast that blocks on a sync call.

Finding severities

  • timeout_insufficient:error. The caller's timeout is provably smaller than the callee's downstream budget; the outer call can time out while the inner work is still legitimately running.
  • timeout_chain_risk, blocking_cast_handler, infinity_timeout_in_chain:warning. Composition hazards whose impact depends on runtime latency.