Le ven. 28 févr. 2025 à 15:28, Sebastian Andrzej Siewior <bigeasy@xxxxxxxxxxxxx> a écrit : > > On 2025-02-28 11:44:30 [+0100], Yoann Congal wrote: > > Hello Linux RT users, > Hi, > > > I got a setup running nested KVM virtual machines on PREEMPT RT kernels > > (all 6.12.12 RT kernels from Debian): > > The "physical hypervisor" runs "virtual host" VMs which runs guests VMs. > > > > When using LVM snapshots on the "virtual host" (ie the middle one), I > > randomly get a "BUG: scheduling while atomic" trace in the > > ext4->dm_snapshot callstack (full trace bellow). It seems to happen more > > often when the whole system is loaded. There are multiple BUG traces > > each time with slightly different stacks, the deepest common function is > > do_origin in [dm_snapshot] [0]. > > > > Does that ring a bell? > > Do you have an advice on how to debug or even fix this? > > dm_exception_table_lock() is a bit spinlock. This needs to be replaced > somehow. I have no idea yet. Hello Sebastian, Thanks for your answer. If I understood correctly, this "BUG: scheduling while atomic" message is not the same as a BUG_ON() macro and has less side effects : * tainting the kernel * might panic depending on the configuration * signal potential high latencies for realtime workload * But does not kill the current thread (like BUG_ON() does) So, as long as we don't use dm_snapshot during realtime workload (which might cause high latencies and "scheduling while atomic") we should be okay. Does that sound right to you? Regards, -- Yoann Congal Smile ECS