socketpair: No buffer space available

Bruce M. Simpson bms at FreeBSD.org
Sun Mar 25 23:08:10 UTC 2007


Marc G. Fournier wrote:
> Mar 20 07:59:26 mars sshd[717]: error: reexec socketpair: No buffer space
> available
>
>
> If I have a login session on the machine, I can easily do a reboot of the
> machine, and it seems to come up clean every time (ie. no fsck's need to be
> run) ...
> Does anyone have any ideas of what I can look at?
>   
How odd. The re-exec feature is not documented in the man page. It 
appears that it can be turned off with the -r switch according to 
sshd.c. Can you give that a try and see if that offers symptomatic 
relief? It would be somewhat less secure as sshd will fork rather than 
fork..exec.

The code does indeed appear to use socketpair. FreeBSD implements 
socketpair as a system call. Only AF_UNIX, SOCK_STREAM sockets are 
accepted.  A quick look in KScope suggests the first place where this 
can fail with ENOBUFS is soalloc() from socreate().

Is this machine under heavy memory load in any way? soalloc() uses a 
zone allocator. I'm not sure how to track that from userland, vmstat -m 
only deals with kernel malloc() stats.

BMS


More information about the freebsd-stable mailing list