This only shows up when using the Linux kernel as a 64-bit PV guest and when I have migrated and I am running iscsid and I poweroff the guest. Note: I can also reproduce this if I kill 'iscsid'. If I revert the above mentioned commit the problem disappears. The page flags it shows are bogus - this guest is running from RAM and has no swap. Here is what the console says (ignore the first BUG please): [ 42.268060] xen:grant_table: Grant tables using version 1 layout [ 42.268060] BUG: sleeping function called from invalid context at /home/konrad/ssd/konrad/linux/kernel/locking/mutex.c:96 [ 42.268060] in_atomic(): 1, irqs_disabled(): 1, pid: 9, name: migration/0 [ 42.268060] CPU: 0 PID: 9 Comm: migration/0 Not tainted 3.14.0-rc4upstream #1 [ 42.268060] 0000000000000002 ffff88003cc0dcd8 ffffffff816f0e59 ffff88003cc02630 [ 42.268060] ffffffff81c6df80 ffff88003cc0dce8 ffffffff810cdfce ffff88003cc0dd08 [ 42.268060] ffffffff816f3bdf ffff88003cc0dd08 0000000000000017 ffff88003cc0dd38 [ 42.268060] Call Trace: [ 42.268060] [] dump_stack+0x51/0x6b [ 42.268060] [] __might_sleep+0xce/0xf0 [ 42.268060] [] mutex_lock+0x1f/0x40 [ 42.268060] [] rebind_evtchn_irq+0x3b/0xb0 [ 42.268060] [] xen_console_resume+0x5c/0x60 [ 42.268060] [] xen_suspend+0x8a/0xb0 [ 42.268060] [] multi_cpu_stop+0xbb/0xe0 [ 42.268060] [] ? irq_cpu_stop_queue_work+0x30/0x30 [ 42.268060] [] cpu_stopper_thread+0x4a/0x180 [ 42.268060] [] ? __schedule+0x381/0x7e0 [ 42.268060] [] ? smpboot_create_threads+0x80/0x80 [ 42.268060] [] ? _raw_spin_unlock_irqrestore+0x1b/0x70 [ 42.268060] [] smpboot_thread_fn+0x148/0x1e0 [ 42.268060] [] ? smpboot_create_threads+0x80/0x80 [ 42.268060] [] kthread+0xce/0xf0 [ 42.268060] [] ? kthread_freezable_should_stop+0x80/0x80 [ 42.268060] [] ret_from_fork+0x7c/0xb0 [ 42.268060] [] ? kthread_freezable_should_stop+0x80/0x80 [ 42.268060] PM: noirq restore of devices complete after 0.251 msecs [ 42.268645] PM: early restore of devices complete after 0.151 msecs # # [ 42.281199] switch: port 1(eth0) entered disabled state [ 42.282591] PM: restore of devices complete after 11.656 msecs [ 42.307965] switch: port 1(eth0) entered forwarding state [ 42.307990] switch: port 1(eth0) entered forwarding state # # # [ 57.312124] switch: port 1(eth0) entered forwarding state lspci # lsscsi # ifconfig eth0 Link encap:Ethernet HWaddr 00:0F:4B:00:00:68 inet6 addr: fe80::20f:4bff:fe00:68/64 Scope:Link UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:99 errors:0 dropped:0 overruns:0 frame:0 TX packets:86 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:8722 (8.5 KiB) TX bytes:8709 (8.5 KiB) lo Link encap:Local Loopback inet addr:127.0.0.1 Mask:255.0.0.0 inet6 addr: ::1/128 Scope:Host UP LOOPBACK RUNNING MTU:65536 Metric:1 RX packets:4 errors:0 dropped:0 overruns:0 frame:0 TX packets:4 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:0 RX bytes:260 (260.0 b) TX bytes:260 (260.0 b) switch Link encap:Ethernet HWaddr 00:0F:4B:00:00:68 inet addr:192.168.102.68 Bcast:192.168.102.255 Mask:255.255.255.0 inet6 addr: fe80::20f:4bff:fe00:68/64 Scope:Link UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:96 errors:0 dropped:0 overruns:0 frame:0 TX packets:75 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:0 RX bytes:8506 (8.3 KiB) TX bytes:7755 (7.5 KiB) # ping 1 8.8.8.8 PING 8.8.8.8 (8.8.8.8) 56(84) bytes of data. 64 bytes from 8.8.8.8: icmp_seq=1 ttl=45 time=57.0 ms 64 bytes from 8.8.8.8: icmp_seq=2 ttl=45 time=51.4 ms 64 bytes from 8.8.8.8: icmp_seq=3 ttl=45 time=51.8 ms ^C --- 8.8.8.8 ping statistics --- 3 packets transmitted, 3 received, 0% packet loss, time 2130ms rtt min/avg/max/mdev = 51.421/53.420/57.008/2.556 ms # poweroff Feb 28 02:05:30 g-pvops init: starting pid 2386, tty '': '/etc/init.d/halt' # Usage: /etc/init.d/halt {start} The system is going down NOW! Sent SIGTERM to all processes Feb 28 02:05:30 g-pvops exiting on signal 15 [ 71.195552] BUG: Bad page map in process iscsid pte:39b22120 pmd:06953067 [ 71.195569] page:ffffea0000c9ef70 count:1 mapcount:-1 mapping:ffff88003a536490 index:0x1c8 [ 71.195576] page flags: 0x100000000080078(uptodate|dirty|lru|active|swapbacked) [ 71.195585] page dumped because: bad pte [ 71.195589] addr:00007fb105d37000 vm_flags:00000070 anon_vma: (null) mapping:ffff880032006970 index:c [ 71.195598] vma->vm_ops->fault: shmem_fault+0x0/0x70 [ 71.195603] vma->vm_file->f_op->mmap: shmem_mmap+0x0/0x30 [ 71.195613] CPU: 0 PID: 2296 Comm: iscsid Not tainted 3.14.0-rc4upstream #1 [ 71.195618] 00007fb105d37000 ffff880030ff3c28 ffffffff816f0e59 0000000000000000 [ 71.195627] ffff8800302f8378 ffff880030ff3c78 ffffffff81199a5b ffff880030ff3c58 [ 71.195634] ffffffff8117f6e1 ffff880030ff3c58 00007fb105d37000 ffff8800069539b8 [ 71.195642] Call Trace: [ 71.195649] [] dump_stack+0x51/0x6b [ 71.195657] [] print_bad_pte+0x1bb/0x280 [ 71.195663] [] ? activate_page+0xb1/0xe0 [ 71.195669] [] unmap_single_vma+0x8c8/0x910 [ 71.195676] [] ? xen_pte_unlock+0x9/0x10 [ 71.195680] [] unmap_vmas+0x4c/0xa0 [ 71.195688] [] exit_mmap+0x90/0x160 [ 71.195694] [] ? _raw_spin_lock_irqsave+0x13/0x60 [ 71.195702] [] mmput+0x52/0x100 [ 71.195707] [] do_exit+0x29c/0xb90 [ 71.195712] [] ? SyS_wait4+0xa9/0xf0 [ 71.195719] [] do_group_exit+0x51/0x130 [ 71.195724] [] SyS_exit_group+0x12/0x20 [ 71.195732] [] system_call_fastpath+0x16/0x1b [ 71.195736] Disabling lock debugging due to kernel taint [ 71.195740] BUG: Bad page map in process iscsid pte:39b23120 pmd:06953067 [ 71.195744] page:ffffea0000c9efa8 count:2 mapcount:-1 mapping:ffff88003a536490 index:0x1c9 [ 71.195751] page flags: 0x100000000080038(uptodate|dirty|lru|swapbacked) [ 71.195759] page dumped because: bad pte [ 71.195764] addr:00007fb105d38000 vm_flags:00000070 anon_vma: (null) mapping:ffff880032006970 index:d [ 71.195770] vma->vm_ops->fault: shmem_fault+0x0/0x70 [ 71.195774] vma->vm_file->f_op->mmap: shmem_mmap+0x0/0x30 [ 71.195778] CPU: 0 PID: 2296 Comm: iscsid Tainted: G B 3.14.0-rc4upstream #1 [ 71.195783] 00007fb105d38000 ffff880030ff3c28 ffffffff816f0e59 0000000000000000 [ 71.195791] ffff8800302f8378 ffff880030ff3c78 ffffffff81199a5b 0000000000000575 [ 71.195798] 0720072007200720 ffff880030ff3c58 00007fb105d38000 ffff8800069539c0 [ 71.195806] Call Trace: [ 71.195810] [] dump_stack+0x51/0x6b [ 71.195816] [] print_bad_pte+0x1bb/0x280 [ 71.195820] [] unmap_single_vma+0x8c8/0x910 [ 71.195827] [] ? xen_pte_unlock+0x9/0x10 [ 71.195832] [] unmap_vmas+0x4c/0xa0 [ 71.195839] [] exit_mmap+0x90/0x160 [ 71.195843] [] ? _raw_spin_lock_irqsave+0x13/0x60 [ 71.195849] [] mmput+0x52/0x100 [ 71.195854] [] do_exit+0x29c/0xb90 [ 71.195858] [] ? SyS_wait4+0xa9/0xf0 [ 71.195863] [] do_group_exit+0x51/0x130 [ 71.195870] [] SyS_exit_group+0x12/0x20 [ 71.195875] [] system_call_fastpath+0x16/0x1b [ 71.195880] BUG: Bad page map in process iscsid pte:39b24120 pmd:06953067 [ 71.195884] page:ffffea0000c9efe0 count:2 mapcount:-1 mapping:ffff88003a536490 index:0x1ca [ 71.195888] page flags: 0x100000000080038(uptodate|dirty|lru|swapbacked) [ 71.195895] page dumped because: bad pte [ 71.195898] addr:00007fb105d39000 vm_flags:00000070 anon_vma: (null) mapping:ffff880032006970 index:e [ 71.195904] vma->vm_ops->fault: shmem_fault+0x0/0x70 [ 71.195908] vma->vm_file->f_op->mmap: shmem_mmap+0x0/0x30 [ 71.195912] CPU: 0 PID: 2296 Comm: iscsid Tainted: G B 3.14.0-rc4upstream #1 [ 71.195916] 00007fb105d39000 ffff880030ff3c28 ffffffff816f0e59 0000000000000000 [ 71.195923] ffff8800302f8378 ffff880030ff3c78 ffffffff81199a5b 000000000000058e [ 71.195929] 0720072007200720 ffff880030ff3c58 00007fb105d39000 ffff8800069539c8 [ 71.195935] Call Trace: [ 71.195939] [] dump_stack+0x51/0x6b [ 71.195944] [] print_bad_pte+0x1bb/0x280 [ 71.195948] [] unmap_single_vma+0x8c8/0x910 [ 71.195953] [] ? xen_pte_unlock+0x9/0x10 [ 71.195958] [] unmap_vmas+0x4c/0xa0 [ 71.195963] [] exit_mmap+0x90/0x160 [ 71.195967] [] ? _raw_spin_lock_irqsave+0x13/0x60 [ 71.195973] [] mmput+0x52/0x100 [ 71.195977] [] do_exit+0x29c/0xb90 [ 71.195982] [] ? SyS_wait4+0xa9/0xf0 [ 71.195987] [] do_group_exit+0x51/0x130 [ 71.195992] [] SyS_exit_group+0x12/0x20 [ 71.195997] [] system_call_fastpath+0x16/0x1b [ 71.196001] BUG: Bad page map in process iscsid pte:39b25120 pmd:06953067 [ 71.196005] page:ffffea0000c9f018 count:2 mapcount:-1 mapping:ffff88003a536490 index:0x1cb [ 71.362165] page flags: 0x100000000080038(uptodate|dirty|lru|swapbacked) [ 71.362172] page dumped because: bad pte [ 71.362175] addr:00007fb105d3a000 vm_flags:00000070 anon_vma: (null) mapping:ffff880032006970 index:f [ 71.362181] vma->vm_ops->fault: shmem_fault+0x0/0x70 [ 71.362185] vma->vm_file->f_op->mmap: shmem_mmap+0x0/0x30 [ 71.362193] CPU: 0 PID: 2296 Comm: iscsid Tainted: G B 3.14.0-rc4upstream #1 [ 71.362197] 00007fb105d3a000 ffff880030ff3c28 ffffffff816f0e59 0000000000000000 [ 71.362206] ffff8800302f8378 ffff880030ff3c78 ffffffff81199a5b 00000000000005a7 [ 71.362212] 0720072007200720 ffff880030ff3c58 00007fb105d3a000 ffff8800069539d0 [ 71.362221] Call Trace: [ 71.362225] [] dump_stack+0x51/0x6b [ 71.362230] [] print_bad_pte+0x1bb/0x280 [ 71.362241] [] unmap_single_vma+0x8c8/0x910 [ 71.362247] [] ? xen_pte_unlock+0x9/0x10 [ 71.362254] [] unmap_vmas+0x4c/0xa0 [ 71.362258] [] exit_mmap+0x90/0x160 [ 71.362263] [] ? _raw_spin_lock_irqsave+0x13/0x60 [ 71.362270] [] mmput+0x52/0x100 [ 71.362276] [] do_exit+0x29c/0xb90 [ 71.362282] [] ? SyS_wait4+0xa9/0xf0 [ 71.362287] [] do_group_exit+0x51/0x130 [ 71.362292] [] SyS_exit_group+0x12/0x20 [ 71.362297] [] system_call_fastpath+0x16/0x1b [ 71.364639] BUG: Bad page state in process iscsid pfn:39b25 [ 71.364651] page:ffffea0000c9f018 count:0 mapcount:-1 mapping:ffff88003a536490 index:0x1cb [ 71.364656] page flags: 0x100000000080018(uptodate|dirty|swapbacked) [ 71.364663] page dumped because: non-NULL mapping [ 71.364666] Modules linked in: dm_multipath dm_mod xen_evtchn iscsi_boot_sysfs iscsi_tcp libiscsi_tcp libiscsi scsi_transport_iscsi scsi_mod libcrc32c crc32c fbcon tileblit font radeon bitblit softcursor ttm drm_kms_helper xen_blkfront xen_netfront xen_fbfront fb_sys_fops sysimgblt sysfillrect syscopyarea xen_kbdfront xenfs xen_privcmd [ 71.364706] CPU: 0 PID: 2296 Comm: iscsid Tainted: G B 3.14.0-rc4upstream #1 [ 71.364711] ffffffff8197f00f ffff880030ff3bb8 ffffffff816f0e59 ffffffff8197f00f [ 71.364718] ffffea0000c9f018 ffff880030ff3be8 ffffffff811751a0 ffff880030ff3c48 [ 71.364724] 0000000000000001 ffffea0000c9f018 0000000000000000 ffff880030ff3c48 [ 71.364733] Call Trace: [ 71.364739] [] dump_stack+0x51/0x6b [ 71.364748] [] bad_page+0xd0/0x120 [ 71.364753] [] free_pages_prepare+0x145/0x160 [ 71.364760] [] ? xen_pte_val+0x32/0x40 [ 71.364768] [] free_hot_cold_page+0x3b/0x150 [ 71.364773] [] free_hot_cold_page_list+0x47/0xb0 [ 71.364780] [] release_pages+0x7d/0x230 [ 71.364785] [] free_pages_and_swap_cache+0xb4/0xe0 [ 71.364791] [] ? flush_tlb_mm_range+0x57/0x1b0 [ 71.364798] [] tlb_flush_mmu+0x57/0xa0 [ 71.364803] [] tlb_finish_mmu+0xf/0x40 [ 71.364810] [] exit_mmap+0xb7/0x160 [ 71.364815] [] ? _raw_spin_lock_irqsave+0x12/0x60 [ 71.364820] [] mmput+0x52/0x100 [ 71.364825] [] do_exit+0x29c/0xb90 [ 71.364830] [] ? SyS_wait4+0xa9/0xf0 [ 71.364835] [] do_group_exit+0x51/0x130 [ 71.364842] [] SyS_exit_group+0x12/0x20 [ 71.364848] [] system_call_fastpath+0x16/0x1b [ 71.364854] BUG: Bad page state in process iscsid pfn:39b24 [ 71.364858] page:ffffea0000c9efe0 count:0 mapcount:-1 mapping:ffff88003a536490 index:0x1ca [ 71.364863] page flags: 0x100000000080018(uptodate|dirty|swapbacked) [ 71.364871] page dumped because: non-NULL mapping [ 71.364874] Modules linked in: dm_multipath dm_mod xen_evtchn iscsi_boot_sysfs iscsi_tcp libiscsi_tcp libiscsi scsi_transport_iscsi scsi_mod libcrc32c crc32c fbcon tileblit font radeon bitblit softcursor ttm drm_kms_helper xen_blkfront xen_netfront xen_fbfront fb_sys_fops sysimgblt sysfillrect syscopyarea xen_kbdfront xenfs xen_privcmd [ 71.364906] CPU: 0 PID: 2296 Comm: iscsid Tainted: G B 3.14.0-rc4upstream #1 [ 71.364913] ffffffff8197f00f ffff880030ff3bb8 ffffffff816f0e59 ffffffff8197f00f [ 71.364919] ffffea0000c9efe0 ffff880030ff3be8 ffffffff811751a0 ffff880030ff3c48 [ 71.364925] 0000000000000001 ffffea0000c9efe0 0000000000000000 ffff880030ff3c48 [ 71.364933] Call Trace: [ 71.364938] [] dump_stack+0x51/0x6b [ 71.364945] [] bad_page+0xd0/0x120 [ 71.364950] [] free_pages_prepare+0x145/0x160 [ 71.364955] [] ? xen_pte_val+0x32/0x40 [ 71.364960] [] free_hot_cold_page+0x3b/0x150 [ 71.364965] [] free_hot_cold_page_list+0x47/0xb0 [ 71.364970] [] release_pages+0x7d/0x230 [ 71.364975] [] free_pages_and_swap_cache+0xb4/0xe0 [ 71.364982] [] ? flush_tlb_mm_range+0x57/0x1b0 [ 71.364987] [] tlb_flush_mmu+0x57/0xa0 [ 71.364994] [] tlb_finish_mmu+0xf/0x40 [ 71.364999] [] exit_mmap+0xb7/0x160 [ 71.365004] [] ? _raw_spin_lock_irqsave+0x12/0x60 [ 71.365009] [] mmput+0x52/0x100 [ 71.365015] [] do_exit+0x29c/0xb90 [ 71.365020] [] ? SyS_wait4+0xa9/0xf0 [ 71.365025] [] do_group_exit+0x51/0x130 [ 71.365030] [] SyS_exit_group+0x12/0x20 [ 71.365035] [] system_call_fastpath+0x16/0x1b [ 71.365039] BUG: Bad page state in process iscsid pfn:39b23 [ 71.365043] page:ffffea0000c9efa8 count:0 mapcount:-1 mapping:ffff88003a536490 index:0x1c9 [ 71.365047] page flags: 0x100000000080018(uptodate|dirty|swapbacked) [ 71.365074] page dumped because: non-NULL mapping [ 71.365077] Modules linked in: dm_multipath dm_mod xen_evtchn iscsi_boot_sysfs iscsi_tcp libiscsi_tcp libiscsi scsi_transport_iscsi scsi_mod libcrc32c crc32c fbcon tileblit font radeon bitblit softcursor ttm drm_kms_helper xen_blkfront xen_netfront xen_fbfront fb_sys_fops sysimgblt sysfillrect syscopyarea xen_kbdfront xenfs xen_privcmd [ 71.365104] CPU: 0 PID: 2296 Comm: iscsid Tainted: G B 3.14.0-rc4upstream #1 [ 71.365109] ffffffff8197f00f ffff880030ff3bb8 ffffffff816f0e59 ffffffff8197f00f [ 71.365115] ffffea0000c9efa8 ffff880030ff3be8 ffffffff811751a0 ffff880030ff3c48 [ 71.365121] 0000000000000001 ffffea0000c9efa8 0000000000000000 ffff880030ff3c48 [ 71.365127] Call Trace: [ 71.365131] [] dump_stack+0x51/0x6b [ 71.365136] [] bad_page+0xd0/0x120 [ 71.365141] [] free_pages_prepare+0x145/0x160 [ 71.365146] [] ? xen_pte_val+0x32/0x40 [ 71.365151] [] free_hot_cold_page+0x3b/0x150 [ 71.365155] [] free_hot_cold_page_list+0x47/0xb0 [ 71.365160] [] release_pages+0x7d/0x230 [ 71.365165] [] free_pages_and_swap_cache+0xb4/0xe0 [ 71.365170] [] ? flush_tlb_mm_range+0x57/0x1b0 [ 71.365175] [] tlb_flush_mmu+0x57/0xa0 [ 71.365180] [] tlb_finish_mmu+0xf/0x40 [ 71.562344] [] exit_mmap+0xb7/0x160 [ 71.562349] [] ? _raw_spin_lock_irqsave+0x12/0x60 [ 71.562354] [] mmput+0x52/0x100 [ 71.562359] [] do_exit+0x29c/0xb90 [ 71.562364] [] ? SyS_wait4+0xa9/0xf0 [ 71.562369] [] do_group_exit+0x51/0x130 [ 71.562379] [] SyS_exit_group+0x12/0x20 [ 71.562387] [] system_call_fastpath+0x16/0x1b [ 71.562391] BUG: Bad page state in process iscsid pfn:39b22 [ 71.562395] page:ffffea0000c9ef70 count:0 mapcount:-1 mapping:ffff88003a536490 index:0x1c8 [ 71.562399] page flags: 0x100000000080018(uptodate|dirty|swapbacked) [ 71.562413] page dumped because: non-NULL mapping [ 71.562420] Modules linked in: dm_multipath dm_mod xen_evtchn iscsi_boot_sysfs iscsi_tcp libiscsi_tcp libiscsi scsi_transport_iscsi scsi_mod libcrc32c crc32c fbcon tileblit font radeon bitblit softcursor ttm drm_kms_helper xen_blkfront xen_netfront xen_fbfront fb_sys_fops sysimgblt sysfillrect syscopyarea xen_kbdfront xenfs xen_privcmd [ 71.562456] CPU: 0 PID: 2296 Comm: iscsid Tainted: G B 3.14.0-rc4upstream #1 [ 71.562461] ffffffff8197f00f ffff880030ff3bb8 ffffffff816f0e59 ffffffff8197f00f [ 71.562467] ffffea0000c9ef70 ffff880030ff3be8 ffffffff811751a0 ffff880030ff3c48 [ 71.562476] 0000000000000001 ffffea0000c9ef70 0000000000000000 ffff880030ff3c48 [ 71.562486] Call Trace: [ 71.562490] [] dump_stack+0x51/0x6b [ 71.562495] [] bad_page+0xd0/0x120 [ 71.562500] [] free_pages_prepare+0x145/0x160 [ 71.562515] [] ? xen_pte_val+0x32/0x40 [ 71.562520] [] free_hot_cold_page+0x3b/0x150 [ 71.562525] [] free_hot_cold_page_list+0x47/0xb0 [ 71.562535] [] release_pages+0x7d/0x230 [ 71.562544] [] free_pages_and_swap_cache+0xb4/0xe0 [ 71.562550] [] ? flush_tlb_mm_range+0x57/0x1b0 [ 71.562555] [] tlb_flush_mmu+0x57/0xa0 [ 71.562561] [] tlb_finish_mmu+0xf/0x40 [ 71.562568] [] exit_mmap+0xb7/0x160 [ 71.562579] [] ? _raw_spin_lock_irqsave+0x12/0x60 [ 71.562584] [] mmput+0x52/0x100 [ 71.562594] [] do_exit+0x29c/0xb90 [ 71.562603] [] ? SyS_wait4+0xa9/0xf0 [ 71.562608] [] do_group_exit+0x51/0x130 [ 71.562613] [] SyS_exit_group+0x12/0x20 [ 71.562617] [] system_call_fastpath+0x16/0x1b Sent SIGKILL to all processes Requesting system poweroff [ 73.375423] reboot: System halted