All of lore.kernel.org
 help / color / mirror / Atom feed
* commit f5f99309 (sock: do not set sk_err in sock_dequeue_err_skb) has broken ping
@ 2017-06-01 14:00 Cyril Hrubis
  2017-06-01 14:10 ` Soheil Hassas Yeganeh
  0 siblings, 1 reply; 9+ messages in thread
From: Cyril Hrubis @ 2017-06-01 14:00 UTC (permalink / raw)
  To: David S. Miller, Shmulik Ladkani, Marcelo Ricardo Leitner,
	Pravin B Shelar, Eric Dumazet, Soheil Hassas Yeganeh, WANG Cong,
	Yaogong Wang, Steffen Klassert, Al Viro, netdev, linux-kernel

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

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2017-06-01 20:03 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-06-01 14:00 commit f5f99309 (sock: do not set sk_err in sock_dequeue_err_skb) has broken ping Cyril Hrubis
2017-06-01 14:10 ` 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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.