どうしようもなく下らない原因だったが、解決まで無駄に時間がかかったので書いとく。

環境

  • XPS13(9343)
  • ArchLinux

現象

普通のlinuxパッケージだとアップデートでたまにおかしくなるので、ArchLinuxではいつもlinux-ltsパッケージを使っている。 少し前にArchLinuxのlinux-ltsパッケージが4.4系から4.9系になった。(一時的にlinux-ltsパッケージがlinuxパッケージより新しくなっていた。) そして当然のようにおかしくなった。ログインするあたりでほとんどフリーズ状態になる。以下は journalctl で見たエラーログの一部。

Mar 18 05:32:33 arch-xps kernel: BUG: unable to handle kernel NULL pointer dereference at           (null)
Mar 18 05:32:33 arch-xps kernel: IP: [<ffffffffa0553eb4>] cfg80211_scan_done+0x34/0x100 [cfg80211]
Mar 18 05:32:33 arch-xps kernel: PGD 0 
Mar 18 05:32:33 arch-xps kernel: 
Mar 18 05:32:33 arch-xps kernel: Oops: 0000 [#1] SMP
Mar 18 05:32:33 arch-xps kernel: Modules linked in: snd_hda_codec_hdmi nls_iso8859_1 nls_cp437 vfat fat joydev mousedev iTCO_wdt snd_soc_sst_broadwell dell_laptop iTCO_vendor_support hid_multitouch dell_wmi dell_smbios dcdbas snd_soc_sst_haswell_pcm snd_soc_sst_firmware intel_rapl snd_soc_sst_ipc snd_soc_sst_dsp x86_pkg_temp_thermal intel_powerclamp coretemp kvm_intel kvm irqbypass crct10dif_pclmul crc32_pclmul snd_soc_rt298 crc32c_intel ghash_clmulni_intel aesni_intel aes_x86_64 lrw gf128mul glue_helper ablk_helper cryptd intel_cstate input_leds psmouse pcspkr intel_rapl_perf i915 wl(PO) drm_kms_helper btusb btrtl btbcm btintel rtsx_pci_ms memstick snd_hda_intel i2c_i801 bluetooth drm cfg80211 snd_hda_codec intel_gtt syscopyarea sysfillrect sysimgblt snd_hda_core rfkill fb_sys_fops i2c_algo_bit i2c_smbus lpc_ich intel_pch_thermal
Mar 18 05:32:33 arch-xps kernel:  mei_me snd_hwdep mei shpchp fan snd_soc_rt286 snd_soc_ssm4567 snd_soc_rl6347a snd_soc_core snd_compress snd_pcm_dmaengine snd_pcm snd_timer i2c_hid snd soundcore ac97_bus elan_i2c hid thermal wmi battery intel_vbtn soc_button_array int3403_thermal snd_soc_sst_acpi snd_soc_sst_match 8250_dw i2c_designware_platform int3402_thermal intel_hid i2c_designware_core int3406_thermal spi_pxa2xx_platform video sparse_keymap tpm_crb processor_thermal_device int340x_thermal_zone fjes int3400_thermal intel_soc_dts_iosf acpi_thermal_rel acpi_als acpi_pad ac kfifo_buf tpm_tis industrialio tpm_tis_core tpm button evdev mac_hid uvcvideo videobuf2_vmalloc videobuf2_memops videobuf2_v4l2 videobuf2_core videodev media sch_fq_codel ip_tables x_tables ext4 crc16 jbd2 fscrypto mbcache sd_mod rtsx_pci_sdmmc
Mar 18 05:32:33 arch-xps kernel:  serio_raw atkbd libps2 ahci libahci libata xhci_pci scsi_mod xhci_hcd rtsx_pci usbcore usb_common i8042 serio sdhci_acpi sdhci led_class mmc_core
Mar 18 05:32:33 arch-xps kernel: CPU: 2 PID: 219 Comm: wl_event_handle Tainted: P           O    4.9.14-1-lts #1
Mar 18 05:32:33 arch-xps kernel: Hardware name: Dell Inc. XPS 13 9343/0TM99H, BIOS A09 08/29/2016
Mar 18 05:32:33 arch-xps kernel: task: ffff88020e8e1c80 task.stack: ffffc9000133c000
Mar 18 05:32:33 arch-xps kernel: RIP: 0010:[<ffffffffa0553eb4>]  [<ffffffffa0553eb4>] cfg80211_scan_done+0x34/0x100 [cfg80211]
Mar 18 05:32:33 arch-xps kernel: RSP: 0018:ffffc9000133fe08  EFLAGS: 00010246
Mar 18 05:32:33 arch-xps kernel: RAX: 0000000000000021 RBX: ffff880214b52720 RCX: ffffea00084b7220
Mar 18 05:32:33 arch-xps kernel: RDX: ffff880214b522a0 RSI: 0000000000000000 RDI: ffff88020e9c3000
Mar 18 05:32:33 arch-xps kernel: RBP: ffffc9000133fe20 R08: 0000000000000001 R09: ffffffffa0989f30
Mar 18 05:32:33 arch-xps kernel: R10: dead000000000200 R11: dead000000000100 R12: ffff88020e9c3000
Mar 18 05:32:33 arch-xps kernel: R13: 0000000000000000 R14: 000000000000002c R15: ffff880212f5800c
Mar 18 05:32:33 arch-xps kernel: FS:  0000000000000000(0000) GS:ffff88021f500000(0000) knlGS:0000000000000000
Mar 18 05:32:33 arch-xps kernel: CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
Mar 18 05:32:33 arch-xps kernel: CR2: 0000000000000000 CR3: 0000000002a07000 CR4: 00000000003406e0
Mar 18 05:32:33 arch-xps kernel: Stack:
Mar 18 05:32:33 arch-xps kernel:  ffff880214b52720 ffff880212f5c090 0000000000000000 ffffc9000133fe78
Mar 18 05:32:33 arch-xps kernel:  ffffffffa098a89c ffff880214b52720 0000000114b52f40 0000000000000001
Mar 18 05:32:33 arch-xps kernel:  00000000d223f1a1 ffff880214b52720 ffff880214b52f40 ffff88020d6baa80
Mar 18 05:32:33 arch-xps kernel: Call Trace:
Mar 18 05:32:33 arch-xps kernel:  [<ffffffffa098a89c>] wl_notify_scan_status+0x7c/0x320 [wl]
Mar 18 05:32:33 arch-xps kernel:  [<ffffffffa0986f6c>] wl_event_handler+0x7c/0x1f0 [wl]
Mar 18 05:32:33 arch-xps kernel:  [<ffffffffa0986ef0>] ? wl_deinit_priv_mem+0xa0/0xa0 [wl]
Mar 18 05:32:33 arch-xps kernel:  [<ffffffff8109c0c9>] kthread+0xd9/0xf0
Mar 18 05:32:33 arch-xps kernel:  [<ffffffff8102c74e>] ? __switch_to+0x2ce/0x5b0
Mar 18 05:32:33 arch-xps kernel:  [<ffffffff8109bff0>] ? kthread_park+0x60/0x60
Mar 18 05:32:33 arch-xps kernel:  [<ffffffff815f8a55>] ret_from_fork+0x25/0x30
Mar 18 05:32:33 arch-xps kernel: Code: 41 55 41 54 49 89 f5 53 49 89 fc 0f 1f 44 00 00 49 8b 54 24 60 48 85 d2 0f 84 8f 00 00 00 4c 3b a2 78 fe ff ff 0f 85 84 00 00 00 <49> 8b 45 00 49 89 44 24 70 49 8b 45 08 41 c6 84 24 80 00 00 00 
Mar 18 05:32:33 arch-xps kernel: RIP  [<ffffffffa0553eb4>] cfg80211_scan_done+0x34/0x100 [cfg80211]
Mar 18 05:32:33 arch-xps kernel:  RSP <ffffc9000133fe08>
Mar 18 05:32:33 arch-xps kernel: CR2: 0000000000000000
Mar 18 05:32:33 arch-xps kernel: ---[ end trace ab9b0936ea08d323 ]---
Mar 18 05:32:33 arch-xps kernel: BUG: unable to handle kernel paging request at 00000000d223f1a1
Mar 18 05:32:33 arch-xps kernel: IP: [<ffffffff810c08fb>] __wake_up_common+0x2b/0x80
Mar 18 05:32:33 arch-xps kernel: PGD 0 
Mar 18 05:32:33 arch-xps kernel: 
Mar 18 05:32:33 arch-xps kernel: Oops: 0000 [#2] SMP
Mar 18 05:32:33 arch-xps kernel: Modules linked in: snd_hda_codec_hdmi nls_iso8859_1 nls_cp437 vfat fat joydev mousedev iTCO_wdt snd_soc_sst_broadwell dell_laptop iTCO_vendor_support hid_multitouch dell_wmi dell_smbios dcdbas snd_soc_sst_haswell_pcm snd_soc_sst_firmware intel_rapl snd_soc_sst_ipc snd_soc_sst_dsp x86_pkg_temp_thermal intel_powerclamp coretemp kvm_intel kvm irqbypass crct10dif_pclmul crc32_pclmul snd_soc_rt298 crc32c_intel ghash_clmulni_intel aesni_intel aes_x86_64 lrw gf128mul glue_helper ablk_helper cryptd intel_cstate input_leds psmouse pcspkr intel_rapl_perf i915 wl(PO) drm_kms_helper btusb btrtl btbcm btintel rtsx_pci_ms memstick snd_hda_intel i2c_i801 bluetooth drm cfg80211 snd_hda_codec intel_gtt syscopyarea sysfillrect sysimgblt snd_hda_core rfkill fb_sys_fops i2c_algo_bit i2c_smbus lpc_ich intel_pch_thermal
Mar 18 05:32:33 arch-xps kernel:  mei_me snd_hwdep mei shpchp fan snd_soc_rt286 snd_soc_ssm4567 snd_soc_rl6347a snd_soc_core snd_compress snd_pcm_dmaengine snd_pcm snd_timer i2c_hid snd soundcore ac97_bus elan_i2c hid thermal wmi battery intel_vbtn soc_button_array int3403_thermal snd_soc_sst_acpi snd_soc_sst_match 8250_dw i2c_designware_platform int3402_thermal intel_hid i2c_designware_core int3406_thermal spi_pxa2xx_platform video sparse_keymap tpm_crb processor_thermal_device int340x_thermal_zone fjes int3400_thermal intel_soc_dts_iosf acpi_thermal_rel acpi_als acpi_pad ac kfifo_buf tpm_tis industrialio tpm_tis_core tpm button evdev mac_hid uvcvideo videobuf2_vmalloc videobuf2_memops videobuf2_v4l2 videobuf2_core videodev media sch_fq_codel ip_tables x_tables ext4 crc16 jbd2 fscrypto mbcache sd_mod rtsx_pci_sdmmc
Mar 18 05:32:33 arch-xps kernel:  serio_raw atkbd libps2 ahci libahci libata xhci_pci scsi_mod xhci_hcd rtsx_pci usbcore usb_common i8042 serio sdhci_acpi sdhci led_class mmc_core
Mar 18 05:32:33 arch-xps kernel: CPU: 2 PID: 219 Comm: wl_event_handle Tainted: P      D    O    4.9.14-1-lts #1

原因

エラーログを見たいのに /var/log/messages がないぞと右往左往していたが journalctl で見れた。このコマンド超便利。 そしてエラーログを見たらすぐわかった。cfg80211というやつが悪さしてる。これは無線LAN絡みで入れていたパッケージ broadcom-wl-dkms に出てきた記憶があった。

解決

結局 broadcom-wl-dkms パッケージをアップデートしたら直った…。ログの読み方はちゃんと覚えよう。そしてちゃんとアップデートしよう。(このパッケージはAURだからpacmanでできてなかった?)