From: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
To: Thomas Gleixner <tglx@linutronix.de>,
Peter Zijlstra <peterz@infradead.org>
Cc: oe-lkp@lists.linux.dev, lkp@intel.com,
kernel test robot <oliver.sang@intel.com>
Subject: Re: [bigeasy-staging:futex_local_v6] [futex] 865221325b: WARNING:at_lib/rcuref.c:#rcuref_put_slowpath
Date: Fri, 17 Jan 2025 00:31:37 +0100 [thread overview]
Message-ID: <20250116233137.v8s-FDdH@linutronix.de> (raw)
In-Reply-To: <202412311453.9d7636a2-lkp@intel.com>
On 2024-12-31 16:41:41 [+0800], kernel test robot wrote:
> kernel test robot noticed "WARNING:at_lib/rcuref.c:#rcuref_put_slowpath" on:
>
> commit: 865221325b6a45c5d0777614ccad2e49aa82722b ("futex: Resize local futex hash table based on number of threads.")
> https://git.kernel.org/cgit/linux/kernel/git/bigeasy/staging.git futex_local_v6
…
> [ 184.841511][T52159] rcuref - imbalanced put()
> [ 184.841536][T52159] WARNING: CPU: 64 PID: 52159 at lib/rcuref.c:267 rcuref_put_slowpath+0x66/0x70
> [ 184.944417][T52159] CPU: 64 UID: 0 PID: 52159 Comm: 1_aux Tainted: G S 6.13.0-rc3-00011-g865221325b6a #1
…
> [ 184.972898][T52159] RIP: 0010:rcuref_put_slowpath+0x66/0x70
…
> [ 185.095270][T52159] Call Trace:
> [ 185.099146][T52159] <TASK>
> [ 185.144224][T52159] futex_hash_put+0x2c/0x30
> [ 185.149286][T52159] futex_wait_queue+0x4a/0xb0
> [ 185.154497][T52159] __futex_wait+0x146/0x1b0
> [ 185.165341][T52159] futex_wait+0x6c/0x130
> [ 185.175497][T52159] do_futex+0x11d/0x1f0
after hours of yelling and cursing:
ref = 0 (via rcuref_init(ref, 1))
T1 T2
rcuref_put(ref)
-> atomic_add_negative_release(-1, ref) # ref -> 0xffffffff
-> rcuref_put_slowpath(ref)
rcuref_get(ref)
-> atomic_add_negative_relaxed(1, &ref->refcnt)
-> return true; # ref -> 0
rcuref_put(ref)
-> atomic_add_negative_release(-1, ref) # ref -> 0xffffffff
-> rcuref_put_slowpath()
-> cnt = atomic_read(&ref->refcnt); # cnt -> 0xffffffff / RCUREF_NOREF
-> atomic_try_cmpxchg_release(&ref->refcnt, &cnt, RCUREF_DEAD)) # ref -> 0xe0000000 / RCUREF_DEAD
-> return true
-> cnt = atomic_read(&ref->refcnt); # cnt -> 0xe0000000 / RCUREF_DEAD
-> if (cnt > RCUREF_RELEASED) # 0xe0000000 > 0xc0000000
-> WARN_ONCE(cnt >= RCUREF_RELEASED, "rcuref - imbalanced put()")
Sebastian
next prev parent reply other threads:[~2025-01-16 23:31 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-12-31 8:41 [bigeasy-staging:futex_local_v6] [futex] 865221325b: WARNING:at_lib/rcuref.c:#rcuref_put_slowpath kernel test robot
2025-01-16 23:31 ` Sebastian Andrzej Siewior [this message]
2025-01-17 8:49 ` Thomas Gleixner
2025-01-17 10:03 ` Thomas Gleixner
2025-01-20 17:08 ` Sebastian Andrzej Siewior
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20250116233137.v8s-FDdH@linutronix.de \
--to=bigeasy@linutronix.de \
--cc=lkp@intel.com \
--cc=oe-lkp@lists.linux.dev \
--cc=oliver.sang@intel.com \
--cc=peterz@infradead.org \
--cc=tglx@linutronix.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.