t8y2/dbx · error · RuntimeError

{self.candidate.name} {method}: {json.dumps(response['error'

Error message

{self.candidate.name} {method}: {json.dumps(response['error'], ensure_ascii=False)}

What it means

When the agent replies to an RPC with a non-null 'error' field, the harness wraps it in a RuntimeError prefixed with the candidate name and method, embedding the JSON-serialized error object. This is the harness's way of surfacing application-level failures reported by the agent (e.g. SQL errors, auth failures, unsupported features) rather than transport failures.

Source

Thrown at agents/drivers/hive-go/bench/agent_compare.py:106

            "id": request_id,
            "method": method,
            "params": params or {},
        }
        try:
            assert self.process.stdin is not None
            with self.write_lock:
                self.process.stdin.write(json.dumps(request, separators=(",", ":")) + "\n")
                self.process.stdin.flush()
            response = response_queue.get(timeout=env_float("BENCH_RPC_TIMEOUT", 180.0))
        except queue.Empty as error:
            raise TimeoutError(self._failure(f"timed out during {method}")) from error
        finally:
            with self.request_lock:
                self.pending.pop(request_id, None)
        if isinstance(response, Exception):
            raise response
        if response.get("error") is not None:
            raise RuntimeError(
                f"{self.candidate.name} {method}: "
                f"{json.dumps(response['error'], ensure_ascii=False)}"
            )
        return response.get("result")

    def rss_kib(self) -> int:
        if self.candidate.rss_command:
            output = subprocess.check_output(
                self.candidate.rss_command,
                shell=True,
                text=True,
            ).strip()
            return int(output or "0")
        status_path = Path(f"/proc/{self.process.pid}/status")
        if status_path.is_file():
            for line in status_path.read_text().splitlines():
                if line.startswith("VmRSS:"):
                    return int(line.split()[1])

View on GitHub (pinned to c0390bff16)

Solutions

  1. Read the embedded JSON error detail to identify the agent-side failure cause
  2. Fix the underlying issue on the agent/database side (SQL, credentials, table setup)
  3. Skip the unsupported method/candidate for drivers that don't implement it
  4. Ensure setup steps (table creation, data load) completed before the benchmark runs
Defensive patterns

Strategy: try-catch

Validate before calling

def check_rpc_ok(response: dict) -> dict:
    if response.get("error") is not None:
        raise SystemExit(f"agent returned error: {response['error']}")
    return response
# inspect 'error' in the raw response before interpreting results

Type guard

def is_rpc_success(response: object) -> bool:
    return isinstance(response, dict) and response.get("error") is None

Try / catch

try:
    result = process.call("execute_query", params)
except RuntimeError as e:
    if e.args and e.args[0].startswith(process.candidate.name):
        detail = e.args[0].split(": ", 1)[-1]
        print(f"agent-side failure: {detail}")  # fix SQL/creds/feature support
    else:
        raise

Prevention

When it happens

Trigger: Any RPC method returning {"error": ...} in its response — failed query execution, bad SQL, session not found, permission denied, unsupported method on that candidate driver.

Common situations: A candidate driver (e.g. jdbc-java) not supporting a method the hive-go agent supports; SQL syntax differences between backends; expired/invalid credentials; querying a non-existent table during a benchmark after a failed setup step.

Related errors


AI-assisted analysis of t8y2/dbx@c0390bff16 (2026-09-05). Data as JSON: /api/errors/c1153f12ef517b39. Report an issue: GitHub.