{"record":{"id":"eae8a2b1e78b67c1","repo":"go-delve/delve","slug":"could-not-open-executable-v","errorCode":null,"errorMessage":"could not open executable: %v","messagePattern":"could not open executable: (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"pkg/proc/linutil/dynamic.go","lineNumber":180,"sourceCode":"\treturn readPtr(p, debugAddr+rBrkOffset)\n}\n\n// ElfFindRBrkFromInterp finds the address of the dynamic linker's\n// _dl_debug_state function by reading the ELF interpreter from disk.\n// This is used at launch time when the dynamic linker hasn't initialized\n// r_debug yet (DT_DEBUG is 0). The function reads the .interp section of\n// the executable to find the interpreter path, then finds _dl_debug_state\n// in the interpreter's dynamic symbol table.\n// execPath is the path to the executable, and auxvBase is the base address\n// of the interpreter in memory (AT_BASE from the auxiliary vector).\nfunc ElfFindRBrkFromInterp(execPath string, auxvBase uint64) (uint64, error) {\n\tif auxvBase == 0 {\n\t\treturn 0, nil\n\t}\n\n\texecFile, err := elf.Open(execPath)\n\tif err != nil {\n\t\treturn 0, fmt.Errorf(\"could not open executable: %v\", err)\n\t}\n\tdefer execFile.Close()\n\n\tinterpSec := execFile.Section(\".interp\")\n\tif interpSec == nil {\n\t\treturn 0, nil\n\t}\n\tinterpData, err := interpSec.Data()\n\tif err != nil {\n\t\treturn 0, fmt.Errorf(\"could not read .interp section: %v\", err)\n\t}\n\tinterpPath := string(bytes.TrimRight(interpData, \"\\x00\"))\n\n\tinterpFile, err := elf.Open(interpPath)\n\tif err != nil {\n\t\trealPath, rerr := os.Readlink(interpPath)\n\t\tif rerr != nil {\n\t\t\treturn 0, fmt.Errorf(\"could not open interpreter %s: %v\", interpPath, err)","sourceCodeStart":162,"sourceCodeEnd":198,"githubUrl":"https://github.com/go-delve/delve/blob/a23773e6c31361e43246bc43a424ee009679b174/pkg/proc/linutil/dynamic.go#L162-L198","documentation":"Error \"could not open executable: %v\" thrown in go-delve/delve.","triggerScenarios":"Thrown at pkg/proc/linutil/dynamic.go:180 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"a23773e6c31361e43246bc43a424ee009679b174","analyzedAt":"2026-08-31T15:12:45.221Z","schemaVersion":2},"datasetVersion":"2026-08-31T19:17:28.585Z"}