iperf icon indicating copy to clipboard operation
iperf copied to clipboard

libiperf hanging with tests over 100s

Open Shaun-3adesign opened this issue 1 year ago • 2 comments

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/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

Shaun-3adesign avatar Feb 08 '24 15:02 Shaun-3adesign

Couple questions:

  1. What happens if you don't enable JSON output and just get the default human-readable output?
  2. What's the network like between the client and the server? In particular, any chance there's some kind of stateful firewall in between?

bmah888 avatar Feb 09 '24 18:02 bmah888

Hi Bruce,

If you don’t enabler JSON output it returns as normal

The connection is across the internet not sure what firewall they have that side but I have a fritzbox.

I can write out the same data before calling the fprintf line by creating a file and writing to it. It just seems to hang outputting to stdout as if I set a logfile it works fine.

I’ve have now tested much more and it always works if I set a logfile. Currently got a 5 hour test g oing

I am using python not sure if that would make a difference

Regards

Shaun

From: Bruce A. Mah @.> Date: Friday, 9 February 2024 at 18:53 To: esnet/iperf @.> Cc: shaun hirst @.>, Author @.> Subject: Re: [esnet/iperf] libiperf hanging with tests over 100s (Issue #1648)

Couple questions:

  1. What happens if you don't enable JSON output and just get the default human-readable output?
  2. What's the network like between the client and the server? In particular, any chance there's some kind of stateful firewall in between?

— Reply to this email directly, view it on GitHubhttps://github.com/esnet/iperf/issues/1648#issuecomment-1936443265, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AZQTNCD2VCVT5WK3VSR5WADYSZWELAVCNFSM6AAAAABC76PYUSVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSMZWGQ2DGMRWGU. You are receiving this because you authored the thread.Message ID: @.***>

Shaun-3adesign avatar Feb 09 '24 19:02 Shaun-3adesign