With this boot step:
SERENITY_RAM_SIZE=1G SERENITY_CPUS=4 ./Meta/serenity.sh run x86_64 Clang smp=on
We intermittently panic on shutdown with locks being held by the wrong Processor.
This was reproduced without KVM, on TCG (from my M2 MacBook).
11.946 [#2 Power State Switch Task(48:48)]: Killing remaining processes...
11.950 [#2 Finalizer Task(8:8)]: Init process quitting for shutdown.
12.331 [#1 Power State Switch Task(48:48)]: Locking all file systems...
12.331 [#1 Power State Switch Task(48:48)]: Unmounting all file systems...
12.335 [#1 Power State Switch Task(48:48)]: VirtualFileSystem: Unmounting file system 6 for the last time...
12.335 [#1 Power State Switch Task(48:48)]: VirtualFileSystem: Unmounting file system 6...
12.335 [#1 Power State Switch Task(48:48)]: VirtualFileSystem: Unmounting file system 5 for the last time...
12.335 [#1 Power State Switch Task(48:48)]: VirtualFileSystem: Unmounting file system 5...
12.335 [#1 Power State Switch Task(48:48)]: VirtualFileSystem: Unmounting file system 4 for the last time...
12.335 [#1 Power State Switch Task(48:48)]: VirtualFileSystem: Unmounting file system 4...
12.335 [#1 Power State Switch Task(48:48)]: VirtualFileSystem: Unmounting file system 3 for the last time...
12.335 [#1 Power State Switch Task(48:48)]: VirtualFileSystem: Unmounting file system 3...
12.335 [#1 Power State Switch Task(48:48)]: VirtualFileSystem: Unmounting file system 2 for the last time...
12.335 [#1 Power State Switch Task(48:48)]: VirtualFileSystem: Unmounting file system 2...
12.339 [#1 Power State Switch Task(48:48)]: VirtualFileSystem: Unmounting file system 1...
12.339 [#1 Power State Switch Task(48:48)]: VirtualFileSystem: Unmounting file system 1...
12.339 [#1 Power State Switch Task(48:48)]: VirtualFileSystem: Unmounting file system 1...
12.339 [#1 Power State Switch Task(48:48)]: VirtualFileSystem: Unmounting file system 1...
12.339 [#1 Power State Switch Task(48:48)]: VirtualFileSystem: Unmounting file system 1...
12.339 [#1 Power State Switch Task(48:48)]: VirtualFileSystem: Unmounting file system 1...
12.339 [#1 Power State Switch Task(48:48)]: VirtualFileSystem: Unmounting file system 1...
12.339 [#1 Power State Switch Task(48:48)]: VirtualFileSystem: Unmounting file system 1...
12.339 [#1 Power State Switch Task(48:48)]: VirtualFileSystem: Unmounting file system 1...
12.339 [Power State Switch Task(48:48)]: Ext2FS: Clean unmount, setting superblock to valid state
[Power State Switch Task(48:48)]: ASSERTION FAILED: m_lock.load(AK::memory_order_relaxed) == FlatPtr(&Processor::current())
[Power State Switch Task(48:48)]: Kernel/Locking/Spinlock.h:92 in void Kernel::RecursiveSpinlock<Kernel::LockRank::FileSystem>::unlock(InterruptsState) [Rank = Kernel::LockRank::FileSystem]
[Power State Switch Task(48:48)]: KERNEL PANIC! :^(
[Power State Switch Task(48:48)]: Aborted
[Power State Switch Task(48:48)]: at Kernel/Arch/x86_64/CPU.cpp:35 in void abort()
[Power State Switch Task(48:48)]: Kernel + 0x0000000000509c30 Kernel::__panic(char const*, unsigned int, char const*) +0xf0
[Power State Switch Task(48:48)]: Kernel + 0x00000000007dcb59 abort +0x109
[Power State Switch Task(48:48)]: Kernel + 0x00000000007dca44 __assertion_failed(char const*, char const*, unsigned int, char const*) +0xa4
[Power State Switch Task(48:48)]: Kernel + 0x000000000032449e Kernel::RecursiveSpinlock<(Kernel::LockRank)4>::unlock(Kernel::InterruptsState) +0x25e
[Power State Switch Task(48:48)]: Kernel + 0x0000000000323adb Kernel::FileSystem::prepare_to_unmount(Kernel::Inode&) +0x24b
[Power State Switch Task(48:48)]: Kernel + 0x000000000042b913 Kernel::VirtualFileSystem::unmount(Kernel::Inode&, AK::StringView) +0x5e3
[Power State Switch Task(48:48)]: Kernel + 0x00000000007296e1 Kernel::PowerStateSwitchTask::perform_shutdown(Kernel::PowerStateSwitchTask::DoReboot) +0xf81
[Power State Switch Task(48:48)]: Kernel + 0x000000000072852b Kernel::PowerStateSwitchTask::power_state_switch_task(void*) +0x8b
Pay now to fund the work behind this issue.
Get updates on progress being made.
Maintainer is rewarded once the issue is completed.
You're funding impactful open source efforts
You want to contribute to this effort
You want to get funding like this too