ENOSR
Linux / POSIXERRORNotableIPCHIGH confidence
Out of Streams Resources
Production Risk
Indicates system-wide STREAMS resource exhaustion; investigate fd leaks.
What this means
ENOSR (errno 63) is returned when the kernel cannot allocate a STREAMS resource (message blocks, queue bands, etc.) due to exhaustion.
Why it happens
- 1Kernel STREAMS message block pool exhausted
- 2Too many STREAMS modules pushed or connected
How to reproduce
STREAMS message allocation failure under high load.
trigger — this will error
trigger — this will error
// putmsg fails when STREAMS resources exhausted int rc = putmsg(fd, &ctrl, &data, 0); // Returns -1, errno = ENOSR
expected output
putmsg: Out of streams resources (ENOSR)
Fix
Reduce STREAMS resource usage
WHEN When ENOSR is returned under load
Reduce STREAMS resource usage
// Close unused STREAMS file descriptors close(unused_fd); // Pop unneeded modules ioctl(fd, I_POP, 0);
Why this works
Closing unused STREAMS fds and popping unneeded modules returns resources to the pool.
Sources
Official documentation ↗
Linux Programmer Manual errno(3)
Content generated with AI assistance and reviewed for accuracy. Found an error? hello@errcodes.dev