NULL pointer dereference with kernel 5.14.1

FYI

I started to test kernel 5.14.1. It ended in a crash when I started firefox:

Sep 05 08:06:26 rakete kernel: BUG: kernel NULL pointer dereference, address: 0000000000000000
Sep 05 08:06:26 rakete kernel: #PF: supervisor instruction fetch in kernel mode
Sep 05 08:06:26 rakete kernel: #PF: error_code(0x0010) - not-present page
Sep 05 08:06:26 rakete kernel: PGD 1b2b09067 P4D 1b2b09067 PUD 0 
Sep 05 08:06:26 rakete kernel: Oops: 0010 [#1] PREEMPT SMP NOPTI
Sep 05 08:06:26 rakete kernel: CPU: 11 PID: 5381 Comm: BgIOThr~Pool #1 Tainted: P           OE     5.14.1-arch1-1 #1 2aa0b3bfda7b631178edf28e6bcf2806f78fd4a1
Sep 05 08:06:26 rakete kernel: Hardware name: Gigabyte Technology Co., Ltd. X570 AORUS ULTRA/X570 AORUS ULTRA, BIOS F34 07/08/2021
Sep 05 08:06:26 rakete kernel: RIP: 0010:0x0
Sep 05 08:06:26 rakete kernel: Code: Unable to access opcode bytes at RIP 0xffffffffffffffd6.
Sep 05 08:06:26 rakete kernel: RSP: 0018:ffffb6d8b5473d90 EFLAGS: 00010246
Sep 05 08:06:26 rakete kernel: RAX: 0000000000000000 RBX: ffffb6d8b5473e00 RCX: 0000000000000000
Sep 05 08:06:26 rakete kernel: RDX: 02ffff0000000005 RSI: 0000000002262d6b RDI: ffffe5d086e7a7c0
Sep 05 08:06:26 rakete kernel: RBP: ffffe5d086e7a7c0 R08: 0000000000000002 R09: 0000000000000000
Sep 05 08:06:26 rakete kernel: R10: 0000000000000200 R11: 61c8864680b583eb R12: ffff8b4e4eefae38
Sep 05 08:06:26 rakete kernel: R13: ffff8b4e5af0b000 R14: 0000000000000580 R15: ffff8b4e88d32ff0
Sep 05 08:06:26 rakete kernel: FS:  00007eff975ff640(0000) GS:ffff8b5cfecc0000(0000) knlGS:0000000000000000
Sep 05 08:06:26 rakete kernel: CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
Sep 05 08:06:26 rakete kernel: CR2: ffffffffffffffd6 CR3: 0000000189350000 CR4: 0000000000350ee0
Sep 05 08:06:26 rakete kernel: Call Trace:
Sep 05 08:06:26 rakete kernel:  filemap_page_mkwrite+0xdf/0x190
Sep 05 08:06:26 rakete kernel:  do_page_mkwrite+0x55/0xb0
Sep 05 08:06:26 rakete kernel:  __handle_mm_fault+0xe63/0x15c0
Sep 05 08:06:26 rakete kernel:  handle_mm_fault+0xd5/0x2a0
Sep 05 08:06:26 rakete kernel:  do_user_addr_fault+0x1de/0x690
Sep 05 08:06:26 rakete kernel:  exc_page_fault+0x72/0x170
Sep 05 08:06:26 rakete kernel:  ? asm_exc_page_fault+0x8/0x30
Sep 05 08:06:26 rakete kernel:  asm_exc_page_fault+0x1e/0x30
Sep 05 08:06:26 rakete kernel: RIP: 0033:0x7effe6ec579c
Sep 05 08:06:26 rakete kernel: Code: 06 06 00 0f 87 f0 00 00 00 c5 fe 6f 01 c5 fe 6f 49 e0 c5 fe 6f 51 c0 c5 fe 6f 59 a0 48 81 e9 80 00 00 00 48 81 ea 80 00 00 00 <c4> c1 7d 7f 01 c4 c1 7d 7f 49 e0 c4 c1 7d 7f 51 c0 c4 c1 7d 7f 59
Sep 05 08:06:26 rakete kernel: RSP: 002b:00007eff975fc668 EFLAGS: 00010202
Sep 05 08:06:26 rakete kernel: RAX: 00007eff96009088 RBX: 00007eff974069b0 RCX: 00007eff8c47ff78
Sep 05 08:06:26 rakete kernel: RDX: 0000000000007ef8 RSI: 00007eff8c4780a0 RDI: 00007eff96009088
Sep 05 08:06:26 rakete kernel: RBP: 000000004fece149 R08: 0000000000000000 R09: 00007eff96010fe0
Sep 05 08:06:26 rakete kernel: R10: 000000004fece149 R11: 00007eff96010fe0 R12: 0000000000000000
Sep 05 08:06:26 rakete kernel: R13: 0000000000000000 R14: 00007eff975fc820 R15: 0000000000000001
Sep 05 08:06:26 rakete kernel: Modules linked in: cfg80211 ccm algif_aead cbc des_generic libdes ecb algif_skcipher cmac md4 algif_hash af_alg it87 hwmon_vid rc_tt_1500 stb6100 isl6423 stb0899 dvb_usb_pctv452e(OE) dvb_usb(OE) ttpci_eeprom dvb_core videobuf2_vmalloc videobuf2_memops videobuf2_common videodev mc btusb btrtl btbcm btintel bluetooth ecdh_generic rfkill ecc crc16 intel_rapl_msr amdgpu mxm_wmi gigabyte_wmi wmi_bmof snd_hda_codec_realtek intel_rapl_common snd_hda_codec_generic amd64_edac edac_mce_amd ledtrig_audio snd_hda_codec_hdmi snd_hda_intel kvm_amd snd_intel_dspcfg snd_intel_sdw_acpi vfat snd_hda_codec fat gpu_sched kvm drm_ttm_helper snd_hda_core ttm irqbypass snd_hwdep crct10dif_pclmul snd_pcm crc32_pclmul drm_kms_helper ghash_clmulni_intel aesni_intel cec crypto_simd snd_timer cryptd igb agpgart rapl snd ccp syscopyarea sysfillrect sysimgblt k10temp i2c_piix4 rng_core fb_sys_fops i2c_algo_bit soundcore dca wmi pinctrl_amd acpi_cpufreq zfs(POE) zunicode(POE) zzstd(OE) zlua(OE) zavl(POE)
Sep 05 08:06:26 rakete kernel:  icp(POE) zcommon(POE) znvpair(POE) spl(OE) vboxnetflt(OE) vboxnetadp(OE) vboxdrv(OE) pkcs8_key_parser sg drm crypto_user fuse zram bpf_preload ip_tables x_tables xfs libcrc32c crc32c_generic usbhid sr_mod xhci_pci crc32c_intel xhci_pci_renesas cdrom
Sep 05 08:06:26 rakete kernel: CR2: 0000000000000000
Sep 05 08:06:26 rakete kernel: ---[ end trace e4a23fa0d11d3a43 ]---
Sep 05 08:06:26 rakete kernel: RIP: 0010:0x0
Sep 05 08:06:26 rakete kernel: Code: Unable to access opcode bytes at RIP 0xffffffffffffffd6.
Sep 05 08:06:26 rakete kernel: RSP: 0018:ffffb6d8b5473d90 EFLAGS: 00010246
Sep 05 08:06:26 rakete kernel: RAX: 0000000000000000 RBX: ffffb6d8b5473e00 RCX: 0000000000000000
Sep 05 08:06:26 rakete kernel: RDX: 02ffff0000000005 RSI: 0000000002262d6b RDI: ffffe5d086e7a7c0
Sep 05 08:06:26 rakete kernel: RBP: ffffe5d086e7a7c0 R08: 0000000000000002 R09: 0000000000000000
Sep 05 08:06:26 rakete kernel: R10: 0000000000000200 R11: 61c8864680b583eb R12: ffff8b4e4eefae38
Sep 05 08:06:26 rakete kernel: R13: ffff8b4e5af0b000 R14: 0000000000000580 R15: ffff8b4e88d32ff0
Sep 05 08:06:26 rakete kernel: FS:  00007eff975ff640(0000) GS:ffff8b5cfecc0000(0000) knlGS:0000000000000000
Sep 05 08:06:26 rakete kernel: CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
Sep 05 08:06:26 rakete kernel: CR2: ffffffffffffffd6 CR3: 0000000189350000 CR4: 0000000000350ee0

When this happened it took the PC several minutes to shutdown. It was always waiting for something during shutdown.

I tested with linux 5.14.1.arch1-1 and linux-zen 5.14.1.zen1-1. The crash is reproducible: Login to XFCE, open two terminator windows, watch the log in one terminator window (journalctl -f) and start firefox either via icon or via the other terminator window.

It doesn’t happen in Gnome on this particular setup/machine:

uname -a

Linux arch-gnome 5.14.1-zen1-1-zen #1 ZEN SMP PREEMPT Fri, 03 Sep 2021 21:05:00 +0000 x86_64 GNU/Linux

inxi -MGC

Machine:
Type: Laptop System: Dell product: XPS 13 9380 v: N/A
serial:
Mobo: Dell model: 0KTDY6 v: A00 serial: UEFI: Dell
v: 1.14.0 date: 05/27/2021
CPU:
Info: Quad Core model: Intel Core i7-8565U bits: 64 type: MT MCP cache:
L2: 8 MiB
Speed: 800 MHz min/max: 400/4600 MHz Core speeds (MHz): 1: 800 2: 2330 3: 1858
4: 937 5: 1360 6: 627 7: 738 8: 800
Graphics:
Device-1: Intel WhiskeyLake-U GT2 [UHD Graphics 620] driver: i915 v: kernel
Device-2: CN09357GLOG008CLACSJA01 Integrated_Webcam_HD type: USB
driver: uvcvideo
Display: wayland server: X.Org 1.21.1.2 driver: loaded: modesetting
unloaded: vesa resolution: 1920x1080~60Hz
Message: Unable to show advanced data. Required tool glxinfo missing.

It was my mistake. I am using zfs. But stable release zfs 2.1 is not compatible with kernel 5.14. Compilation fails. There is one patch which allows compilation with kernel 5.14. This is the only patched I used. But there are more patches to fix other issues with kernel 5.14 which I was not aware of.

Now I have installed zfs 2.1.1-staging and that has no issue with kernel 5.14 anymore. I was told the official release will come out shortly.

4 Likes