From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id D5FA740DFC0 for ; Fri, 17 Apr 2026 00:16:12 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1776384972; cv=none; b=s++cy1LwJck6YswX8oUZ8i2nMmu6gF+lAhgCKRahDmERMBRinPpnu945FGfSS1x/ckxI78uL+R30iUH5XRMccKBAwv4S12m1gWpAIgwctC2nZTWJJ7yOyf9zLyeD/iDSa2kEhWSsqOqquODPu5iuWYXtPQ/pqeCJOZWVxMX802c= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1776384972; c=relaxed/simple; bh=XYOidQpkI9KotYZ1KVcYNWzUfOC94k6Mq2yAvSsc7TM=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=budI3mmpFbPMguupIQ/Dvd3nbmqsPy1arwZ9Edje0zjKdnzPeItZvkW/zIM0xVaCHAD1vW/I73GNXvn+AFAep0emFOPCSm74x3ik0+pPuHl9MrGcSSx+YSxTDJc7FsgE0UbLLtU1myfmHLLz/LONngmtl3HJpbOR95yxmDgxYd4= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=E/VwFvFy; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="E/VwFvFy" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 7A58BC2BCAF; Fri, 17 Apr 2026 00:16:12 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1776384972; bh=XYOidQpkI9KotYZ1KVcYNWzUfOC94k6Mq2yAvSsc7TM=; h=Date:From:To:Cc:Subject:Reply-To:References:In-Reply-To:From; b=E/VwFvFyD2SHLqb+gi9M3UH4yIMW436RqRP8oln0fV1ob/FCditV4O1MOkvX3rjFv mGljJ1t9z3SdIInEY5/zyVn9QIx/2rRiprZkpJQX/WMI8QdXQ322PId+QU5BwXwOkd KHYLiDkgV2H8YOWMREyPGQl/lyRNcmumIkQysUb+JeAN5po5iYLZlHsNdGcyRwVCfA OCSwgbvUdHaZOezRltazJiY8U73QTNxSki9CZh5+MsHOkQaoJb240iVwDQjLL9+wTO V66IHeTnYwkIuvsCOU33rLTwu8wri/OEkbMCi2efiVSTZ+5tuHtZIbc2h5qpfWmZf9 Y9AvI1qzs+xSw== Received: by paulmck-ThinkPad-P17-Gen-1.home (Postfix, from userid 1000) id E7A2CCE08B2; Thu, 16 Apr 2026 17:16:11 -0700 (PDT) Date: Thu, 16 Apr 2026 17:16:11 -0700 From: "Paul E. McKenney" To: Steven Rostedt Cc: LKML , Frederic Weisbecker , Joel Fernandes , Eric Dumazet , Kuniyuki Iwashima , Paolo Abeni , Willem de Bruijn , Yao Kai Subject: Re: [WARNING] RCU stall in sock_def_readable() Message-ID: Reply-To: paulmck@kernel.org References: <20260415132722.788bbdcf@fedora> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20260415132722.788bbdcf@fedora> On Wed, Apr 15, 2026 at 01:27:22PM -0400, Steven Rostedt wrote: > Hi, > > Did anything change recently with respect to RCU stall detection or > sock_def_readable()? My tests have been failing pretty much in the same > place every other time I run it. It's getting rather annoying. The test > runs: > > trace-cmd record -p function -e syscalls ./hackbench 50 > > (enables syscall trace events along with function tracing and records to a file) > > On a VM with the attached config (it has LOCKDEP enabled), and every > other run the following triggers: > > [ 219.564147] rcu: INFO: rcu_preempt detected stalls on CPUs/tasks: > [ 219.566376] rcu: Tasks blocked on level-0 rcu_node (CPUs 0-3): P3152/1:b..l > [ 219.568975] rcu: (detected by 0, t=6502 jiffies, g=30165, q=175 ncpus=4) > [ 219.571215] task:hackbench_64 state:R running task stack:0 pid:3152 tgid:3152 ppid:3145 task_flags:0x400000 flags:0x00080000 > [ 219.575470] Call Trace: > [ 219.576432] > [ 219.577396] __schedule+0x4ac/0x12f0 > [ 219.578731] preempt_schedule_common+0x26/0xe0 > [ 219.580319] ? preempt_schedule_thunk+0x16/0x30 > [ 219.581956] preempt_schedule_thunk+0x16/0x30 > [ 219.583550] ? _raw_spin_unlock_irqrestore+0x39/0x70 > [ 219.585328] _raw_spin_unlock_irqrestore+0x5d/0x70 > [ 219.587039] sock_def_readable+0x9c/0x2b0 > [ 219.588509] unix_stream_sendmsg+0x2d7/0x710 > [ 219.590104] sock_write_iter+0x185/0x190 > [ 219.591591] vfs_write+0x457/0x5b0 > [ 219.592900] ksys_write+0xc8/0xf0 > [ 219.594173] do_syscall_64+0x117/0x1660 > [ 219.595586] ? irqentry_exit+0xd9/0x690 > [ 219.596992] entry_SYSCALL_64_after_hwframe+0x76/0x7e > [ 219.598809] RIP: 0033:0x7f30e2eb0190 > [ 219.600239] RSP: 002b:00007ffd4e5f9368 EFLAGS: 00000202 ORIG_RAX: 0000000000000001 > [ 219.602828] RAX: ffffffffffffffda RBX: 00007ffd4e5f94f8 RCX: 00007f30e2eb0190 > [ 219.605254] RDX: 0000000000000001 RSI: 00007ffd4e5f938f RDI: 0000000000000006 > [ 219.607598] RBP: 00007ffd4e5f93e0 R08: 00057bcf00000000 R09: 0000000000000000 > [ 219.609969] R10: 00007f30e2dd14d0 R11: 0000000000000202 R12: 0000000000000000 > [ 219.612453] R13: 00007ffd4e5f9510 R14: 000055c31b856dd8 R15: 00007f30e2fdb020 > [ 219.614933] > > Always with the exact same stacktrace! > > Note, the machine is fine. It's not locked up at all. It appears to be > something that might be blocking RCU for a little longer than RCU would > like. > > I'm not sure if RCU changed its stall detection that makes it more > sensitive or if the sock_def_readable() did something different that > causes more contention or something, but this has started with the > 7.0-rc1. > > Any ideas? One "hail Mary" thought is to revert this guy and see if it helps: d41e37f26b31 ("rcu: Fix rcu_read_unlock() deadloop due to softirq") This commit fixes a bug, so we cannot revert it in mainline, but there is some reason to believe that there are more bugs beyond the one that it fixed, and it might have (through no fault of its own) made those other bugs more probable. Worth a try, anyway! Thanx, Paul