From: Cyril Hrubis <chrubis@suse•cz>
To: "David S. Miller" <davem@davemloft•net>,
Shmulik Ladkani <shmulik.ladkani@gmail•com>,
Marcelo Ricardo Leitner <marcelo.leitner@gmail•com>,
Pravin B Shelar <pshelar@ovn•org>,
Eric Dumazet <edumazet@google•com>,
Soheil Hassas Yeganeh <soheil@google•com>,
WANG Cong <xiyou.wangcong@gmail•com>,
Yaogong Wang <wygivan@google•com>,
Steffen Klassert <steffen.klassert@secunet•com>,
Al Viro <viro@zeniv•linux.org.uk>,
netdev@vger•kernel.org, linux-kernel@vger•kernel.org
Subject: commit f5f99309 (sock: do not set sk_err in sock_dequeue_err_skb) has broken ping
Date: Thu, 1 Jun 2017 16:00:48 +0200 [thread overview]
Message-ID: <20170601140048.GA24401@rei.lan> (raw)
Hi!
I've started to wonder why is ping eating 100% CPU shortly after I've
upgraded my machine to 4.10 and here is what I found:
The ping main_loop() sleeps in poll() on its socket, the poll() usually times
out, at least that's what strace suggets which causes ping to sleep for ~1s in
the kernel.
See ping source at:
https://github.com/iputils/iputils/blob/master/ping_common.c#L587
The poll() seems to start returning POLLERR immediatelly after poll() is called
on the socket in a case that connection has dropped for a short while. It seems to be easily reproducible with:
* Starting ping with some ip address i.e. ping 4.2.2.2
* Letting it ping for a minute or so
* Disconnection a WAN cable from your AP
* After a minute or so ping ends up bussy looping on
poll() that returns with POLLERR immediatelly
* After plugging the cable back the problem gets only
worse since we now spend 99% of the time bussy looping
on the poll() syscall
* And my CPU fan starts to scream loudly
I've bisected the problem to this commit:
commit f5f99309fa7481f59a500f0d08f3379cd6424c1f (HEAD, refs/bisect/bad)
Author: Soheil Hassas Yeganeh <soheil@google•com>
Date: Thu Nov 3 18:24:27 2016 -0400
sock: do not set sk_err in sock_dequeue_err_skb
--
Cyril Hrubis
chrubis@suse•cz
next reply other threads:[~2017-06-01 14:00 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-06-01 14:00 Cyril Hrubis [this message]
2017-06-01 14:10 ` commit f5f99309 (sock: do not set sk_err in sock_dequeue_err_skb) has broken ping Soheil Hassas Yeganeh
2017-06-01 14:31 ` Cyril Hrubis
2017-06-01 14:39 ` Soheil Hassas Yeganeh
2017-06-01 15:10 ` Cyril Hrubis
2017-06-01 15:15 ` Soheil Hassas Yeganeh
2017-06-01 15:36 ` Cyril Hrubis
2017-06-01 16:42 ` Soheil Hassas Yeganeh
2017-06-01 20:03 ` Cyril Hrubis
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=20170601140048.GA24401@rei.lan \
--to=chrubis@suse$(echo .)cz \
--cc=davem@davemloft$(echo .)net \
--cc=edumazet@google$(echo .)com \
--cc=linux-kernel@vger$(echo .)kernel.org \
--cc=marcelo.leitner@gmail$(echo .)com \
--cc=netdev@vger$(echo .)kernel.org \
--cc=pshelar@ovn$(echo .)org \
--cc=shmulik.ladkani@gmail$(echo .)com \
--cc=soheil@google$(echo .)com \
--cc=steffen.klassert@secunet$(echo .)com \
--cc=viro@zeniv$(echo .)linux.org.uk \
--cc=wygivan@google$(echo .)com \
--cc=xiyou.wangcong@gmail$(echo .)com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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