NetBSD-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

bin/48952: Race in t_stat:stat_socket: test expects EINPROGRESS; got ECONNREFUSED once



>Number:         48952
>Category:       bin
>Synopsis:       Race in t_stat:stat_socket: test expects EINPROGRESS; got 
>ECONNREFUSED once
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    bin-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Wed Jun 25 20:45:00 +0000 2014
>Originator:     Garrett Cooper
>Release:        n/a
>Organization:
EMC / Isilon Storage Division
>Environment:
FreeBSD freebsd-11-x64.localdomain 11.0-CURRENT FreeBSD 11.0-CURRENT #2 
r267801+8b3cf1c(more-tools-regression-integration): Tue Jun 24 21:17:31 PDT 
2014     root@freebsd-11-x64.localdomain:/usr/obj/usr/src/sys/GENERIC-DEBUG  
amd64
>Description:
The code in src/tests/lib/libc/sys/t_stat tries to connect to 127.0.0.1:42 
(dns), and is effectively racing against other errors like ECONNREFUSED, etc, 
depending on whether or not there's a DNS server running on the host, the load 
on the system, etc.

Using a Unix domain socket might be better.

# kyua report --action 95 | grep stat_socket
lib/libc/sys/t_stat:stat_socket  ->  failed: 
/usr/src/lib/libc/tests/sys/t_stat.c:354: Expected errno 36, got 61, in 
connect(fd, (struct sockaddr *)&addr, sizeof(struct sockaddr_in)) == -1  
[0.008s]
# netstat -a
Active Internet connections (including servers)
Proto Recv-Q Send-Q Local Address          Foreign Address        (state)
tcp4       0      0 freebsd-11-x64.w.ssh   wkstn-gcooper.we.49990 ESTABLISHED
tcp4       0      0 xxxxplonamv1c.co.979   192.168.137.129.nfsd   CLOSED
tcp4       0      0 localhost.smtp         *.*                    LISTEN
tcp4       0      0 *.ssh                  *.*                    LISTEN
tcp6       0      0 *.ssh                  *.*                    LISTEN
udp4       0      0 localhost.ntp          *.*
udp6       0      0 fe80::1%lo0.ntp        *.*
udp6       0      0 localhost.ntp          *.*
udp4       0      0 xxxxplonamv1c.co.ntp   *.*
udp4       0      0 freebsd-11-x64.w.ntp   *.*
udp6       0      0 *.ntp                  *.*
udp4       0      0 *.ntp                  *.*
udp4       0      0 *.syslog               *.*
udp6       0      0 *.syslog               *.*
Active UNIX domain sockets
Address  Type   Recv-Q Send-Q    Inode     Conn     Refs  Nextref Addr
fffff800038943c0 stream      0      0        0 fffff800038a3d20        0        0
fffff800038a3d20 stream      0      0        0 fffff800038943c0        0        0
fffff80003894690 stream      0      0 fffff80003868000        0        0        
0 /var/run/casper
fffff800038e4780 stream      0      0        0 fffff800038e4870        0        0
fffff800038e4870 stream      0      0        0 fffff800038e4780        0        0
fffff800038e4b40 stream      0      0 fffff800038631d8        0        0        
0 /var/run/devd.pipe
fffff800038e42d0 dgram       0      0        0 fffff80003894780        0 
fffff800038e43c0
fffff800038e43c0 dgram       0      0        0 fffff80003894780        0 
fffff800038e44b0
fffff800038e44b0 dgram       0      0        0 fffff80003894780        0 
fffff800038e45a0
fffff800038e45a0 dgram       0      0        0 fffff80003894780        0 
fffff800038945a0
fffff800038944b0 dgram       0      0        0 fffff80003894870        0        0
fffff800038945a0 dgram       0      0        0 fffff80003894780        0 
fffff800038e4690
fffff800038e4690 dgram       0      0        0 fffff80003894780        0 
fffff800038e4960
fffff800038e4960 dgram       0      0        0 fffff80003894780        0        0
fffff80003894780 dgram       0      0 fffff80003bebb10        0 
fffff800038e42d0        0 /var/run/logpriv
fffff80003894870 dgram       0      0 fffff80003bebce8        0 
fffff800038944b0        0 /var/run/log
>How-To-Repeat:

>Fix:



Home | Main Index | Thread Index | Old Index