libiperf hanging with tests over 100s
- Dominant language
- C
- Stars
- 8.8k
- Forks
- 1.5k
- PR merge metrics
- No merged PRs in 30d
Description
# Context
when using libiperf to run a test the test never returns if the duration 100 seconds, traffic is generated but results are never returned.
* Version of iperf3: 3.1.3, 3.9, 3.14 and 3.16
* Operating system (and distribution, if any): ubuntu 20.04 and 22.04
# Bug Report
using libiperf to run a test greater than 100s causes it to hang after sending data, running iperf3 from a command line works fine
* Expected Behavior
expect the call to run_client_test to return the json output
* Actual Behavior
the call never returns
* Steps to Reproduce
run a tcp test with a duration over 100s and json enabled
* Debugging
digging into this it actually get stuck doing the following
file: [iperf](https://github.com/esnet/iperf/tree/master)/[src](https://github.com/esnet/iperf/tree/master/src)/iperf_api.c
function: iperf_json_finish
line: 4885 fprintf(test->outfile, "%s\n", test->json_output_string);
it just never returns, but I was able to print out test->json_output_string to a file before calling it
also if I set the log file before running the test it completes without issue
python wrapper where initial issue was seen https://github.com/thiezn/iperf3-python/issues/53
Contributor guide
Assessment
This issue has not been assessed yet.