abiosoft/colima · error
process signal(0) returned error: %w
Error message
process signal(0) returned error: %w
What it means
The daemon liveness probe sends signal 0 (existence check, no actual signal delivered) to the pid read from the pid file. An error means errno ESRCH (no process with that pid — stale pid file, daemon died) or EPERM (process exists but belongs to another user — pid was recycled after a reboot or by another daemon). The wrapped syscall error distinguishes the two.
Source
Thrown at cmd/daemon/daemon.go:134
}
// check if process is actually running
p, err := os.ReadFile(info.PidFile)
if err != nil {
return fmt.Errorf("error reading pid file: %w", err)
}
pid, _ := strconv.Atoi(string(p))
if pid == 0 {
return fmt.Errorf("invalid pid: %v", string(p))
}
process, err := os.FindProcess(pid)
if err != nil {
return fmt.Errorf("process not found: %v", err)
}
if err := process.Signal(syscall.Signal(0)); err != nil {
return fmt.Errorf("process signal(0) returned error: %w", err)
}
return nil
}
const (
pidFileName = "daemon.pid"
logFileName = "daemon.log"
)
func Info() struct {
PidFile string
LogFile string
} {
dir := dir()
return struct {
PidFile string
LogFile stringView on GitHub (pinned to c3a5f9184d)
Solutions
- Check the wrapped errno: ESRCH means stale pid file — remove dir()/daemon.pid and run `colima daemon start`; EPERM means another user's process holds the pid — likewise delete the stale pid file
- Inspect the daemon log (dir()/daemon.log) for why the daemon exited
- Avoid mixing sudo and non-sudo invocations of colima daemon
Example fix
# before $ colima daemon status process signal(0) returned error: no such process # after $ rm .../daemon.pid # remove stale pid file $ colima daemon start $ colima daemon status
Defensive patterns
Strategy: validation
Validate before calling
// probe liveness yourself before relying on daemon status
func daemonAlive(pidFile string) bool {
b, err := os.ReadFile(pidFile)
if err != nil {
return false
}
pid, err := strconv.Atoi(strings.TrimSpace(string(b)))
if err != nil || pid <= 0 {
return false
}
proc, _ := os.FindProcess(pid)
return proc.Signal(syscall.Signal(0)) == nil
} Try / catch
// distinguish stale-pid (ESRCH) from foreign-owner (EPERM)
if err := status(); err != nil {
var errno syscall.Errno
if errors.As(err, &errno) {
switch errno {
case syscall.ESRCH: // stale pid file -> safe to remove
case syscall.EPERM: // pid recycled to another user -> also stale for us
}
}
} Prevention
- Stop daemons through their stop command so pid files are cleaned up
- Do not run colima daemon under sudo in one session and as user in another — mixed ownership triggers EPERM probes
- After host reboots, expect stale pid files: wrap daemon startup in a check that removes a pid file whose pid is not alive
When it happens
Trigger: Daemon exited or crashed but left daemon.pid behind; host rebooted and the stale pid now maps to a live process of another user (EPERM); daemon started under sudo so a non-root status check hits EPERM; pid recycling on long-lived hosts.
Common situations: Skipping `colima daemon stop` in favor of kill/reboot; daemon started with sudo and queried as regular user (or vice versa); stale daemon.pid surviving a colima upgrade or profile switch; an unrelated process adopting the same pid after reboot.
Related errors
- pid file not found: %w
- invalid pid: %v
- cannot make dir: %w
- error sending sigterm to daemon: %w
- process not found: %v
AI-assisted analysis of abiosoft/colima@c3a5f9184d (2026-08-15).
Data as JSON: /api/errors/5cf30f693140bfa0.
Report an issue: GitHub.