Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751214AbdFAOA5 (ORCPT ); Thu, 1 Jun 2017 10:00:57 -0400 Received: from mx2.suse.de ([195.135.220.15]:59377 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751058AbdFAOAz (ORCPT ); Thu, 1 Jun 2017 10:00:55 -0400 Date: Thu, 1 Jun 2017 16:00:48 +0200 From: Cyril Hrubis 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@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 Message-ID: <20170601140048.GA24401@rei.lan> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.5.24 (2015-08-30) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1281 Lines: 36 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 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