Hi,
I'm running iperf-2.1.1-dev on an OpenWRT system using the following
command:

iperf --client "server-url" -p 5001 --format m --time 10 --reverse

The measurement is successful but there seems to be a thread that is never
joined, therefore making the process run endlessly. I cross-compiled iperf
from source for my target using debugging flags such as
--enable-thread-debug and the resulting log can be seen in the attached
file iperflog-openwrt.txt.

For comparison, I also runned the same measurement on my PC (Ubuntu 20.04)
and the process terminated correctly. See the attached file
iperflog-ubuntu.txt.
The difference can be seen in the last few lines of the log files. While on
Ubuntu the reporter thread finishes correctly:

THREAD(45773):[16:52:03.100912] Free common=0x7f5e84000d50
THREAD(45773):[16:52:03.100965] reporter thread job queue request lock
THREAD(45773):[16:52:03.101013] reporter thread job queue unlock
THREAD(45773):[16:52:03.101059] Reporter thread finished user/traffic 1/0
THREAD(45773):[16:52:03.101139] Free thread settings=0x55d046cda8d0

On OpenWRT it doesn't:

THREAD(17129):[19:33:26.868959] Free common=0x77de58e0
THREAD(17129):[19:33:26.869685] Server destructor sock=3 fullduplex=false
THREAD(17129):[19:33:26.870928] Free thread settings=0x77f3f730
THREAD(17127):[19:33:27.864247] Jobq *WAIT* exit  0/0 cond=0x447ac4
threads=1
THREAD(17127):[19:33:28.864703] Jobq *WAIT* exit  0/0 cond=0x447ac4
threads=1
THREAD(17127):[19:33:29.865145] Jobq *WAIT* exit  0/0 cond=0x447ac4
threads=1
THREAD(17127):[19:33:30.865592] Jobq *WAIT* exit  0/0 cond=0x447ac4
threads=1

Some additional information:
OS: OpenWRT 19.07.7
Processor architecture: MIPS 32

