Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save oli-logicnow/68008b7f7b352d72755f5fa2aced5760 to your computer and use it in GitHub Desktop.
Save oli-logicnow/68008b7f7b352d72755f5fa2aced5760 to your computer and use it in GitHub Desktop.
debugging hanging processes (network connection edition)
strace -p {{PROCESS_ID}}
poll([{fd=20, events=POLLIN}], 1, 0) = 0 (Timeout) << see timeout
GRAB FileDescriptor (20)
ls -l /proc/{{PROCESS_ID}}/fd/{{FD}}
lrwx------ 1 root root 64 Jul 18 15:41 /proc/29915/fd/20 -> socket:[2426613614]
GRAB SOCKET (2426613614)
lsof | grep {{SOCKET}}
reacted:41135->ec2-10-19-5-2.eu-west-1.compute.amazonaws.com:https (ESTABLISHED) <-- find culpret
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment