I used strace to attach to a process briefly. The process created 90 threads. When I found the offending thread, I had to tediously search for the parent thread
strace
To capture traffic for a single process you can use strace, as @stackmate suggested.
strace -f -e trace=network -s 10000 -p ;
or output it to a file.
strace -f -e trace=network -s 10000 -o dumpfile -p
-f for all forked process, -s for string size to print, and -o to dump the output to a file.
-f
-s
-o