alpha net-yy test failures due to port decode errors

Masatake YAMATO yamato at redhat.com
Mon Mar 2 17:56:20 UTC 2015


On Mon, 2 Mar 2015 04:48:13 -0500, Mike Frysinger <vapier at gentoo.org> wrote:
> --- a/socketutils.c
> +++ b/socketutils.c
> @@ -64,7 +64,7 @@ inet_parse_response(const char *proto_name, const void *data, int data_len,
>  		    const unsigned long inode)
>  {
>  	const struct inet_diag_msg *diag_msg = data;
> -	static const char zero_addr[sizeof(struct in6_addr)];
> +	static const char zero_addr[sizeof(struct in6_addr) + 20];
>  	socklen_t addr_size, text_size;
>  
>  	if (diag_msg->idiag_inode != inode)


Thank you. but I just wonder why this has effects on the result.

Could you try the patch and run tests on alpha?

The patch generates /tmp/strace-yy-debug, which helps us to debug.

The patch dumps diag_msg like:

    TCP:[127.0.0.1:53834->127.0.0.1:57272]
    0000: 02  01  00  00  d2  4a  df  b8 | 7f  00  00  01  00  00  00  00  
    0010: 00  00  00  00  00  00  00  00 | 7f  00  00  01  00  00  00  00  
    0020: 00  00  00  00  00  00  00  00 | 00  00  00  00  00  9d  a7  18  
    0030: 02  88  ff  ff  00  00  00  00 | 00  00  00  00  00  00  00  00  
    0040: e8  03  00  00  4e  fe  02  00 | 
    TCP:[127.0.0.1:53834->127.0.0.1:57272]
    0000: 02  01  00  00  d2  4a  df  b8 | 7f  00  00  01  00  00  00  00  
    0010: 00  00  00  00  00  00  00  00 | 7f  00  00  01  00  00  00  00  
    0020: 00  00  00  00  00  00  00  00 | 00  00  00  00  00  9d  a7  18  
    0030: 02  88  ff  ff  00  00  00  00 | 00  00  00  00  00  00  00  00  
    0040: e8  03  00  00  4e  fe  02  00 | 


If ss command, which is part of iproute2, is available on the alpha system,

    %  ss -n -t -p 
    State      Recv-Q Send-Q        Local Address:Port          Peer Address:Port 
    ESTAB      0      0              10.64.244.96:49945          10.64.255.1:631    users:(("gnome-settings-",pid=4724,fd=21))
    ESTAB      0      0             192.168.11.12:42019         96.43.148.82:443    users:(("firefox",pid=6415,fd=40))
    CLOSE-WAIT 1      0             192.168.11.12:58661       152.19.134.142:443   

Older ss just opens /proc/net/tcp and read it.
Newer ss uses netlink socket to get tcp socket informaton as strace -yy does.

You can detect newer or older with "/usr/bin/strace -e open ss -t".
Older implentation may open /proc/net/tcp. Newer one may not.

Regards,
Masatake YAMATO
-------------- next part --------------
A non-text attachment was scrubbed...
Name: debug.patch
Type: text/x-patch
Size: 1211 bytes
Desc: not available
URL: <http://lists.strace.io/pipermail/strace-devel/attachments/20150303/d54161d5/attachment.bin>


More information about the Strace-devel mailing list