RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 1375215 - ss incorrectly represents cwnd
Summary: ss incorrectly represents cwnd
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: iproute
Version: 7.2
Hardware: All
OS: Linux
medium
medium
Target Milestone: rc
: ---
Assignee: Davide Caratti
QA Contact: Jaroslav Aster
Ioanna Gkioka
URL:
Whiteboard:
Depends On:
Blocks: 1393481
TreeView+ depends on / blocked
 
Reported: 2016-09-12 13:37 UTC by suresh kumar
Modified: 2020-09-10 09:47 UTC (History)
9 users (show)

Fixed In Version: iproute-3.10.0-75.el7
Doc Type: Bug Fix
Doc Text:
*ss* now displays correctly cwnd Previously, the *ss* utility displayed Transmission Control Protocol congestion window (TCP cwnd) values from the kernel, performing a cast from unsigned to signed 32-bit integer. As a consequence, some values can overflow and be interpreted as a negative value. With this update, the *ss* code has been fixed, and the utility no longer displays negative cwnd values.
Clone Of:
Environment:
Last Closed: 2017-08-01 21:32:13 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2017:2171 0 normal SHIPPED_LIVE iproute bug fix and enhancement update 2017-08-01 18:40:13 UTC

Description suresh kumar 2016-09-12 13:37:40 UTC
Description of problem:
tcp->snd_cwd is a u32, but ss treats it like a signed int.  This results in negative bandwidth calculations.


src/include/linux/tcp.h

202:            is_cwnd_limited:1;/* forward progress limited by snd_cwnd? */
232:    u32     snd_cwnd;       /* Sending congestion window            */ 
233:    u32     snd_cwnd_cnt;   /* Linear increase counter              */
234:    u32     snd_cwnd_clamp; /* Do not allow snd_cwnd to grow above this */
235:    u32     snd_cwnd_used;
236:    u32     snd_cwnd_stamp;

>>> Probably need to change this %d to a %u, and deal with the casting to double below. <<<<


iproute2-3.10.0/misc/ss.c

1270         if (s.cwnd != 2)
1271             printf(" cwnd:%d", s.cwnd);

1416         if (info->tcpi_snd_cwnd != 2)
1417             printf(" cwnd:%d", info->tcpi_snd_cwnd);

1431         if (rtt > 0 && info->tcpi_snd_mss && info->tcpi_snd_cwnd) {
1432             printf(" send %sbps",
1433                    sprint_bw(b1, (double) info->tcpi_snd_cwnd *
1434                      (double) info->tcpi_snd_mss * 8000000.
1435                      / rtt));



Sample data (DCTCP):

[root@tesla02 ~]# /usr/lpp/mmfs/bin/mmdsh -F host.list 'ss -e -t -o -i | grep -A 1 gpfs | grep -A 1 10.219.31.131 | grep alpha' | grep -v tesla02 | sort | column -t
tesla11:  ts  sack  ecn  ecnseen  dctcp  wscale:1,1  rto:11  rtt:0.144/0.047  ato:40  mss:1448  cwnd:1187830594  dctcp:(ce_state:0,alpha:15,ab_ecn:0,ab_tot:0)      send  95554372228.4Mbps   lastrcv:2    unacked:10          retrans:0/21231546  reordering:40       rcv_rtt:11.375    rcv_space:262236
tesla12:  ts  sack  ecn  ecnseen  dctcp  wscale:1,1  rto:11  rtt:0.109/0.028  ato:40  mss:1448  cwnd:-679123792  dctcp:(ce_state:0,alpha:15,ab_ecn:0,ab_tot:0)      send  384274597709.5Mbps  lastrcv:1    unacked:13          retrans:0/11495136  sacked:2            reordering:38     rcv_rtt:12.375    rcv_space:262236
tesla13:  ts  sack  ecn  ecnseen  dctcp  wscale:1,1  rto:11  rtt:0.095/0.035  ato:40  mss:1448  cwnd:28          dctcp:



Version-Release number of selected component (if applicable):
iproute-3.10.0-54.el7_2.1

How reproducible:


Steps to Reproduce:
1.
2.
3.

Actual results:


Expected results:


Additional info:

Comment 3 Davide Caratti 2016-09-22 08:51:34 UTC
Maybe Hangbin already had this in his queue http://marc.info/?l=linux-netdev&m=147453365410663&w=2

Comment 10 errata-xmlrpc 2017-08-01 21:32:13 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2017:2171


Note You need to log in before you can comment on or make changes to this bug.