kernel BUG at /build/linux-7LGLH_/linux-4.10.0/include/linux/swapops.h:129

Bug #1677611 reported by George Shuklin
38
This bug affects 7 people
Affects Status Importance Assigned to Milestone
linux (Ubuntu)
Confirmed
Medium
Unassigned

Bug Description

I was peacefully typed comment in firefox when it suddenly freezes. In process list it become 'Z' state.

My kernel log displayed this (and I think this is a kernel bug):

Mar 30 16:27:20 x220 kernel: [17792.860827] ------------[ cut here ]------------
Mar 30 16:27:20 x220 kernel: [17792.861119] kernel BUG at /build/linux-7LGLH_/linux-4.10.0/include/linux/swapops.h:129!
Mar 30 16:27:20 x220 kernel: [17792.861594] invalid opcode: 0000 [#2] SMP
Mar 30 16:27:20 x220 kernel: [17792.861839] Modules linked in: ebtable_filter ebtables ip6table_filter ip6_tables ccm ipt_MASQUERADE nf_nat_masquerade_ipv4 xfrm_user xfrm_algo iptable_nat nf_conntrack_ipv4 nf_defrag_ipv4 nf_nat_ipv4 xt_addrtype iptable_filter xt_conntrack nf_nat nf_conntrack br_netfilter bridge stp llc aufs binfmt_misc snd_usb_audio snd_usbmidi_lib snd_hwdep snd_rawmidi snd_seq_device snd_pcm snd_timer uvcvideo videobuf2_vmalloc videobuf2_memops videobuf2_v4l2 videobuf2_core videodev media arc4 iwldvm mac80211 intel_rapl x86_pkg_temp_thermal intel_powerclamp coretemp kvm_intel kvm irqbypass crct10dif_pclmul crc32_pclmul ghash_clmulni_intel pcbc thinkpad_acpi nvram snd soundcore aesni_intel aes_x86_64 crypto_simd glue_helper cryptd intel_cstate intel_rapl_perf iwlwifi input_leds joydev serio_raw cfg80211 lpc_ich
Mar 30 16:27:20 x220 kernel: [17792.865910] shpchp mei_me mei mac_hid cuse ib_iser rdma_cm iw_cm ib_cm ib_core configfs iscsi_tcp libiscsi_tcp libiscsi scsi_transport_iscsi parport_pc sunrpc ppdev lp parport ip_tables x_tables autofs4 uas usb_storage btrfs raid10 raid456 async_raid6_recov async_memcpy async_pq async_xor async_tx xor raid6_pq libcrc32c raid1 raid0 multipath linear wacom hid_generic usbhid hid i915 i2c_algo_bit e1000e psmouse drm_kms_helper syscopyarea sysfillrect sysimgblt ahci fb_sys_fops sdhci_pci ptp libahci drm sdhci pps_core wmi fjes video
Mar 30 16:27:20 x220 kernel: [17792.868607] CPU: 0 PID: 3469 Comm: Socket Thread Tainted: G UD 4.10.0-14-generic #16-Ubuntu
Mar 30 16:27:20 x220 kernel: [17792.869146] Hardware name: LENOVO 4298R86/4298R86, BIOS 8DET56WW (1.26 ) 12/01/2011
Mar 30 16:27:20 x220 kernel: [17792.869584] task: ffff91084c995a00 task.stack: ffffa24d42a1c000
Mar 30 16:27:20 x220 kernel: [17792.869936] RIP: 0010:__migration_entry_wait+0x16a/0x180
Mar 30 16:27:20 x220 kernel: [17792.870244] RSP: 0018:ffffa24d42a1fd68 EFLAGS: 00010246
Mar 30 16:27:20 x220 kernel: [17792.870544] RAX: 0017ffffc0048078 RBX: ffffe7428673c9f0 RCX: ffffe7428673c9f0
Mar 30 16:27:20 x220 kernel: [17792.870933] RDX: 0000000000000001 RSI: ffff9107dcf279d0 RDI: ffffe742845c4e80
Mar 30 16:27:20 x220 kernel: [17792.871319] RBP: ffffa24d42a1fd80 R08: ffff91084c816c80 R09: ffff91084c816c80
Mar 30 16:27:20 x220 kernel: [17792.871706] R10: 00007f0f9a900290 R11: 00007f0f9ac37750 R12: ffffe742845c4e80
Mar 30 16:27:20 x220 kernel: [17792.872094] R13: 3e0000000011713a R14: ffffa24d42a1fe30 R15: ffff9107eb2d00c8
Mar 30 16:27:20 x220 kernel: [17792.872481] FS: 00007f0f840fb700(0000) GS:ffff91085e200000(0000) knlGS:0000000000000000
Mar 30 16:27:20 x220 kernel: [17792.872918] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
Mar 30 16:27:20 x220 kernel: [17792.873231] CR2: 00007f2adeb02fe0 CR3: 00000001ab122000 CR4: 00000000000406f0
Mar 30 16:27:20 x220 kernel: [17792.873623] Call Trace:
Mar 30 16:27:20 x220 kernel: [17792.873775] migration_entry_wait+0x74/0x80
Mar 30 16:27:20 x220 kernel: [17792.874020] do_swap_page+0x5b3/0x770
Mar 30 16:27:20 x220 kernel: [17792.874233] handle_mm_fault+0x873/0x1360
Mar 30 16:27:20 x220 kernel: [17792.874467] __do_page_fault+0x23e/0x4e0
Mar 30 16:27:20 x220 kernel: [17792.874705] do_page_fault+0x22/0x30
Mar 30 16:27:20 x220 kernel: [17792.874922] page_fault+0x28/0x30
Mar 30 16:27:20 x220 kernel: [17792.875133] RIP: 0033:0x7f0f8b27c5ce
Mar 30 16:27:20 x220 kernel: [17792.875352] RSP: 002b:00007f0f840fa858 EFLAGS: 00010206
Mar 30 16:27:20 x220 kernel: [17792.875660] RAX: 0000000000000000 RBX: 00007f0f7ded4d58 RCX: 00007f0f63208000
Mar 30 16:27:20 x220 kernel: [17792.876061] RDX: 0000000000000000 RSI: 00007f0f0353a7c8 RDI: 00007f0eb98ec0a8
Mar 30 16:27:20 x220 kernel: [17792.876503] RBP: 0000000000000001 R08: 0000000000000011 R09: 00007f0f9a900290
Mar 30 16:27:20 x220 kernel: [17792.876932] R10: 00007f0f9a900290 R11: 00007f0f9ac37750 R12: 00007f0f7ded4d00
Mar 30 16:27:20 x220 kernel: [17792.877364] R13: 00007f0f079630a0 R14: 0000000000000001 R15: 00007f0f7ded4d00
Mar 30 16:27:20 x220 kernel: [17792.877769] Code: ff ff ff 4c 89 e7 e8 86 a2 f8 ff e9 3c ff ff ff 85 d2 0f 84 2a ff ff ff 8d 4a 01 89 d0 f0 41 0f b1 4d 00 39 d0 74 81 89 c2 eb e5 <0f> 0b 4c 89 e7 e8 1c fb f9 ff eb b8 4c 8d 60 ff 4c 8d 68 1b eb
Mar 30 16:27:20 x220 kernel: [17792.878901] RIP: __migration_entry_wait+0x16a/0x180 RSP: ffffa24d42a1fd68
Mar 30 16:27:20 x220 kernel: [17792.879374] ---[ end trace 13a363fde0dac0fd ]---

ProblemType: Bug
DistroRelease: Ubuntu 17.04
Package: linux-image-4.10.0-14-generic 4.10.0-14.16
ProcVersionSignature: Ubuntu 4.10.0-14.16-generic 4.10.3
Uname: Linux 4.10.0-14-generic x86_64
ApportVersion: 2.20.4-0ubuntu2
Architecture: amd64
AudioDevicesInUse:
 USER PID ACCESS COMMAND
 /dev/snd/controlC1: amarao 2721 F.... pulseaudio
CurrentDesktop: X-Cinnamon
Date: Thu Mar 30 16:32:53 2017
EcryptfsInUse: Yes
InstallationDate: Installed on 2013-07-19 (1349 days ago)
InstallationMedia: Xubuntu 13.04 "Raring Ringtail" - Release i386 (20130423.1)
MachineType: LENOVO 4298R86
ProcFB: 0 inteldrmfb
ProcKernelCmdLine: BOOT_IMAGE=/boot/vmlinuz-4.10.0-14-generic root=UUID=3d4ce850-6e8a-4cf5-9b82-fb135c22fe1e ro console=tty1 console=ttyS0 panic=-1 i915.i915_enable_rc6=1 i915.i915_enable_fbc=1 i915.lvds_downclock=1 i915.semaphores=1 i915.i915_enable_rc6=7 i915_enable_rc6=7 console=tty1 console=ttyS0 panic=-1
RelatedPackageVersions:
 linux-restricted-modules-4.10.0-14-generic N/A
 linux-backports-modules-4.10.0-14-generic N/A
 linux-firmware 1.164
RfKill:
 0: phy0: Wireless LAN
  Soft blocked: no
  Hard blocked: no
SourcePackage: linux
UpgradeStatus: Upgraded to zesty on 2016-11-22 (128 days ago)
dmi.bios.date: 12/01/2011
dmi.bios.vendor: LENOVO
dmi.bios.version: 8DET56WW (1.26 )
dmi.board.asset.tag: Not Available
dmi.board.name: 4298R86
dmi.board.vendor: LENOVO
dmi.board.version: Not Available
dmi.chassis.asset.tag: No Asset Information
dmi.chassis.type: 10
dmi.chassis.vendor: LENOVO
dmi.chassis.version: Not Available
dmi.modalias: dmi:bvnLENOVO:bvr8DET56WW(1.26):bd12/01/2011:svnLENOVO:pn4298R86:pvrThinkPadX220Tablet:rvnLENOVO:rn4298R86:rvrNotAvailable:cvnLENOVO:ct10:cvrNotAvailable:
dmi.product.name: 4298R86
dmi.product.version: ThinkPad X220 Tablet
dmi.sys.vendor: LENOVO

Revision history for this message
George Shuklin (george-shuklin) wrote :
Revision history for this message
Brad Figg (brad-figg) wrote : Status changed to Confirmed

This change was made by a bot.

Changed in linux (Ubuntu):
status: New → Confirmed
Revision history for this message
Joseph Salisbury (jsalisbury) wrote :

Do you have a way to reproduce this bug, or was it a one time event?

Changed in linux (Ubuntu):
importance: Undecided → Medium
status: Confirmed → Incomplete
Revision history for this message
George Shuklin (george-shuklin) wrote :
Download full text (4.8 KiB)

Yes, I can reproduce it. It take few hours of usual office work to happens again. Again with Firefox.

New trace:

Apr 3 16:20:19 x220 kernel: [20377.022457] ------------[ cut here ]------------
Apr 3 16:20:19 x220 kernel: [20377.022665] kernel BUG at /build/linux-7LGLH_/linux-4.10.0/include/linux/swapops.h:129!
Apr 3 16:20:19 x220 kernel: [20377.023038] invalid opcode: 0000 [#1] SMP
Apr 3 16:20:19 x220 kernel: [20377.023229] Modules linked in: snd_usb_audio snd_usbmidi_lib snd_hwdep snd_rawmidi snd_seq_device snd_pcm snd_timer ebtable_filter ebtables ip6table_filter ip6_tables ccm ipt_MASQUERADE nf_nat_masquerade_ipv4 xfrm_user xfrm_algo iptable_nat nf_conntrack_ipv4 nf_defrag_ipv4 nf_nat_ipv4 xt_addrtype iptable_filter xt_conntrack nf_nat nf_conntrack br_netfilter bridge stp llc aufs binfmt_misc uvcvideo videobuf2_vmalloc videobuf2_memops videobuf2_v4l2 videobuf2_core videodev media intel_rapl x86_pkg_temp_thermal intel_powerclamp coretemp kvm_intel kvm irqbypass crct10dif_pclmul crc32_pclmul ghash_clmulni_intel pcbc arc4 joydev input_leds iwldvm serio_raw mac80211 aesni_intel aes_x86_64 crypto_simd glue_helper cryptd intel_cstate intel_rapl_perf iwlwifi cfg80211 thinkpad_acpi lpc_ich nvram snd soundcore
Apr 3 16:20:19 x220 kernel: [20377.026441] shpchp mei_me mei mac_hid cuse ib_iser rdma_cm iw_cm ib_cm ib_core configfs iscsi_tcp libiscsi_tcp libiscsi scsi_transport_iscsi parport_pc ppdev sunrpc lp parport ip_tables x_tables autofs4 uas usb_storage btrfs raid10 raid456 async_raid6_recov async_memcpy async_pq async_xor async_tx xor hid_generic raid6_pq libcrc32c raid1 raid0 multipath linear wacom usbhid hid i915 i2c_algo_bit drm_kms_helper psmouse syscopyarea sysfillrect sysimgblt e1000e fb_sys_fops sdhci_pci ahci drm sdhci libahci ptp pps_core wmi fjes video
Apr 3 16:20:19 x220 kernel: [20377.028598] CPU: 1 PID: 3483 Comm: Compositor Tainted: G U 4.10.0-14-generic #16-Ubuntu
Apr 3 16:20:19 x220 kernel: [20377.029001] Hardware name: LENOVO 4298R86/4298R86, BIOS 8DET56WW (1.26 ) 12/01/2011
Apr 3 16:20:19 x220 kernel: [20377.029339] task: ffff8ba9935d4380 task.stack: ffffb7b502548000
Apr 3 16:20:19 x220 kernel: [20377.029648] RIP: 0010:__migration_entry_wait+0x16a/0x180
Apr 3 16:20:19 x220 kernel: [20377.029919] RSP: 0000:ffffb7b50254bd68 EFLAGS: 00010246
Apr 3 16:20:19 x220 kernel: [20377.030182] RAX: 000fffffc0048078 RBX: ffffea00022a9570 RCX: ffffea00022a9570
Apr 3 16:20:19 x220 kernel: [20377.030494] RDX: 0000000000000001 RSI: ffff8ba88aa55008 RDI: ffffea0000e70040
Apr 3 16:20:19 x220 kernel: [20377.030833] RBP: ffffb7b50254bd80 R08: ffff8baa0d1bae80 R09: ffff8baa0d1bae80
Apr 3 16:20:19 x220 kernel: [20377.031181] R10: 00007f906cfb4000 R11: 00007f906d3004d0 R12: ffffea0000e70040
Apr 3 16:20:19 x220 kernel: [20377.031533] R13: 3e00000000039c01 R14: ffffb7b50254be30 R15: ffff8ba9937bc4b0
Apr 3 16:20:19 x220 kernel: [20377.031834] FS: 00007f93355ff700(0000) GS:ffff8baa1e240000(0000) knlGS:0000000000000000
Apr 3 16:20:19 x220 kernel: [20377.032251] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
Apr 3 16:20:19 x220 kernel: [20377.032475] CR2: 00007f92bbc01818 CR3: 00000001a9cd5...

Read more...

Revision history for this message
Nazar Mokrynskyi (nazar-pc) wrote :
Download full text (4.1 KiB)

I thought it was caused by overclocking, but now I'm pretty sure it doesn't (passes CPU/RAM stress tests under Windows). I'm also encountering this issue for approximately one week now when watching youtube in up to date Firefox Nightly, here is my log:

кві 04 09:30:01 nazar-pc kernel: ------------[ cut here ]------------
кві 04 09:30:01 nazar-pc kernel: kernel BUG at /build/linux-dfiP6t/linux-4.10.0/include/linux/swapops.h:129!
кві 04 09:30:01 nazar-pc kernel: invalid opcode: 0000 [#1] SMP
кві 04 09:30:01 nazar-pc kernel: Modules linked in: ufs qnx4 hfsplus hfs minix ntfs msdos jfs xfs libcrc32c binfmt_misc nls_iso8859_1 snd_hda_codec_hdmi intel_rapl edac_core x86_pkg_temp_thermal intel_powerclamp coretemp mxm_wmi kvm_intel kvm irqbypass intel_cstate snd_us
кві 04 09:30:01 nazar-pc kernel: aes_x86_64 sysfillrect crypto_simd glue_helper sysimgblt dca cryptd fb_sys_fops ahci ptp libahci drm pps_core nvme i2c_algo_bit nvme_core fjes
кві 04 09:30:01 nazar-pc kernel: CPU: 11 PID: 3127 Comm: firefox Tainted: P OE 4.10.0-15-generic #17-Ubuntu
кві 04 09:30:01 nazar-pc kernel: Hardware name: MSI MS-7885/X99A SLI Krait Edition (MS-7885), BIOS N.92 01/10/2017
кві 04 09:30:01 nazar-pc kernel: task: ffff97fc03042d00 task.stack: ffffa59307b9c000
кві 04 09:30:01 nazar-pc kernel: RIP: 0010:__migration_entry_wait+0x16a/0x180
кві 04 09:30:01 nazar-pc kernel: RSP: 0000:ffffa59307b9fd68 EFLAGS: 00010246
кві 04 09:30:01 nazar-pc kernel: RAX: 000fffffc0048078 RBX: fffff7fa9f864430 RCX: fffff7fa9f864430
кві 04 09:30:01 nazar-pc kernel: RDX: 0000000000000001 RSI: ffff97fbe1910808 RDI: fffff7fa801e4040
кві 04 09:30:01 nazar-pc kernel: RBP: ffffa59307b9fd80 R08: ffff97fc668a1740 R09: ffff97fc668a1740
кві 04 09:30:01 nazar-pc kernel: R10: 0000000000001008 R11: 00007f8c23400120 R12: fffff7fa801e4040
кві 04 09:30:01 nazar-pc kernel: R13: 3e00000000007901 R14: ffffa59307b9fe30 R15: ffff97fbfb4e4960
кві 04 09:30:01 nazar-pc kernel: FS: 00007f8c249b3b80(0000) GS:ffff97fc9f4c0000(0000) knlGS:0000000000000000
кві 04 09:30:01 nazar-pc kernel: CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
кві 04 09:30:01 nazar-pc kernel: CR2: 00007f8c02d01180 CR3: 000000078493a000 CR4: 00000000003406e0
кві 04 09:30:01 nazar-pc kernel: DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
кві 04 09:30:01 nazar-pc kernel: DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
кві 04 09:30:01 nazar-pc kernel: Call Trace:
кві 04 09:30:01 nazar-pc kernel: migration_entry_wait+0x74/0x80
кві 04 09:30:01 nazar-pc kernel: do_swap_page+0x5b3/0x770
кві 04 09:30:01 nazar-pc kernel: handle_mm_fault+0x873/0x1360
кві 04 09:30:01 nazar-pc kernel: __do_page_fault+0x23e/0x4e0
кві 04 09:30:01 nazar-pc kernel: do_page_fault+0x22/0x30
кві 04 09:30:01 nazar-pc kernel: page_fault+0x28/0x30
кві 04 09:30:01 nazar-pc kernel: RIP: 0033:0x416d00
кві 04 09:30:01 nazar-pc kernel: RSP: 002b:00007fffb7e4e9d0 EFLAGS: 00010246
кві 04 09:30:01 nazar-pc kernel: RAX: 00007f8c02e016e8 RBX: 00007f8c23400120 RCX: 00007f8c02e01478
кві 04 09:30:01 nazar-pc kernel: RDX: 00007f8c02e00d70 RSI: 00007f8c02c00248 RDI: 00007f8c23400118
кві 04 09:30:01 nazar-pc kernel: RBP: 00007fffb7e4e9e0 R08:...

Read more...

Revision history for this message
Nazar Mokrynskyi (nazar-pc) wrote :

And yes, system works for many hours without issues, and bug suddenly happens at random. There is no heavy load at that time.

Revision history for this message
George Shuklin (george-shuklin) wrote :

I've tried to upgrade to proposed, 4.10.0-15-generic is affected too.

Changed in linux (Ubuntu):
status: Incomplete → New
status: New → Confirmed
Revision history for this message
Vidar Braut Haarr (vhaarr+launchpad) wrote :

Confirmed on 4.10.0-13 and -15 on an i5 2500k using Firefox nightly builds from various days of the past week or two, and nvidia 378.13 driver.

Happens "randomly" indeed, but always after Firefox has been running for some time.

Log exerpt here: https://hastebin.com/qogocitequ.vbs

Revision history for this message
Nazar Mokrynskyi (nazar-pc) wrote :

The same with today's -17 update

Revision history for this message
Kai-Heng Feng (kaihengfeng) wrote :

Hit by this too.

Please test the kernel here, hopefully it fix the issue:
http://people.canonical.com/~khfeng/lp1677611/

Revision history for this message
Nazar Mokrynskyi (nazar-pc) wrote :

The same with 4.10.0-19: https://pastebin.com/uXt874nH
More errors in log file this time, but I think they are all consequences of the same underlying problem.

Revision history for this message
Kai-Heng Feng (kaihengfeng) wrote :

Did you use the kernel in comment #10?

Revision history for this message
Nazar Mokrynskyi (nazar-pc) wrote :

No, I'm using whatever in proposed repositories. Is it different from what is in repositories? Name is the same, don't want to override current kernel, it seems to be the only one installed currently.

Revision history for this message
Brannon C Bowden (bbowden) wrote :

Kai-Heng, I just installed your kernel on two boxes I was having the issue with, took me a while to reproduce before, but I will try again.

Revision history for this message
Brannon C Bowden (bbowden) wrote :

Kai-Heng, issue still occurred with that kernel. Anyone know what kernel is safe to roll back to?

Revision history for this message
Kai-Heng Feng (kaihengfeng) wrote :

FWIW, I cherry-picked these commits:

093b995e3b55 mm, swap: Remove WARN_ON_ONCE() in free_swap_slot()
452b94b8c8c7 mm/swap: don't BUG_ON() due to uninitialized swap slot cache
ba81f8384254 mm/swap: skip readahead only when swap slot cache is enabled
039939a65059 mm/swap: enable swap slots cache usage
67afa38e012e mm/swap: add cache for swap slots allocation
7c00bafee87c mm/swap: free swap slots in batch
36005bae205d mm/swap: allocate swap slots in batches
e8c26ab60598 mm/swap: skip readahead for unreferenced swap slots
4b3ef9daa4fc mm/swap: split swap cache into 64MB trunks
235b62176712 mm/swap: add cluster lock
6a991fc72d12 mm/swap: fix kernel message in swap_info_get()

But apparently it did not work...

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.