From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 84F41C433F5 for ; Mon, 13 Dec 2021 16:51:26 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id AB9056B0072; Mon, 13 Dec 2021 11:51:15 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id A40CF6B0073; Mon, 13 Dec 2021 11:51:15 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 8E1776B0074; Mon, 13 Dec 2021 11:51:15 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0247.hostedemail.com [216.40.44.247]) by kanga.kvack.org (Postfix) with ESMTP id 7B40C6B0072 for ; Mon, 13 Dec 2021 11:51:15 -0500 (EST) Received: from smtpin22.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay03.hostedemail.com (Postfix) with ESMTP id 169FF82499B9 for ; Mon, 13 Dec 2021 16:51:05 +0000 (UTC) X-FDA: 78913360890.22.4705568 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by imf01.hostedemail.com (Postfix) with ESMTP id 38E354000F for ; Mon, 13 Dec 2021 16:51:01 +0000 (UTC) Received: from mail.kernel.org (unknown [198.145.29.99]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 1019E61183; Mon, 13 Dec 2021 16:51:03 +0000 (UTC) Received: by mail.kernel.org (Postfix) with ESMTPSA id 38DC760E52; Mon, 13 Dec 2021 16:51:02 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linux-foundation.org; s=korg; t=1639414262; bh=sFDt+W5XEMzu3Zm0YbpBKJRbZsBBz/GM6JVfB0j0k2s=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=qMnoi34HPy9s0j4z3C7H8zFIGUfSzmP4GJt/lcnY69lJTq9phXKWVehBikDPMA3hA S5iDXStvzhdf4+fCDlccJ/6ohGBE/Ny06wCv8Nnsak+FNVvXna3Nw/bpy033RpvY9/ IgnFOQ7Me2Ru0CR205qsWC710q/ORySQky3nKPTE= Date: Mon, 13 Dec 2021 08:51:00 -0800 From: Andrew Morton To: Minchan Kim , Sergey Senozhatsky Cc: bugzilla-daemon@bugzilla.kernel.org, linux-mm@kvack.org Subject: Re: [Bug 215323] New: Frequently swapping, userspace program will abnormally exit. Message-Id: <20211213085100.61b8bb179871b5f42704a8e6@linux-foundation.org> In-Reply-To: References: X-Mailer: Sylpheed 3.5.1 (GTK+ 2.24.31; x86_64-pc-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Rspamd-Server: rspam10 X-Rspamd-Queue-Id: 38E354000F X-Stat-Signature: zz5qsmt4aju74fafkyctns5sutiyqwgc Authentication-Results: imf01.hostedemail.com; dkim=pass header.d=linux-foundation.org header.s=korg header.b=qMnoi34H; dmarc=none; spf=pass (imf01.hostedemail.com: domain of akpm@linux-foundation.org designates 139.178.84.217 as permitted sender) smtp.mailfrom=akpm@linux-foundation.org X-HE-Tag: 1639414261-661674 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: (switched to email. Please respond via emailed reply-to-all, not via the bugzilla web interface). On Mon, 13 Dec 2021 16:38:44 +0000 bugzilla-daemon@bugzilla.kernel.org wrote: > https://bugzilla.kernel.org/show_bug.cgi?id=215323 Thanks. > > Bug ID: 215323 > Summary: Frequently swapping, userspace program will abnormally > exit. Looks like a zram data corruption. > Product: Memory Management > Version: 2.5 > Kernel Version: Linux 5.15.6 > Hardware: Intel > OS: Linux > Tree: Mainline > Status: NEW > Severity: normal > Priority: P1 > Component: Other > Assignee: akpm@linux-foundation.org > Reporter: dengchangcheng2021@163.com > Regression: No Are you sure "No"? Did previous kernels do this, or only 5.15? > kernel: 5.15.6 version kernel > config: using x86_64_defconfig plus docker and zram configurations > > # free -m > total used free shared buff/cache available > Mem: 3868 3560 37 3 270 42 > Swap: 3868 1819 2049 > > Userspace program(for example dockerd) had a big chance to exit abnormally when > frequently swapping with zram in about an hour. We found that a page on the > stack of the program is cleaned to zero. In order to find out who cleans stack, > we add a monitor to catch whether a page is modifed by swap. And we found out a > page is indeed modifed after swap out/in. > > To reproduce, do the following. > At first, set the value of /proc/sys/vm/swappiness to 100. > Then use programs that include mmap or malloc to consume memory, so that to > trigger swap frequently occurs. > Finally, use docker to load images in multiple ways. > After running for a while, dockerd will exit. At the same time dockerd will > record the following: > runtime: unexpected return pc for 2021-12-09T03:32:30.290948+00:00 (none) > dockerd[350]: time="2021-12-09T03:32:30.290846695Z" level=info msg="Applied > tar sha256:d69d9fecbe66f52f6ba42cf251286a8912d80c20938e25620654a87e5760ccae > to cca4b9df0747f37898e41bd2059d1a38fdf57c24b31bd00e248e2ba6cd03d63d, size: > 10565287" > runtime.gopark called from 0x0 > stack: frame={sp:0xc4202c1dd8, fp:0xc4202c1df8} > stack=[0xc4202c1800,0xc4202c2000) > 000000c4202c1cd8: 0000000000000000 0000000000000000 > 000000c4202c1ce8: 0000000000000000 0000000000000000 > 000000c4202c1cf8: 0000000000000000 0000000000000000 > 000000c4202c1d08: 0000000000000000 0000000000000000 > 000000c4202c1d18: 0000000000000000 0000000000000000 > 000000c4202c1d28: 0000000000000000 0000000000000000 > 000000c4202c1d38: 0000000000000000 0000000000000000 > 000000c4202c1d48: 0000000000000000 0000000000000000 > 000000c4202c1d58: 0000000000000000 0000000000000000 > 000000c4202c1d68: 0000000000000000 0000000000000000 > 000000c4202c1d78: 0000000000000000 0000000000000000 > 000000c4202c1d88: 0000000000000000 0000000000000000 > 000000c4202c1d98: 0000000000000000 0000000000000000 > 000000c4202c1da8: 0000000000000000 0000000000000000 > 000000c4202c1db8: 0000000000000000 0000000000000000 > 000000c4202c1dc8: 0000000000000000 0000000000000000 > 000000c4202c1dd8: <0000000000000000 0000000000000000 > 000000c4202c1de8: 0000000000000000 !0000000000000000 > 000000c4202c1df8: >0000000000000000 0000000000000000 > 000000c4202c1e08: 0000000000000000 0000000000000000 > 000000c4202c1e18: 0000000000000000 0000000000000000 > 000000c4202c1e28: 0000000000000000 0000000000000000 > 000000c4202c1e38: 0000000000000000 0000000000000000 > 000000c4202c1e48: 0000000000000000 0000000000000000 > 000000c4202c1e58: 0000000000000000 0000000000000000 > 000000c4202c1e68: 0000000000000000 0000000000000000 > 000000c4202c1e78: 0000000000000000 0000000000000000 > 000000c4202c1e88: 0000000000000000 0000000000000000 > 000000c4202c1e98: 0000000000000000 0000000000000000 > 000000c4202c1ea8: 0000000000000000 0000000000000000 > 000000c4202c1eb8: 0000000000000000 0000000000000000 > 000000c4202c1ec8: 0000000000000000 0000000000000000 > 000000c4202c1ed8: 0000000000000000 0000000000000000 > 000000c4202c1ee8: 0000000000000000 0000000000000000 > fatal error: unknown caller pc > > -- > You may reply to this email to add a comment. > > You are receiving this mail because: > You are the assignee for the bug.