{"record":{"id":"0633ba218cbdee71","repo":"t8y2/dbx","slug":"open-s-session-d-w","errorCode":null,"errorMessage":"open %s session %d: %w","messagePattern":"open (.+?) session (.+?): %w","errorType":"panic","errorClass":null,"httpStatus":null,"severity":"error","filePath":"agents/drivers/kingbase-go/bench/agent_compare.go","lineNumber":111,"sourceCode":"\t\t{name: \"go-gokb\", argv: []string{requiredEnv(\"GO_AGENT\")}},\n\t\t{name: \"jdbc\", argv: jdbcAgentCommand(requiredEnv(\"JDBC_AGENT_JAR\"))},\n\t}\n\tencoder := json.NewEncoder(os.Stdout)\n\trunning := make([]*runningAgent, 0, len(agents))\n\tfor _, candidate := range agents {\n\t\tprocess, startup, err := startAgent(candidate.argv)\n\t\tif err != nil {\n\t\t\tpanic(fmt.Errorf(\"start %s: %w\", candidate.name, err))\n\t\t}\n\t\tparams := map[string]any{\"host\": host, \"port\": port, \"database\": database, \"username\": username, \"password\": password}\n\t\treadyRSS := readRSSKB(process.command.Process.Pid)\n\t\tvar oneSessionRSS int64\n\t\topenStart := time.Now()\n\t\tfor index := 0; index < maxConcurrency; index++ {\n\t\t\trequest := cloneMap(params)\n\t\t\trequest[\"agentSessionId\"] = sessionID(index)\n\t\t\tif _, err := process.call(\"open_session\", request); err != nil {\n\t\t\t\tpanic(fmt.Errorf(\"open %s session %d: %w\", candidate.name, index, err))\n\t\t\t}\n\t\t\tif index == 0 {\n\t\t\t\toneSessionRSS = readRSSKB(process.command.Process.Pid)\n\t\t\t}\n\t\t}\n\t\topenDuration := time.Since(openStart)\n\t\trunning = append(running, &runningAgent{\n\t\t\tname: candidate.name, process: process, startup: startup, openSessions: openDuration,\n\t\t\treadyRSSKB: readyRSS, oneSessionRSSKB: oneSessionRSS, sessionsRSSKB: readRSSKB(process.command.Process.Pid),\n\t\t})\n\t}\n\tdefer func() {\n\t\tfor _, candidate := range running {\n\t\t\t_ = candidate.process.close()\n\t\t}\n\t}()\n\tfor _, concurrency := range concurrencies {\n\t\tif concurrency > maxConcurrency {","sourceCodeStart":93,"sourceCodeEnd":129,"githubUrl":"https://github.com/t8y2/dbx/blob/c0390bff16418b651f4728520d99adf8ce48829a/agents/drivers/kingbase-go/bench/agent_compare.go#L93-L129","documentation":"Panics in the kingbase bench harness when opening session N for one of the benchmark agents fails after the agent process started — connection params (host/port/database/username/password) were rejected. The wrapped error identifies the agent and session; the bench aborts because a session is essential to the comparison.","triggerScenarios":"Thrown at agents/drivers/kingbase-go/bench/agent_compare.go:111 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Verify BENCH connection environment variables (host, port, database, credentials) are correct","Confirm the database server accepts connections from the bench host","Check the wrapped error for the agent-specific rejection reason"],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"c0390bff16418b651f4728520d99adf8ce48829a","analyzedAt":"2026-09-05T23:05:10.900Z","contentChangedAt":"2026-09-05T23:05:10.900Z","schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}