netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Phil Sutter <phil@nwl.cc>
To: Li Er <phoooyb@gmail.com>
Cc: netdev@vger.kernel.org, Cyrill Gorcunov <gorcunov@gmail.com>
Subject: Re: iproute2 ss outputs duplicate tcp sockets info on kernel 3.10.105
Date: Wed, 10 May 2017 12:37:23 +0200	[thread overview]
Message-ID: <20170510103723.GR20805@orbyte.nwl.cc> (raw)
In-Reply-To: <591121b4.213b9f0a.5aed.b3a8@mx.google.com>

Hi,

Cc'ing Cyrill who wrote the code in question. Maybe he has an idea
what's going wrong here.

Cheers, Phil

On Mon, May 08, 2017 at 06:56:04PM -0700, Li Er wrote:
> i'm using v4.11.0 release of iproute2 and kernel 3.10.105, simply
> running
> 
>         $ ss
>         Netid  State      Recv-Q Send-Q Local Address:Port                 Peer Address:Port
>         tcp    CLOSE-WAIT 434    0      10.0.0.1:47931                65.49.18.136:https
>         tcp    CLOSE-WAIT 432    0      10.0.0.1:47932                65.49.18.136:https
>         tcp    CLOSE-WAIT 434    0      10.0.0.1:47931                65.49.18.136:https
>         tcp    CLOSE-WAIT 432    0      10.0.0.1:47932                65.49.18.136:https
> 
> as you can see, there's one duplicate entry of each  tcp  socket,
> however,  if  i  explicitly  specify  tcp socket by adding the -t
> switch,
> 
>         $ ss -t
>         State      Recv-Q Send-Q Local Address:Port                 Peer Address:Port
>         CLOSE-WAIT 434    0      10.0.0.1:47931                65.49.18.136:https
>         CLOSE-WAIT 432    0      10.0.0.1:47932                65.49.18.136:https
> 
> the duplication is gone.
> 
> this problem also occurs on  git  master,  but  not  on  iproute2
> v4.3.0,  so  i  did  a  git bisect and found out the commit which
> caused this is 9f66764e308e9c645b3fb2d1cfbb7fb207eb5de1,  and  by
> revert this commit on git master, i.e. removing
> 
>                                         err = rtnl_dump_done(rth, h);
>                                         if (err < 0)
>                                                 return -1;
> 
> these 3 lines of code of lib/libnetlink.c, the problem is gone.
> 
> since  i'm not familiar with the source code, i doubt this is the
> right way to solve the problem, what's your suggestions? thanks.

      reply	other threads:[~2017-05-10 10:37 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-05-09  1:56 iproute2 ss outputs duplicate tcp sockets info on kernel 3.10.105 Li Er
2017-05-10 10:37 ` Phil Sutter [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20170510103723.GR20805@orbyte.nwl.cc \
    --to=phil@nwl.cc \
    --cc=gorcunov@gmail.com \
    --cc=netdev@vger.kernel.org \
    --cc=phoooyb@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).