Howdy fierce tracers and many thanks for this great tool! I noticed something which is odd: descriptors for sockets are not consistently decoded. I am using a stock strace 4.8 on a 64 bits machine: If I trace a simple wget like this (with -y): strace -qq -ff -y -a1 -o wg wget http://nexb.com I get some thing like this (shortened for brevity):
[...] socket(PF_INET, SOCK_DGRAM|SOCK_NONBLOCK, IPPROTO_IP) = 3 connect(3, {sa_family=AF_INET, sin_port=htons(53), sin_addr=inet_addr("192.168.0.1")}, 16) = 0 poll([{fd=3<socket:[69384967]>, events=POLLOUT}], 1, 0) = 1 ([{fd=3, revents=POLLOUT}]) sendto(3, "\4G\1\0\0\1\0\0"..., 26, MSG_NOSIGNAL, NULL, 0) = 26 poll([{fd=3<socket:[69384967]>, events=POLLIN}], 1, 5000) = 1 ([{fd=3, revents=POLLIN}]) ioctl(3<socket:[69384967]>, FIONREAD, [87]) = 0 recvfrom(3, "\4G\201\200\0\1\0\0"..., 1024, 0, {sa_family=AF_INET, sin_port=htons(53), sin_addr=inet_addr("192.168.0.1")}, [16]) = 87 close(3<socket:[69384967]>) = 0 [...] The issue is that the socket descriptor 3 is not always decoded on all calls, in particular the connect, sendto and recvfrom calls. I would have expected something like this instead when using a -y: connect(3<socket:[69384967]>, {sa_family=AF_INET, sin_port=htons(53), sin_addr=inet_addr("192.168.0.1")}, 16) = 0 sendto(3<socket:[69384967]>, "\4G\1\0\0\1\0\0"..., 26, MSG_NOSIGNAL, NULL, 0) = 26 recvfrom(3<socket:[69384967]>, "\4G\201\200\0\1\0\0"..., 1024, 0, {sa_family=AF_INET, sin_port=htons(53), sin_addr=inet_addr("192.168.0.1")}, [16]) = 87 Is this a bug? Note that close (which is both a network and file call) shows the decoded socket alright. Let me work out a patch -- Philippe Ombredanne ------------------------------------------------------------------------------ WatchGuard Dimension instantly turns raw network data into actionable security intelligence. It gives you real-time visual feedback on key security issues and trends. Skip the complicated setup - simply import a virtual appliance and go from zero to informed in seconds. http://pubads.g.doubleclick.net/gampad/clk?id=123612991&iu=/4140/ostg.clktrk _______________________________________________ Strace-devel mailing list Strace-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/strace-devel