Re: [v3.10-rc1] WARNING: at kernel/rcutree.c:502

From: BjÃrn Mork
Date: Mon May 13 2013 - 10:41:25 EST


BjÃrn Mork <bjorn@xxxxxxx> writes:

> I was unable to recreate the problem in a virtual machine, which is
> slightly suspicious. And bisecting it ended up pointing to a merge
> commit:
>
> commit ab86e974f04b1cd827a9c7c35273834ebcd9ab38
> Merge: 8700c95 6f7a05d
> Author: Linus Torvalds <torvalds@xxxxxxxxxxxxxxxxxxxx>
> Date: Tue Apr 30 08:15:40 2013 -0700
>
> Merge branch 'timers-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
> ..
>
>
> which I don't think makes much sense at all. The bisect log leading to
> this was:
>
> bjorn@canardo:/usr/local/src/build-tmp/linux$ git bisect log
> # bad: [f722406faae2d073cc1d01063d1123c35425939e] Linux 3.10-rc1
> # good: [c1be5a5b1b355d40e6cf79cc979eb66dafa24ad1] Linux 3.9
> git bisect start 'v3.10-rc1' 'v3.9'
> # bad: [73287a43cc79ca06629a88d1a199cd283f42456a] Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next
> git bisect bad 73287a43cc79ca06629a88d1a199cd283f42456a
> # bad: [5d434fcb255dec99189f1c58a06e4f56e12bf77d] Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial
> git bisect bad 5d434fcb255dec99189f1c58a06e4f56e12bf77d
> # good: [507ffe4f3840ac24890a8123c702cf1b7fe4d33c] Merge tag 'tty-3.10-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty
> git bisect good 507ffe4f3840ac24890a8123c702cf1b7fe4d33c
> # good: [4a7b4d2360175f67ab2c58effeeb8362a3057c25] x86: pageattr-test: remove srandom32 call
> git bisect good 4a7b4d2360175f67ab2c58effeeb8362a3057c25
> # good: [46d9be3e5eb01f71fc02653755d970247174b400] Merge branch 'for-3.10' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/wq
> git bisect good 46d9be3e5eb01f71fc02653755d970247174b400
> # good: [e0972916e8fe943f342b0dd1c9d43dbf5bc261c2] Merge branch 'perf-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
> git bisect good e0972916e8fe943f342b0dd1c9d43dbf5bc261c2
> # bad: [ab86e974f04b1cd827a9c7c35273834ebcd9ab38] Merge branch 'timers-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
> git bisect bad ab86e974f04b1cd827a9c7c35273834ebcd9ab38
> # good: [8700c95adb033843fc163d112b9d21d4fda78018] Merge branch 'smp-hotplug-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
> git bisect good 8700c95adb033843fc163d112b9d21d4fda78018
> # good: [0ed2aef9b3bffe598045b62a31a50d912eee92d8] Merge branch 'fortglx/3.10/time' of git://git.linaro.org/people/jstultz/linux into timers/core
> git bisect good 0ed2aef9b3bffe598045b62a31a50d912eee92d8
> # good: [8f294b5a139ee4b75e890ad5b443c93d1e558a8b] hrtimer: Add expiry time overflow check in hrtimer_interrupt
> git bisect good 8f294b5a139ee4b75e890ad5b443c93d1e558a8b
> # good: [60cf7ea849e77c8782dee147cfb8c38d1984236e] timer_list: Split timer_list_show_tickdevices
> git bisect good 60cf7ea849e77c8782dee147cfb8c38d1984236e
> # good: [d2054b2c11682495fca41e9d4092e654df63b517] posix-timers: Remove unused variable
> git bisect good d2054b2c11682495fca41e9d4092e654df63b517
> # good: [6402c7dc2a19c19bd8cdc7d80878b850da418942] Merge branch 'linus' into timers/core Reason: Get upstream fixes before adding conflicting code.
> git bisect good 6402c7dc2a19c19bd8cdc7d80878b850da418942
> # good: [6f7a05d7018de222e40ca003721037a530979974] clockevents: Set dummy handler on CPU_DEAD shutdown
> git bisect good 6f7a05d7018de222e40ca003721037a530979974
>
>
> So there it stands. I have no clue and I don't think I'm able to
> provide any clue for anyone else either. Given that the problem seems
> to be very consistently reproducible on my laptop, I am a bit puzzled as
> to how the bisect would fail like that.

Hey, hey, hey. Turns out this wasn't that wrong after all. That merge
includes a oneline diff in kernel/cpu/idle.c and it *is* actually this
diff which trigger the problem for me. Reverting it, using the attached
patch, makes the warning go away. Which means that it had nothing to do
with your RCU changes.

But I haven't the faintest idea how this is supposed to work, or even
how to explain the patch properly, so I think I need some help from
Thomas here. Unless this makes you understand the real issue?

Thomas, why does powertop trigger the

WARNING: at kernel/rcutree.c:502 rcu_eqs_exit_common.isra.48+0x3d/0x125()

without the attached patch? And what is the proper resolution?



BjÃrn