Hi misc@,

I have a x86_64 server that has had two "crashes" running out of file
descriptors (kern.nfiles.) It'll take nearly 3 months, but eventually
the system runs out. I can't SSH in, even a local login says it can't
find shared libraries, so I can't get in that way. It'll still pass
network traffic, respond to ping, etc.

I believe that I've narrowed this down to net/dante's sockd.

freya# fstat | grep sockd | wc -l
     483
(A few days later.)
freya# fstat | grep sockd | wc -l
     1050

So sockd appears to have an issue not closing out file descriptors, but
I'm also curious on the OpenBSD side of things why sockd isn't killed.
This has happened on 7.8 and 7.9. I've yet to upgrade the system to 8.0.

It seems like _sockd should be in the daemon login class, which limits
file descriptors to 1024 by default. Yet it's already above that.

Do network sockets not count towards that limit? Is there a limit
anywhere, for network sockets?

I'm curious if anyone else has run into this issue in general, or with
net/dante.

In case it's relevant, I'm attaching my sockd configuration inline.

(The intent is to allow IPv6 users, internally, to reach IPv4
services externally, which it does just fine until the system runs
out of file descriptors.)

internal: 2602:f5ef::1080 port = 1080
external: 142.249.45.12
#user.privileged: root
user.unprivileged: _sockd
logoutput: /var/log/sockd.log
clientmethod: none
socksmethod: none

## client access rules

# block connections to localhost, or they will appear to come from the proxy.
socks block { from: 0/0 to: lo0 log: connect }

socks block { from: 0/0 to: 142.249.45.11/29 log: connect }

socks pass {
from: 2602:f5ef::/48 to: 0.0.0.0/0
clientmethod: none
log: connect
}

client pass {
from: 2602:f5ef::/48 to: 0/0
clientmethod: none
log: connect
}

Thank you!

-Teran

Reply via email to