Thank you in advance!
root@OpenWrt:~# ./iperf-openwrt --client "server-url" -p 5001  --format m 
--time 10 --reverse
THREAD(17126):[19:33:16.632688] Copy thread settings (malloc) 
from/to=0x987920/0x77f3f3c0 report/sum/fullduplex 0/0/0
THREAD(17126):[19:33:16.633673] Thread_run_wrapper(0x77f3f3c0 mode=4) thread 
counts tot/trfc=1/0
THREAD(17126):[19:33:16.634729] Thread_run_wrapper(0x987920 mode=2) thread 
counts tot/trfc=2/1
THREAD(17128):[19:33:16.635676] Client constructor with thread 0x987920 sum=0 
(flags=4003200)
THREAD(17127):[19:33:16.637877] Reporter thread started
THREAD(17127):[19:33:16.639133] Alloc common=0x987e10
THREAD(17127):[19:33:16.640064] Reporter await done
THREAD(17128):[19:33:16.652324] Alloc common=0x77f3f8d0
THREAD(17128):[19:33:16.653108] Init settings report 0x447f20
THREAD(17128):[19:33:16.654016] Jobq *POST* report 0x447f20 (settings)
THREAD(17127):[19:33:16.654997] Jobq *WAIT* exit  0/0x447f20 cond=0x447ac4 
threads=1
THREAD(17127):[19:33:16.655345] Jobq *ROOT* 0x447f20 (last=0)
------------------------------------------------------------
Client connecting to server-url, TCP port 5001
TCP window size: 43.8 KByte (default)
------------------------------------------------------------
THREAD(17127):[19:33:16.655784] Jobq *FREE* report 0x447f20 (settings)
THREAD(17127):[19:33:16.656183] Free common=0x77f3f8d0
THREAD(17127):[19:33:16.656526] Jobq *REMOVE* 0x447f20
THREAD(17128):[19:33:16.659289] Alloc common=0x77f3f8b0
THREAD(17128):[19:33:16.660147] Init connection report 0x447f20
THREAD(17128):[19:33:16.660984] Jobq *POST* report 0x447f20 (connection)
THREAD(17127):[19:33:16.661853] Jobq *WAIT* exit  0/0x447f20 cond=0x447ac4 
threads=1
THREAD(17127):[19:33:16.662588] Jobq *ROOT* 0x447f20 (last=0)
[  1] local 192.168.15.107 port 35184 connected with server-ip port 5001 
(reverse)
THREAD(17127):[19:33:16.664122] Jobq *FREE* report 0x447f20 (connection)
THREAD(17127):[19:33:16.664965] Free common=0x77f3f8b0
THREAD(17127):[19:33:16.665893] Jobq *REMOVE* 0x447f20
THREAD(17128):[19:33:16.666819] Client spawn thread reverse (sock=3)
THREAD(17128):[19:33:16.667739] Copy thread settings (malloc) 
from/to=0x987920/0x77f3f730 report/sum/fullduplex 0/0/0
THREAD(17128):[19:33:16.668632] Client start sync enterred
THREAD(17128):[19:33:16.669763] Alloc common=0x77de5330
THREAD(17128):[19:33:16.670614] Job report 0x77f3faa0 uses multireport 0 and 
fullduplex report is 0 (socket=3)
THREAD(17128):[19:33:16.671794] Init 10000 element packet ring=0x447f90 
consumer=0x447ac4 producer=0x987b78 total rings=1 enable=1
THREAD(17128):[19:33:16.672657] Init data report 0x77f3faa0 using 
packetring=0x447f90 cond=0x987b78
THREAD(17128):[19:33:16.674042] Client(3) report start/ipg=1623958396.674038 
next=0.0
THREAD(17128):[19:33:16.674944] Client start sync exited
THREAD(17128):[19:33:16.676473] Thread_run_wrapper(0x77f3f730 mode=1) thread 
counts tot/trfc=3/2
THREAD(17129):[19:33:16.677762] spawn server settings=0x77f3f730 
GroupSumReport=0 sock=3
THREAD(17129):[19:33:16.678614] Server constructor with thread=0x77f3f730 sum=0 
(sock=3)
THREAD(17129):[19:33:16.679543] Alloc common=0x77de58e0
THREAD(17129):[19:33:16.681270] Job report 0x77de5510 uses multireport 0 and 
fullduplex report is 0 (socket=3)
THREAD(17129):[19:33:16.682532] Init 10000 element packet ring=0x77de5ac0 
consumer=0x447ac4 producer=0x77f3f988 total rings=2 enable=1
THREAD(17129):[19:33:16.683394] Init data report 0x77de5510 using 
packetring=0x77de5ac0 cond=0x77f3f988
THREAD(17129):[19:33:16.684249] Server(3) report start=1623958396.684246 
next=0.0
THREAD(17129):[19:33:16.685283] Jobq *POST* report 0x77de54f0 (data)
THREAD(17127):[19:33:16.686268] Jobq *WAIT* exit  0/0x77de54f0 cond=0x447ac4 
threads=2
THREAD(17127):[19:33:16.686661] Jobq *ROOT* 0x77de54f0 (last=0)
THREAD(17129):[19:33:26.854213] Server thread detected EOF on socket 3
THREAD(17129):[19:33:26.854931] Reporting last packet for 0x77de5510  qdepth=5 
sock=3
THREAD(17129):[19:33:26.855520] Traffic thread awaiting reporter to be done 
with 0x77de5510 and cond 0x77f3f988
[ ID] Interval       Transfer     Bandwidth
[ *1] 0.00-10.17 sec   216 MBytes   178 Mbits/sec
THREAD(17127):[19:33:26.863814] Jobq *REMOVE* 0x77de54f0
THREAD(17129):[19:33:26.864588] tcp close sock=3
THREAD(17129):[19:33:26.865653] Jobq *FREE* report 0x77de54f0 (data)
THREAD(17129):[19:33:26.866383] Free report hdr=0x77de5510 reporter thread 
suspend count=613 packetring=0x77de5ac0 histo=0 frame histo=0
THREAD(17129):[19:33:26.867774] Free packet ring=0x77de5ac0 producer=0x77f3f988 
(consumer=0x447ac4) awaits = 0 total rings = 1
THREAD(17129):[19:33:26.868959] Free common=0x77de58e0
THREAD(17129):[19:33:26.869685] Server destructor sock=3 fullduplex=false
THREAD(17129):[19:33:26.870928] Free thread settings=0x77f3f730
THREAD(17127):[19:33:27.864247] Jobq *WAIT* exit  0/0 cond=0x447ac4 threads=1
THREAD(17127):[19:33:28.864703] Jobq *WAIT* exit  0/0 cond=0x447ac4 threads=1
THREAD(17127):[19:33:29.865145] Jobq *WAIT* exit  0/0 cond=0x447ac4 threads=1
THREAD(17127):[19:33:30.865592] Jobq *WAIT* exit  0/0 cond=0x447ac4 threads=1
THREAD(17127):[19:33:31.866058] Jobq *WAIT* exit  0/0 cond=0x447ac4 threads=1
THREAD(17127):[19:33:32.866518] Jobq *WAIT* exit  0/0 cond=0x447ac4 threads=1
THREAD(17127):[19:33:33.867005] Jobq *WAIT* exit  0/0 cond=0x447ac4 threads=1
THREAD(17127):[19:33:34.867527] Jobq *WAIT* exit  0/0 cond=0x447ac4 threads=1
THREAD(17127):[19:33:35.867988] Jobq *WAIT* exit  0/0 cond=0x447ac4 threads=1
THREAD(17127):[19:33:36.868523] Jobq *WAIT* exit  0/0 cond=0x447ac4 threads=1
THREAD(17127):[19:33:37.868956] Jobq *WAIT* exit  0/0 cond=0x447ac4 threads=1
THREAD(17127):[19:33:38.869500] Jobq *WAIT* exit  0/0 cond=0x447ac4 threads=1
THREAD(17127):[19:33:39.869945] Jobq *WAIT* exit  0/0 cond=0x447ac4 threads=1
^C^Croot@OpenWrt:~# 
user@ubuntu:~$ ./iperf-ubuntu --client "server-url" -p 5001 --format m --time 
10 --reverse
THREAD(45772):[16:51:50.068876] Copy thread settings (malloc) 
from/to=0x55d046cd7eb0/0x55d046cda8d0 report/sum/fullduplex (nil)/(nil)/(nil)
THREAD(45772):[16:51:50.069072] Thread_run_wrapper(0x55d046cda8d0 mode=4) 
thread counts tot/trfc=1/0
THREAD(45773):[16:51:50.069186] Reporter thread started
THREAD(45773):[16:51:50.069306] Alloc common=0x7f5e84000d50
THREAD(45772):[16:51:50.069344] Thread_run_wrapper(0x55d046cd7eb0 mode=2) 
thread counts tot/trfc=2/1
THREAD(45774):[16:51:50.069456] Client constructor with thread 0x55d046cd7eb0 
sum=(nil) (flags=4003200)
THREAD(45773):[16:51:50.069518] Reporter await done
THREAD(45774):[16:51:50.093539] Alloc common=0x7f5e7c021050
THREAD(45774):[16:51:50.093605] Init settings report 0x7f5e7c020de0
THREAD(45774):[16:51:50.093634] Jobq *POST* report 0x7f5e7c020de0 (settings)
THREAD(45774):[16:51:50.093678] Alloc common=0x7f5e7c021580
THREAD(45773):[16:51:50.093721] Jobq *WAIT* exit  (nil)/0x7f5e7c020de0 
cond=0x55d0453d29c0 threads=1
THREAD(45773):[16:51:50.093789] Jobq *ROOT* 0x7f5e7c020de0 (last=(nil))
------------------------------------------------------------
Client connecting to server-url, TCP port 5001
TCP window size: 85.0 KByte (default)
------------------------------------------------------------
THREAD(45774):[16:51:50.093836] Init connection report 0x7f5e7c021310
THREAD(45774):[16:51:50.093937] Jobq *POST* report 0x7f5e7c021310 (connection)
THREAD(45774):[16:51:50.093974] Client spawn thread reverse (sock=3)
THREAD(45774):[16:51:50.094010] Copy thread settings (malloc) 
from/to=0x55d046cd7eb0/0x7f5e7c0217f0 report/sum/fullduplex (nil)/(nil)/(nil)
THREAD(45774):[16:51:50.094040] Client start sync enterred
THREAD(45774):[16:51:50.094100] Alloc common=0x7f5e7c0220e0
THREAD(45774):[16:51:50.094137] Job report 0x7f5e7c021cb0 uses multireport 
(nil) and fullduplex report is (nil) (socket=3)
THREAD(45774):[16:51:50.094199] Init 10000 element packet ring=0x7f5e7c022350 
consumer=0x55d0453d29c0 producer=0x55d046cd8178 total rings=1 enable=1
THREAD(45774):[16:51:50.094224] Init data report 0x7f5e7c021cb0 using 
packetring=0x7f5e7c022350 cond=0x55d046cd8178
THREAD(45773):[16:51:50.094307] Jobq *FREE* report 0x7f5e7c020de0 (settings)
THREAD(45773):[16:51:50.094381] Free common=0x7f5e7c021050
THREAD(45773):[16:51:50.094420] Jobq *REMOVE* 0x7f5e7c020de0
THREAD(45773):[16:51:50.094453] Jobq *ROOT* 0x7f5e7c021310 (last=(nil))
[  1] local 192.168.0.103 port 42784 connected with server-ip port 5001 
(reverse)
THREAD(45774):[16:51:50.094491] Client(3) report start/ipg=1623959510.94313 
next=0.0
THREAD(45774):[16:51:50.094541] Client start sync exited
THREAD(45773):[16:51:50.094578] Jobq *FREE* report 0x7f5e7c021310 (connection)
THREAD(45773):[16:51:50.094656] Free common=0x7f5e7c021580
THREAD(45773):[16:51:50.094700] Jobq *REMOVE* 0x7f5e7c021310
THREAD(45775):[16:51:50.094736] spawn server settings=0x7f5e7c0217f0 
GroupSumReport=(nil) sock=3
THREAD(45775):[16:51:50.094807] Server constructor with thread=0x7f5e7c0217f0 
sum=(nil) (sock=3)
THREAD(45774):[16:51:50.094852] Thread_run_wrapper(0x7f5e7c0217f0 mode=1) 
thread counts tot/trfc=3/2
THREAD(45775):[16:51:50.094960] Alloc common=0x7f5e80021250
THREAD(45775):[16:51:50.095004] Job report 0x7f5e80020e20 uses multireport 
(nil) and fullduplex report is (nil) (socket=3)
THREAD(45775):[16:51:50.095063] Init 10000 element packet ring=0x7f5e80021540 
consumer=0x55d0453d29c0 producer=0x7f5e7c021ab8 total rings=2 enable=1
THREAD(45775):[16:51:50.095099] Init data report 0x7f5e80020e20 using 
packetring=0x7f5e80021540 cond=0x7f5e7c021ab8
THREAD(45775):[16:51:50.095127] Server(3) report start=1623959510.95126 next=0.0
THREAD(45775):[16:51:50.095161] Jobq *POST* report 0x7f5e80020e00 (data)
THREAD(45773):[16:51:50.095213] Jobq *WAIT* exit  (nil)/0x7f5e80020e00 
cond=0x55d0453d29c0 threads=2
THREAD(45773):[16:51:50.095248] Jobq *ROOT* 0x7f5e80020e00 (last=(nil))
THREAD(45775):[16:52:02.095348] Reporting last packet for 0x7f5e80020e20  
qdepth=13 sock=3
THREAD(45775):[16:52:02.095393] Traffic thread awaiting reporter to be done 
with 0x7f5e80020e20 and cond 0x7f5e7c021ab8
[ ID] Interval       Transfer     Bandwidth
[ *1] 0.00-12.00 sec  22.2 MBytes  15.5 Mbits/sec
THREAD(45773):[16:52:02.100583] Jobq *REMOVE* 0x7f5e80020e00
THREAD(45775):[16:52:02.100639] tcp close sock=3
THREAD(45775):[16:52:02.100690] Jobq *FREE* report 0x7f5e80020e00 (data)
THREAD(45775):[16:52:02.100704] Free report hdr=0x7f5e80020e20 reporter thread 
suspend count=744 packetring=0x7f5e80021540 histo=(nil) frame histo=(nil)
THREAD(45775):[16:52:02.100717] Free packet ring=0x7f5e80021540 
producer=0x7f5e7c021ab8 (consumer=0x55d0453d29c0) awaits = 0 total rings = 1
THREAD(45775):[16:52:02.100808] Free common=0x7f5e80021250
THREAD(45775):[16:52:02.100820] Server destructor sock=3 fullduplex=false
THREAD(45775):[16:52:02.100835] Free thread settings=0x7f5e7c0217f0
THREAD(45774):[16:52:02.100876] Client join reverse done (sock=3)
THREAD(45774):[16:52:02.100896] Jobq *FREE* report 0x7f5e7c021c90 (data)
THREAD(45774):[16:52:02.100907] Free report hdr=0x7f5e7c021cb0 reporter thread 
suspend count=0 packetring=0x7f5e7c022350 histo=(nil) frame histo=(nil)
THREAD(45774):[16:52:02.100920] Free packet ring=0x7f5e7c022350 
producer=0x55d046cd8178 (consumer=0x55d0453d29c0) awaits = 0 total rings = 0
THREAD(45774):[16:52:02.100946] Free common=0x7f5e7c0220e0
THREAD(45774):[16:52:02.100961] Client destructor sock=3 report=(nil) 
server-reverse=false fullduplex=false
THREAD(45774):[16:52:02.100980] Free thread settings=0x55d046cd7eb0
THREAD(45773):[16:52:03.100814] Jobq *WAIT* exit  (nil)/(nil) 
cond=0x55d0453d29c0 threads=0
THREAD(45773):[16:52:03.100912] Free common=0x7f5e84000d50
THREAD(45773):[16:52:03.100965] reporter thread job queue request lock
THREAD(45773):[16:52:03.101013] reporter thread job queue unlock
THREAD(45773):[16:52:03.101059] Reporter thread finished user/traffic 1/0
THREAD(45773):[16:52:03.101139] Free thread settings=0x55d046cda8d0
_______________________________________________
Iperf-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/iperf-users

Reply via email to