Created
October 25, 2021 18:20
-
-
Save D4R4/4dcc5355920a2933f85df9dbac1a22e5 to your computer and use it in GitHub Desktop.
Recover process with stuck fd call, from superuser.blog
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Find process information | |
ps aux | grep <name> | |
strace -p <pid> | |
ls -l /proc//fd | |
lrwx-- 1 sanket sanket 64 Feb 5 23:00 0 ->; /dev/pts/19 | |
lrwx-- 1 sanket sanket 64 Feb 5 23:00 1 ->; /dev/pts/19 | |
lrwx-- 1 sanket sanket 64 Feb 5 22:59 2 ->; /dev/pts/19 | |
... | |
lrwx-- 1 sanket sanket 64 Feb 5 23:00 11 -> socket:[102286] | |
$ lsof -i -a -p <pid> | grep 102286 | |
COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME | |
telnet 14480 sanket 3u IPv4 102286 0t0 TCP 192.168.1.2:59254 ->; maa03s21-in-f78.1e100.net:http (ESTABLISHED) | |
$ gdb -p <pid> | |
call close(11) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment