Helloooo, race.
If you spam ctrl + c in a terminal that's doing a lot of things (such as, running a test suite of 88 tests in a loop ;) ), you might hit the special case in Thread::set_state while current is not the same as the thread that has an unmasked pending signal.
It seems that maybe ... pending signals should be cleared during fork before we set_state?
Pay no attention to the PID numbers by the way :).
[#0 Terminal(12393:12393)]: /dev/pts/0: VINTR pressed!
[Shell(22177:22177)]: ASSERTION FAILED: this == Thread::current()
[Shell(22177:22177)]: ../../Kernel/Thread.cpp:700 in Kernel::DispatchSignalResult Kernel::Thread::dispatch_signal(u8)
[#0 Shell(22177:22177)]: 0xc055c4f4 abort +0x4b
[#0 Shell(22177:22177)]: 0xc054f301 debug_handler +0x0
[#0 Shell(22177:22177)]: 0xc049d6da Kernel::Thread::dispatch_signal(unsigned char) +0xee
[#0 Shell(22177:22177)]: 0xc049eb24 Kernel::Thread::dispatch_one_pending_signal() +0x1de
[#0 Shell(22177:22177)]: 0xc049b231 Kernel::Thread::set_state(Kernel::Thread::State, unsigned char) +0x277
[#0 Shell(22177:22177)]: 0xc03d0e6d Kernel::Process::sys$fork(Kernel::RegisterState&) +0x5863
[#0 Shell(22177:22177)]: 0xc039aaa2 syscall_handler +0x1a29
[#0 Shell(22177:22177)]: 0xc0399041 syscall_asm_entry +0x31
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