[LTP] [PATCH 1/1] netstress: Workaround race between SETSID() and exit(0)

Petr Vorel pvorel@suse.cz
Fri Feb 18 17:10:05 CET 2022


Hm, on one of the machines it blocked after 12 runs:

tcp_ipsec 1 TINFO: run server 'netstress -D ltp_ns_veth1 -R 10 -B /tmp/LTP_tcp_ipsec.txQv6HznbZ'
tcp_ipsec 1 TINFO: run client 'netstress -l -H 10.0.0.1 -n 100 -N 100 -D ltp_ns_veth2 -a 2 -r 100 -d tst_netload.res' 5 times

root     22529  0.0  0.0   4812   792 pts/2    S+   11:02   0:00 ns_exec 3181 net mnt sh -c  netstress -D ltp_ns_veth1 -R 10 -B /tmp/LTP_tcp_ipsec.txQv6HznbZ  || echo RTERR
root     22530  0.0  0.2  18216  2880 pts/2    S+   11:02   0:00 sh -c  netstress -D ltp_ns_veth1 -R 10 -B /tmp/LTP_tcp_ipsec.txQv6HznbZ  || echo RTERR
root     22531  0.0  0.0   9072   920 pts/2    S+   11:02   0:00 netstress -D ltp_ns_veth1 -R 10 -B /tmp/LTP_tcp_ipsec.txQv6HznbZ
root     22532  0.0  0.0   9072   160 pts/2    S    11:02   0:00 netstress -D ltp_ns_veth1 -R 10 -B /tmp/LTP_tcp_ipsec.txQv6HznbZ
root     22533  0.0  0.0   9072   168 ?        Ss   11:02   0:00 netstress -D ltp_ns_veth1 -R 10 -B /tmp/LTP_tcp_ipsec.txQv6HznbZ

# strace -p 22531
strace: Process 22531 attached
wait4(22532, strace: Process 22531 detached
 <detached ...>

# strace -p 22532
strace: Process 22532 attached
pause(strace: Process 22532 detached
 <detached ...>

# strace -p 22533
strace: Process 22533 attached
accept(5,  <unfinished ...>)            = ?

But maybe just caused by running in loop without any sleep (was ok next time):
i=0; while true; do i=$((i+1)); echo "=== $i ==="; ./tcp_ipsec.sh -s 100:1000:65535:R65535 || break; done

Kind regards,
Petr


More information about the ltp mailing list