{"record":{"id":"79756406c8d79a85","repo":"t8y2/dbx","slug":"warm-up-startup-s-w","errorCode":null,"errorMessage":"warm up startup %s: %w","messagePattern":"warm up startup (.+?): %w","errorType":"panic","errorClass":null,"httpStatus":null,"severity":"critical","filePath":"agents/drivers/rabbitmq/bench/agent_compare.go","lineNumber":149,"sourceCode":"\t\t\t\t\"mq_list_topics\",\n\t\t\t\tmanagementParams,\n\t\t\t\twarmupRequests/5,\n\t\t\t\tmanagementRequests,\n\t\t\t))\n\t\t}\n\t}\n}\n\nfunc benchmarkStartups(agents []agentSpec, warmups, iterations int) []benchmarkResult {\n\tfor warmup := 0; warmup < warmups; warmup++ {\n\t\torder := agents\n\t\tif warmup%2 == 1 {\n\t\t\torder = []agentSpec{agents[1], agents[0]}\n\t\t}\n\t\tfor _, agent := range order {\n\t\t\tprocess, _, err := startAgent(agent.Command)\n\t\t\tif err != nil {\n\t\t\t\tpanic(fmt.Errorf(\"warm up startup %s: %w\", agent.Name, err))\n\t\t\t}\n\t\t\tif _, err := process.call(\"handshake\", map[string]any{}); err != nil {\n\t\t\t\tprocess.kill()\n\t\t\t\tpanic(fmt.Errorf(\"warm up handshake %s: %w\", agent.Name, err))\n\t\t\t}\n\t\t\tif err := process.close(); err != nil {\n\t\t\t\tpanic(fmt.Errorf(\"close startup warmup %s: %w\", agent.Name, err))\n\t\t\t}\n\t\t}\n\t}\n\n\treadySamples := map[string][]float64{}\n\thandshakeSamples := map[string][]float64{}\n\trssSamples := map[string][]int64{}\n\treadyDurations := map[string]time.Duration{}\n\thandshakeDurations := map[string]time.Duration{}\n\tfor iteration := 0; iteration < iterations; iteration++ {\n\t\torder := agents","sourceCodeStart":131,"sourceCodeEnd":167,"githubUrl":"https://github.com/t8y2/dbx/blob/c0390bff16418b651f4728520d99adf8ce48829a/agents/drivers/rabbitmq/bench/agent_compare.go#L131-L167","documentation":"benchmarkStartups in the RabbitMQ agent benchmark harness calls startAgent for a warm-up pass and panics with this wrapped error if the agent process cannot be started. Because warm-up is mandatory before benchmarking, startup failure is treated as fatal via panic rather than a returned error.","triggerScenarios":"Running the agent_compare benchmark binary when an agentSpec.Command in the agents list fails to spawn — binary not found, exec format error, or immediate exit of the agent process.","commonSituations":"Agent binary not built before running the benchmark; wrong path in the agent command config; architecture mismatch (arm64 binary on x86); missing runtime dependencies for the agent executable.","solutions":["Build the agent binaries first (check the benchmark README / Makefile for the build step)","Verify each agentSpec.Command path in the agents list is correct and executable (chmod +x, correct absolute path)","Run the agent command manually to see the real startup error","Check for architecture/interpreter mismatches (file <binary>, ldd <binary>)","Read the wrapped %w error from the panic for the underlying exec failure"],"exampleFix":"// before: benchmark run without building agents\n// panic: warm up startup go-agent: exec: \"./agent\": stat ./agent: no such file or directory\n\n// after\ngo build -o ./agent ./cmd/agent\ngo run ./bench/agent_compare","handlingStrategy":"try-catch","validationCode":"func agentReady(cmd []string) error {\n    if len(cmd) == 0 {\n        return fmt.Errorf(\"empty agent command\")\n    }\n    path, err := exec.LookPath(cmd[0])\n    if err != nil {\n        return fmt.Errorf(\"agent binary not found: %w\", err)\n    }\n    if info, err := os.Stat(path); err == nil && info.Mode()&0111 == 0 {\n        return fmt.Errorf(\"%s is not executable\", path)\n    }\n    return nil\n}\n// call for each agentSpec before benchmarkStartups","typeGuard":"func canStartAgent(spec agentSpec) bool {\n    return len(spec.Command) > 0 && exec.LookPath(spec.Command[0]) == nil\n}","tryCatchPattern":"// the harness panics on warm-up failure; run it with recover\nfunc runBenchmarkSafe() {\n    defer func() {\n        if r := recover(); r != nil {\n            log.Fatalf(\"benchmark aborted during warm-up: %v\", r)\n        }\n    }()\n    benchmarkStartups()\n}","preventionTips":["Build all agent binaries before invoking the benchmark (CI build step)","Pre-flight each agentSpec.Command with exec.LookPath and an executable-bit check","Run each agent command standalone once to surface missing dependencies","Pin matching architectures between host and agent binaries"],"tags":["rabbitmq","benchmark","process-startup","go"],"backgroundTag":"process-start-failed","analyzedSha":"c0390bff16418b651f4728520d99adf8ce48829a","analyzedAt":"2026-09-05T23:05:10.900Z","contentChangedAt":"2026-09-05T23:05:10.900Z","schemaVersion":2},"datasetVersion":"2026-09-14T00:17:10.932Z"}