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

Server side JSON problem #1631

Closed
zokl opened this issue Jan 9, 2024 · 3 comments
Closed

Server side JSON problem #1631

zokl opened this issue Jan 9, 2024 · 3 comments
Assignees
Labels
bug:json Bugs related to JSON output

Comments

@zokl
Copy link

zokl commented Jan 9, 2024

  • Version of iperf3: 3.16+ from 4.1.2024
  • Hardware: x86_64
  • Operating system (and distribution, if any): Linux, OpenWRT x86_64
root@cli1:~# iperf3 -v
iperf 3.16+ (cJSON 1.7.15)
Linux cli1 5.10.201 #0 SMP Thu Jan 4 21:29:46 2024 x86_64
Optional features available: CPU affinity setting, IPv6 flow label, TCP congestion algorithm setting, sendfile / zerocopy, socket pacing, bind to device, support IPv4 don't fragment, POSIX threads

Bug Report

  • Expected Behavior

Server side report will be without unformated messages.

  • Actual Behavior

Server side structure is valid but at the and is unformated message : iperf3: error - unable to write to stream socket: Invalid argument or iperf3: error - no error. This error is very similar to this closed issue: #1143 but on server side (@davidBar-On ).

		"sum_sent":	{
			"start":	0,
			"end":	90.000614,
			"seconds":	90.000614,
			"bytes":	10557718528,
			"bits_per_second":	938457466.790171,
			"retransmits":	1,
			"sender":	true
		},
		"sum_received":	{
			"start":	0,
			"end":	90.000614,
			"seconds":	90.000614,
			"bytes":	0,
			"bits_per_second":	0,
			"sender":	true
		},
		"cpu_utilization_percent":	{
			"host_total":	36.1468918421911,
			"host_user":	0.734266323616089,
			"host_system":	35.412626629677185,
			"remote_total":	0,
			"remote_user":	0,
			"remote_system":	0
		},
		"sender_tcp_congestion":	"cubic"
	}
}
iperf3: error - unable to write to stream socket: Invalid argument

or sometime:

            "sum_received": {
                      "start":        0,
                      "end":  10.00105,
                      "seconds":      10.00105,
                      "bytes":        7484473344,
                      "bits_per_second":      5986950045.44523,
                      "sender":       false
              },
              "cpu_utilization_percent":      {
                      "host_total":   85.012575052611453,
                      "host_user":    2.79302852241707,
                      "host_system":  82.219516533647,
                      "remote_total": 0,
                      "remote_user":  0,
                      "remote_system":        0
              },
              "receiver_tcp_congestion":      "bbr"
      }
}
iperf3: error - no error

Version 3.15. is OK. Thie behaviour begin with version 3.16.
Client side json report is OK. MacOS version is not affected by this bug.

  • Steps to Reproduce

On the same machine

iperf3 -s -J -1
iperf3 -c 127.0.0.1 -J

iperf3_1.json

@ffolkes1911
Copy link

Somewhat similar issue occurs when iperf exits due to SIGINT (ctrl+c), the output contains additional errors at the start and end of output:

iperf_json_finish: pthread_mutex_lock: Invalid argument
{
	"start":	{
		"connected":	[{
				"socket":	5,
                                ....
			"remote_user":	0,
			"remote_system":	0
		},
		"sender_tcp_congestion":	"cubic"
	},
	"error":	"interrupt - the client has terminated"
}
iperf_errexit: pthread_mutex_unlock: Invalid argument

@davidBar-On
Copy link
Contributor

Submitted PR #1677 which hopefully fix these issues.

@bmah888 bmah888 self-assigned this Apr 24, 2024
@bmah888 bmah888 added the bug:json Bugs related to JSON output label Apr 24, 2024
@bmah888
Copy link
Contributor

bmah888 commented Apr 25, 2024

I don't think macOS is immune to this behavior. I'm actually seeing this problem (or something very closely related) on macOS 14.4.1.

I think at least one of the problems came in when we merged PR #1098 but I'm not sure if the bug was part of the PR or how we merged it.

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

No branches or pull requests

4 participants