I love articles about expert sleuthing, especially when it involves low-level code. I hope the author shares his discovery with the Go engineering and documentation teams, perhaps via bug reports.
Meanwhile, if you try to run the system lldb on the system ruby interpreter on OSX, you get this:
% lldb ruby
(lldb) target create "ruby"
Current executable set to 'ruby' (x86_64).
(lldb) run
error: process exited with status -1
(cannot attach to process due to System Integrity Protection)
Great tools, I should try to use them.
In this case could it have been done by lsof ?
"UDP connections"? UPD is connection less.
I often wonder why I don't come across bugs like this but then I think to myself "I'd never write code that closes a socket until all writes and reads are done."
So the question is: how do you do that in Go?
One thing that the article does not mention is that dtruss is also just a DTrace script (well, a DTrace script in a shell script ;)). DTrace comes with some other nice scripts (iosnoop, execsnoop, opensnoop, etc.)[1].
But you need to disable some portion of the system integrity protection:
http://stackoverflow.com/a/34616033
[1] http://dtrace.org/blogs/brendan/2011/10/10/top-10-dtrace-scr...