sipeed/picoclaw · error
deltachat rpc stdout
Error message
deltachat rpc stdout: %w
What it means
Wraps a failure to obtain the stdout pipe of the deltachat-rpc-server process in startRPC. Fired when the OS cannot create the pipe while spawning the server child process, typically due to resource exhaustion.
Solutions
- Raise the open-file limit for the PicoClaw process
- Inspect for descriptor leaks with lsof and fix them
- Restart the process and retry channel start
Defensive patterns
Strategy: try-catch
Try / catch
if err != nil { // returned from startRPC
if strings.Contains(err.Error(), "rpc stdout") {
// pipe-creation failure: raise fd limits / fix leaks, then retry start
}
return err
} Prevention
- Raise the process open-file limit in containers and service units
- Treat stdin/stdout pipe errors as environment problems, not transient ones: fix limits first
When it happens
Trigger: Pipe(2) for stdout fails, most commonly fd exhaustion (EMFILE) at the ulimit ceiling.
Common situations: Same as the stdin case: fd leaks or low LimitNOFILE in containers/service units.
Related errors
- deltachat rpc stdin
- decode config
- deltachat create chatmail account on
- deltachat created account on
- deltachat created account on
AI-assisted analysis of sipeed/picoclaw@49183d7e8d (2026-08-15).
Data as JSON: /api/errors/448b76e84b890b4e.
Report an issue: GitHub.
Appendix: source
Thrown at pkg/channels/deltachat/rpc.go:66
mu sync.Mutex
nextID uint64
pending map[uint64]chan rpcResponse
closed bool
}
// startRPC spawns the RPC server with DC_ACCOUNTS_PATH pointing at dataDir and
// begins the background read loop.
func startRPC(serverPath, dataDir string) (*rpcClient, error) {
cmd := exec.Command(serverPath)
cmd.Env = append(cmd.Environ(), "DC_ACCOUNTS_PATH="+dataDir)
stdin, err := cmd.StdinPipe()
if err != nil {
return nil, fmt.Errorf("deltachat rpc stdin: %w", err)
}
stdout, err := cmd.StdoutPipe()
if err != nil {
return nil, fmt.Errorf("deltachat rpc stdout: %w", err)
}
// Let the server's logs flow to our stderr for easy diagnostics.
cmd.Stderr = logWriter{}
if err := cmd.Start(); err != nil {
return nil, fmt.Errorf("start deltachat-rpc-server (%s): %w", serverPath, err)
}
c := &rpcClient{
cmd: cmd,
stdin: stdin,
stdout: stdout,
pending: make(map[uint64]chan rpcResponse),
}
go c.readLoop()
return c, nil
}
View on GitHub (pinned to 49183d7e8d)