Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

File descriptors never closed?? #160

Open
riaqn opened this issue Jan 18, 2021 · 1 comment
Open

File descriptors never closed?? #160

riaqn opened this issue Jan 18, 2021 · 1 comment

Comments

@riaqn
Copy link

riaqn commented Jan 18, 2021

I used redsocks mostly to proxy my torrent client, so the number of connection is expected to be high. But the number seems unreasonably high.

27172 is the pid of redsocks.

root@darkbox /p/27172# ls -l /proc/27172/fd | wc -l
16459

Note at this time I have my torrent client closed. So I honestly don't understand how is this possible.

Everytime I start redsocks, it functions normally in the begining, then the number of fd increases until it reaches the limit of fd at which point it refuses to accept more connection. I then have to restart redsocks.

Also I try to find more info about these fd, they seem to be the same.

lrwx------ 1 redsocks redsocks 64 Jan 18 11:54 9995 -> 'socket:[945748]'
lrwx------ 1 redsocks redsocks 64 Jan 18 11:54 9996 -> 'socket:[945749]'
lrwx------ 1 redsocks redsocks 64 Jan 18 11:54 9997 -> 'socket:[945750]'
lrwx------ 1 redsocks redsocks 64 Jan 18 11:54 9998 -> 'socket:[945751]'
lrwx------ 1 redsocks redsocks 64 Jan 18 11:54 9999 -> 'socket:[945752]'

root@darkbox /p/27172# cat /proc/27172/fdinfo/11067
pos:	0
flags:	04002
mnt_id:	9
root@darkbox /p/27172# cat /proc/27172/fdinfo/11020
pos:	0
flags:	04002
mnt_id:	9
root@darkbox /p/27172# cat /proc/27172/fdinfo/5510
pos:	0
flags:	04002
mnt_id:	9
@riaqn
Copy link
Author

riaqn commented Jan 18, 2021

This issue is apparently related to #99
Also I tried kill -USR1, which causes redsocks to segfault.

Jan 18 18:32:48 darkbox redsocks[32768]: Dumping client list for socks5 at 0.0.0.0:31338:
Jan 18 18:32:48 darkbox systemd[1]: redsocks.service: Main process exited, code=dumped, status=11/SEGV
Jan 18 18:32:48 darkbox systemd[1]: redsocks.service: Failed with result 'core-dump'.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant