Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp4645593imu; Tue, 15 Jan 2019 03:43:03 -0800 (PST) X-Google-Smtp-Source: ALg8bN5aIr/mpgi/YfzjSmNgZk9hxcLZ2Vm6+D2zxPynRG8EaYHh9LQIuJw6w0MNXEN25dGZ+Epc X-Received: by 2002:a17:902:31a4:: with SMTP id x33mr3610243plb.41.1547552583096; Tue, 15 Jan 2019 03:43:03 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1547552583; cv=none; d=google.com; s=arc-20160816; b=ytntts5c1X17Qq4x40MXrIoZvBYR2HlyNS3Hdh3GE3HjEFjo3ugu3tG6M6i+Ti/w3e zquB5siFLbblnOyuv9p2uaKdkTaR1Z3IgEd3Lwy94CrHDrzuyo4ep0i8NLbUGSuqR87f 834ygSpv8bUYQkZBhVIFrsJ0OdE/QaiCg+Bd29EOkpD3cpF0Ln1FdMiuItrGQnSPgJor hqw2NkFnDt37QrecR/Saqsfm7G96yvbtyVZSQQfUW0cI43UODJcDHZPBmHVfu8WSTj/i NUMOkoRE7BuWaMGn63q3pPdSmv0xgozG1TY7pcyu9ryyjt+Vi3muoJyi+G8dZ0zrYgCw OJdA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-transfer-encoding:content-disposition:mime-version :references:message-id:subject:cc:to:from:date; bh=zqlgQzW89rBEttGUFl4lXBDPBzE/jWKQQ0jtPRRuZr8=; b=hSA7sj68jWPQKdgHhCNtPtcn7Vk6eMmHdHoIw8ihbxFpSAOTzYiviJba69sVBu2FHT Hg5hJQq+RNdlWxAtCHCy+RSmlNG6QQnYEOzw+PX0AcYLqTmy8rZnVw8kqzJeZY1Ps8Za QNjW+BAOlzlvY3RIwi+ngvTFxddPqZCrBHb03PUoKYghim75NaDw2IJYfXCGvLRzTO/W q7orCaUq/CTddjeNHcOTTKn2XIoKGArI46bvAWxRDqAoiRq3gwlNm/2KXwrgAeh/hdei gZ07ceXnhOjyGw2Tk49250tyEVw/w87S4uyB71B1Zt+h7dqIgmdcmZ+f75NpgWhZ3qmM Fn2Q== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id v17si3219979pga.566.2019.01.15.03.42.47; Tue, 15 Jan 2019 03:43:03 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727985AbfAOKKJ (ORCPT + 99 others); Tue, 15 Jan 2019 05:10:09 -0500 Received: from mx2.suse.de ([195.135.220.15]:37256 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726011AbfAOKKJ (ORCPT ); Tue, 15 Jan 2019 05:10:09 -0500 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.220.254]) by mx1.suse.de (Postfix) with ESMTP id 62B73ADF5; Tue, 15 Jan 2019 10:10:07 +0000 (UTC) Received: by unicorn.suse.cz (Postfix, from userid 1000) id EB498E00A1; Tue, 15 Jan 2019 11:10:06 +0100 (CET) Date: Tue, 15 Jan 2019 11:10:06 +0100 From: Michal Kubecek To: netfilter-devel@vger.kernel.org Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org, Martin Steigerwald Subject: Re: [REGRESSION] 5.0-rc2: iptables -nvL consumes 100% of CPU and hogs memory with kernel 5.0-rc2 Message-ID: <20190115101006.GE26670@unicorn.suse.cz> References: <1608957.xtEoauR4Ya@merkaba> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <1608957.xtEoauR4Ya@merkaba> User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org (CC netfilter-devel and netdev) On Mon, Jan 14, 2019 at 11:53:10PM +0100, Martin Steigerwald wrote: > Hi! > > Does that ring a bell with someone? For now I just downgraded, no time > for detailed analysis. > > Debian bug report at: > > iptables -nvL consumes 100% of CPU and hogs memory with kernel 5.0-rc2 > https://bugs.debian.org/919325 > > 4.20 works, 5.0-rc2 showed this issue with iptables. Configurations attached. > > Excerpt from Debian bug report follows: > > I upgraded to self-compiled 5.0-rc2 today and found the machine to be slow > after startup. I saw iptables consuming 100% CPU, it only responded to > SIGKILL. It got restarted several times, probably by some systemd service. > > Then I started 'iptables -nvL' manually. And I got this: > > % strace -p 5748 > [… tons more, in what appeared an endless loop …] > recvmsg(3, {msg_name={sa_family=AF_NETLINK, nl_pid=0, nl_groups=00000000}, msg_namelen=12, msg_iov=[{iov_base={{len=372, type=0xa06 /* NLMSG_??? */, flags=NLM_F_MULTI|0x800, seq=0, pid=5748}, "\x02\x00\x00\x11\x0b\x00\x01\x00\x66\x69\x6c\x74\x65\x72\x00\x00\x0b\x00\x02\x00\x4f\x55\x54\x50\x55\x54\x00\x00\x0c\x00\x03\x00"...}, iov_len=16536}], msg_iovlen=1, msg_controllen=0, msg_flags=0}, 0) = 372 > recvmsg(3, {msg_name={sa_family=AF_NETLINK, nl_pid=0, nl_groups=00000000}, msg_namelen=12, msg_iov=[{iov_base={{len=372, type=0xa06 /* NLMSG_??? */, flags=NLM_F_MULTI|0x800, seq=0, pid=5748}, "\x02\x00\x00\x11\x0b\x00\x01\x00\x66\x69\x6c\x74\x65\x72\x00\x00\x0b\x00\x02\x00\x4f\x55\x54\x50\x55\x54\x00\x00\x0c\x00\x03\x00"...}, iov_len=16536}], msg_iovlen=1, msg_controllen=0, msg_flags=0}, 0) = 372 > recvmsg(3, {msg_name={sa_family=AF_NETLINK, nl_pid=0, nl_groups=00000000}, msg_namelen=12, msg_iov=[{iov_base={{len=372, type=0xa06 /* NLMSG_??? */, flags=NLM_F_MULTI|0x800, seq=0, pid=5748}, "\x02\x00\x00\x11\x0b\x00\x01\x00\x66\x69\x6c\x74\x65\x72\x00\x00\x0b\x00\x02\x00\x4f\x55\x54\x50\x55\x54\x00\x00\x0c\x00\x03\x00"...}, iov_len=16536}], msg_iovlen=1, msg_controllen=0, msg_flags=0}, 0) = 372 > recvmsg(3, ^C{msg_name={sa_family=AF_NETLINK, nl_pid=0, nl_groups=00000000}, msg_namelen=12, msg_iov=[{iov_base={{len=372, type=0xa06 /* NLMSG_??? */, flags=NLM_F_MULTI|0x800, seq=0, pid=5748}, "\x02\x00\x00\x11\x0b\x00\x01\x00\x66\x69\x6c\x74\x65\x72\x00\x00\x0b\x00\x02\x00\x4f\x55\x54\x50\x55\x54\x00\x00\x0c\x00\x03\x00"...}, iov_len=16536}], msg_iovlen=1, msg_controllen=0, msg_flags=0}, 0) = 372 > strace: Process 5748 detached > > and this (output from atop): > > PID TID MINFLT MAJFLT VSTEXT VSLIBS VDATA VSTACK VSIZE RSIZE PSIZE VGROW RGROW SWAPSZ RUID EUID MEM CMD 1/16 > 11575 - 61552 0 152K 2324K 5.0G 132K 5.1G 5.1G 0K 240.4M 240.5M 0K root root 33% iptables > > I had it growing till 10 GiB before I stopped it by SIGKILL to prevent > excessive swapping. > > I will attach kernel configuration. > > That is all I am willing to spend time on for now before going to sleep. > I will however reboot with older 4.20 kernel to see whether it is kernel > related. > > […] > > -- System Information: > Debian Release: buster/sid > […] > Kernel: Linux 5.0.0-rc2-tp520 (SMP w/4 CPU cores; PREEMPT) > > Thanks, > -- > Martin