go-delve/delve · error

reading NT_PRPSINFO: %v

Error message

reading NT_PRPSINFO: %v

What it means

readNote wraps a binary.Read failure when decoding the NT_PRPSINFO descriptor into linuxPrPsInfo (process name, PID, UID, etc.). This means the descriptor bytes don't fill the expected struct — typically a truncated or corrupted core file. Delve needs PRPSINFO for process-level information during core debugging.

Source

Thrown at pkg/proc/core/linux_core.go:344

		switch machineType {
		case _EM_X86_64:
			note.Desc = &linuxPrStatusAMD64{}
		case _EM_AARCH64:
			note.Desc = &linuxPrStatusARM64{}
		case _EM_RISCV:
			note.Desc = &linuxPrStatusRISCV64{}
		case _EM_LOONGARCH:
			note.Desc = &linuxPrStatusLOONG64{}
		default:
			return nil, errors.New("unsupported machine type")
		}
		if err := binary.Read(descReader, binary.LittleEndian, note.Desc); err != nil {
			return nil, fmt.Errorf("reading NT_PRSTATUS: %v", err)
		}
	case elf.NT_PRPSINFO:
		note.Desc = &linuxPrPsInfo{}
		if err := binary.Read(descReader, binary.LittleEndian, note.Desc); err != nil {
			return nil, fmt.Errorf("reading NT_PRPSINFO: %v", err)
		}
	case _NT_FILE:
		// No good documentation reference, but the structure is
		// simply a header, including entry count, followed by that
		// many entries, and then the file name of each entry,
		// null-delimited. Not reading the names here.
		data := &linuxNTFile{}
		if err := binary.Read(descReader, binary.LittleEndian, &data.linuxNTFileHdr); err != nil {
			return nil, fmt.Errorf("reading NT_FILE header: %v", err)
		}
		for i := 0; i < int(data.Count); i++ {
			entry := &linuxNTFileEntry{}
			if err := binary.Read(descReader, binary.LittleEndian, entry); err != nil {
				return nil, fmt.Errorf("reading NT_FILE entry %v: %v", i, err)
			}
			data.entries = append(data.entries, entry)
		}
		note.Desc = data

View on GitHub (pinned to a23773e6c3)

Solutions

  1. Re-dump the core with sufficient limits (ulimit -c unlimited) and adequate disk space.
  2. Validate with readelf -n <core> to confirm the NT_PRPSINFO note is intact.
  3. Check kernel version compatibility if the core comes from an unusually old kernel.
  4. Regenerate the core on the same machine/architecture as the crashing process.

Example fix

// before
dlv core ./app core.dmp // truncated, fails
// after
ulimit -c unlimited
./app // crash again
corectl validate core.dmp && dlv core ./app core.dmp
Defensive patterns

Strategy: validation

Validate before calling

// Pre-flight: ask readelf to decode notes; a corrupt PRPSINFO fails there first:
if err := exec.Command("readelf", "-n", corePath).Run(); err != nil {
    return fmt.Errorf("core %s failed note validation, re-dump before debugging", corePath)
}

Prevention

When it happens

Trigger: The core file's NT_PRPSINFO note descriptor is shorter than sizeof(linuxPrPsInfo), or the underlying bytes.Reader errors, while Delve parses the core's NOTES segment.

Common situations: Truncated core dumps (ulimit -c, disk-full), cores from very old kernels whose prpsinfo layout differs from the modern struct Delve expects, or corrupted CI artifacts.

Related errors


AI-assisted analysis of go-delve/delve@a23773e6c3 (2026-08-31). Data as JSON: /api/errors/9783c4ab788a344a. Report an issue: GitHub.