Conversation

... not every day do i get an opportunity to trace a bug from an application i was simply trying to use, all the way through hyper, tokio, mio, and std::net_imp into some deeper abyss what possessed the environment i'm running to return -ENOENT from getsockname()? i have no idea
5
179
instead i got (with the bind() call succeeding on strace): > thread 'tokio-runtime-worker' panicked at 'error binding to 0.0.0.0:8082: error creating server listener: File not found. (os error 2) which makes absolutely no sense however you may look at it
1
55
Replying to and
It's pretty common. It prevents programs from screwing themselves over with ptrace because they fail to attach. Some programs think it's a good idea to ptrace themselves for one reason or another and screw it up in a way that causes races, screwed up signal handling, etc.
1
ptrace is also definitely a strong contender for worst *nix API. Maybe debuggers could actually be good if the OS had usable, working APIs. It screws up threads, signals and sub-processes. Causes extra system call interrupts too. PTRACE_SEIZE makes it less bad on Linux.
2