Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

JSON output errors #1688

Closed
bmah888 opened this issue Apr 25, 2024 · 0 comments · Fixed by #1689
Closed

JSON output errors #1688

bmah888 opened this issue Apr 25, 2024 · 0 comments · Fixed by #1689
Assignees
Labels
bug:json Bugs related to JSON output

Comments

@bmah888
Copy link
Contributor

bmah888 commented Apr 25, 2024

Context

  • Version of iperf3: iperf-3.16+

  • Hardware: x86_64

  • Operating system (and distribution, if any): any

Bug Report

  • Expected Behavior

--json should emit a single JSON object at the end of a test

  • Actual Behavior

--json emits two copies of the expected monolithic JSON object

  • Steps to Reproduce

Use --json output on a build of iperf3 from master after merging of PR #1677. That PR didn't cause the issue, but it uncovered this issue in the process of fixing other problems.

  • Possible Solution

Working on it. Basically I'm restructuring iperf_json_finish() and cleaning up some of the logic, as well as adding some locking in places that need it.

@bmah888 bmah888 added the bug:json Bugs related to JSON output label Apr 25, 2024
@bmah888 bmah888 self-assigned this Apr 25, 2024
bmah888 added a commit that referenced this issue Apr 26, 2024
Add locking around fprintf() calls in JSONStream_Output(). Probably
not needed at the moment given that this function can only be called
from the main thread, but added for consistency and possible future
usage.

Fixes #1688.
bmah888 added a commit that referenced this issue Apr 26, 2024
…#1688)

Add locking around fprintf() calls in JSONStream_Output(). Probably
not needed at the moment given that this function can only be called
from the main thread, but added for consistency and possible future
usage.
@bmah888 bmah888 linked a pull request Apr 26, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug:json Bugs related to JSON output
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant