oe-lkp.lists.linux.dev archive mirror
 help / color / mirror / Atom feed
From: Chengming Zhou <zhouchengming@bytedance.com>
To: kernel test robot <oliver.sang@intel.com>
Cc: oe-lkp@lists.linux.dev, lkp@intel.com,
	Linux Memory Management List <linux-mm@kvack.org>,
	Andrew Morton <akpm@linux-foundation.org>,
	Yosry Ahmed <yosryahmed@google.com>,
	Johannes Weiner <hannes@cmpxchg.org>,
	Nhat Pham <nphamcs@gmail.com>
Subject: Re: [linux-next:master] [mm/zswap] 18ce3c9e4c: BUG:spinlock_bad_magic_on_CPU
Date: Tue, 5 Mar 2024 14:26:43 +0800	[thread overview]
Message-ID: <2db1ec36-c227-4bed-b3d5-a0dc4834a193@bytedance.com> (raw)
In-Reply-To: <202403051008.a8cf8a94-lkp@intel.com>

On 2024/3/5 14:02, kernel test robot wrote:
> 
> 
> Hello,
> 
> kernel test robot noticed "BUG:spinlock_bad_magic_on_CPU" on:
> 
> commit: 18ce3c9e4c2d7cc1b7eaf1e8cc95be8e34209dac ("mm/zswap: global lru and shrinker shared by all zswap_pools")
> https://git.kernel.org/cgit/linux/kernel/git/next/linux-next.git master
> 
> [test failed on linux-next/master 67908bf6954b7635d33760ff6dfc189fc26ccc89]
> 
> in testcase: boot
> 
> compiler: clang-17
> test machine: qemu-system-x86_64 -enable-kvm -cpu SandyBridge -smp 2 -m 16G
> 
> (please refer to attached dmesg/kmsg for entire log/backtrace)
> 
> 
> +----------------------------------------------------+------------+------------+
> |                                                    | acc2918c08 | 18ce3c9e4c |
> +----------------------------------------------------+------------+------------+
> | BUG:spinlock_bad_magic_on_CPU                      | 0          | 12         |
> +----------------------------------------------------+------------+------------+
> 
> 
> If you fix the issue in a separate patch/commit (i.e. not just a new version of
> the same patch/commit), kindly add following tags
> | Reported-by: kernel test robot <oliver.sang@intel.com>
> | Closes: https://lore.kernel.org/oe-lkp/202403051008.a8cf8a94-lkp@intel.com
> 
> 
> 
> [   88.645344][    T8] BUG: spinlock bad magic on CPU#0, kworker/0:1/8
> [ 88.645699][ T8] lock: zswap+0xd0/0x110, .magic: 00000000, .owner: <none>/-1, .owner_cpu: 0 
> [   88.646351][    T8] CPU: 0 PID: 8 Comm: kworker/0:1 Tainted: G        W       TN 6.8.0-rc5-00353-g18ce3c9e4c2d #1
> [   88.646922][    T8] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.16.2-debian-1.16.2-1 04/01/2014
> [   88.647458][    T8] Workqueue: cgroup_destroy css_killed_work_fn
> [   88.647785][    T8] Call Trace:
> [   88.648049][    T8]  <TASK>
> [ 88.648308][ T8] dump_stack_lvl (lib/dump_stack.c:107) 
> [ 88.648557][ T8] do_raw_spin_lock (kernel/locking/spinlock_debug.c:?) 
> [ 88.648807][ T8] zswap_memcg_offline_cleanup (mm/zswap.c:784) 

Hmm, zswap is not enabled so this new spinlock is not initialized at all...

Maybe it's better to take Nhat's suggestion to change static struct zswap {}
to multiple static variables, to keep in consistent with other global variables
in zswap.

I will fix it and sent out a hotfix after testing.

Thanks.

      reply	other threads:[~2024-03-05  6:26 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-03-05  6:02 [linux-next:master] [mm/zswap] 18ce3c9e4c: BUG:spinlock_bad_magic_on_CPU kernel test robot
2024-03-05  6:26 ` Chengming Zhou [this message]

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=2db1ec36-c227-4bed-b3d5-a0dc4834a193@bytedance.com \
    --to=zhouchengming@bytedance.com \
    --cc=akpm@linux-foundation.org \
    --cc=hannes@cmpxchg.org \
    --cc=linux-mm@kvack.org \
    --cc=lkp@intel.com \
    --cc=nphamcs@gmail.com \
    --cc=oe-lkp@lists.linux.dev \
    --cc=oliver.sang@intel.com \
    --cc=yosryahmed@google.com \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).