oven-sh/bun · critical
%s%serror%s
Error message
%s%serror%s
What it means
die() is h3blast's fatal-error exit path: it prints '<red><bold>error<rst> <message>' to stderr and exits with status 1. It is used for unrecoverable setup failures — bad CLI arguments, invalid target URLs/schemes, TLS certificate or keylog-file problems, worker/histogram allocation failures — so seeing this prefix means the run never started or aborted hard.
Source
Thrown at packages/h3blast/src/h3blast.c:180
_Atomic uint64_t req_other;
_Atomic uint64_t req_err;
_Atomic uint64_t bytes_rx; // HTTP body bytes
_Atomic uint64_t bytes_rx_wire; // UDP payload bytes (incl. headers, QUIC framing)
_Atomic uint64_t bytes_tx;
_Atomic uint64_t conns_open;
_Atomic uint64_t handshake_fail;
};
static volatile sig_atomic_t g_stop;
static volatile sig_atomic_t g_intr; // SIGINT/SIGTERM — abort remaining targets
static volatile sig_atomic_t g_warm; // set once warmup window has passed
// ───────────────────────── util ─────────────────────────
static void die(const char *fmt, ...) {
va_list ap;
va_start(ap, fmt);
fprintf(stderr, "%s%serror%s ", RED, BLD, RST);
vfprintf(stderr, fmt, ap);
fputc('\n', stderr);
va_end(ap);
exit(1);
}
static uint64_t now_ns(void) {
struct timespec ts;
clock_gettime(CLOCK_MONOTONIC, &ts);
return (uint64_t)ts.tv_sec * 1000000000ull + (uint64_t)ts.tv_nsec;
}
static void on_sigint(int sig) {
(void)sig;
if (g_intr) {
static const char restore[] = "\x1b[?7h\x1b[?25h";
if (g_isatty) write(STDERR_FILENO, restore, sizeof(restore) - 1);
_exit(130);View on GitHub (pinned to 8c5296ac45)
Solutions
- Re-run with --help and correct the flagged argument; the message after the 'error' prefix names the exact problem
- Verify each target URL parses and uses a scheme the tool supports
- Check the keylog/cert paths given on the command line exist and are writable/readable
- Raise ulimits (threads) if the failure is resource-related
Defensive patterns
Strategy: validation
Validate before calling
import { spawnSync } from 'node:child_process';
const r = spawnSync(h3blastPath, ['--help']);
if (r.status !== 0) throw new Error(`h3blast unusable (exit ${r.status}): ${r.stderr}`);
// validate targets up front:
for (const t of targets) new URL(t); // throws on malformed URLs Prevention
- Validate every target URL and flag before launching the benchmark
- Check the process exit code; die() always exits 1 with the reason on stderr
- Smoke-test with one connection and a short duration before full runs
When it happens
Trigger: Invoking h3blast with a malformed or non-HTTP(S) URL, a negative/zero worker or duration argument, an unreadable --keylog file, unsupported ALPN/scheme, or environments where pthread/hdr_init fail.
Common situations: Typos in target URLs; passing http:// targets to an HTTP/3-only mode; CI machines with low ulimits starving thread creation; flag mistakes after upgrading CLI argument formats.
Related errors
- openssl failed: ${stderr}
- %s%s w%d%s %s\n
- Second buffer was modified
- Third buffer was modified
- bad result
AI-assisted analysis of oven-sh/bun@8c5296ac45 (2026-08-16).
Data as JSON: /api/errors/1b7ad11ed76fcd00.
Report an issue: GitHub.