Bug 209153

Summary: >5.8.0 BUG: kernel NULL pointer dereference with zram + btrfs (compressed)
Product: File System Reporter: David (StormByte)
Component: btrfsAssignee: BTRFS virtual assignee (fs_btrfs)
Status: NEW ---    
Severity: normal CC: martin, thiemel
Priority: P1    
Hardware: All   
OS: Linux   
Kernel Version: 5.9.0 Subsystem:
Regression: No Bisected commit-id:

Description David 2020-09-04 19:57:12 UTC
When using kernel up to 5.8.6 (not reproducible on 5.8.0, tested), and using zram containing a btrfs filesystem (with compression), once working with this virtual filesystem over time, there is a NULL pointer dereference which hurts all system.

It seems not to happen with "normal" btrfs usage, but seems only if you use zram with btrfs on it (also the log below mentions zram operations at top of the stack).

I reverted to 5.8.0 and the bug is not reproducible so it seems it is caused by some commit beyond that version. (Only tested 5.0.8 with negative results, and 5.8.5 and 5.8.6 with positive results).


Sep  4 18:28:05 Wesker kernel: BUG: kernel NULL pointer dereference, address: 0000000000000000
Sep  4 18:28:05 Wesker kernel: #PF: supervisor read access in kernel mode
Sep  4 18:28:05 Wesker kernel: #PF: error_code(0x0000) - not-present page
Sep  4 18:28:05 Wesker kernel: PGD 0 P4D 0 
Sep  4 18:28:05 Wesker kernel: Oops: 0000 [#1] SMP PTI
Sep  4 18:28:05 Wesker kernel: CPU: 11 PID: 40997 Comm: kworker/u24:7 Tainted: P     U  W  O      5.8.6-gentoo-x86_64 #1
Sep  4 18:28:05 Wesker kernel: Hardware name: Micro-Star International Co., Ltd. GS73 Stealth 8RE/MS-17B5, BIOS E17B5IMS.110 05/17/2019
Sep  4 18:28:05 Wesker kernel: Workqueue: btrfs-delalloc btrfs_work_helper [btrfs]
Sep  4 18:28:05 Wesker kernel: RIP: 0010:obj_malloc+0x30/0xd0
Sep  4 18:28:05 Wesker kernel: Code: 48 44 0f af c0 4c 8b 56 10 41 81 f8 00 10 00 00 7c 33 45 89 c1 41 c1 f9 0c 31 c9 66 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 40 00 <49> f7 02 00 04 00 00 75 0d 4d 8b 52 20 ff c1 44 39 c9 7c ec eb 05
Sep  4 18:28:05 Wesker kernel: RSP: 0018:ffff8cea46443a68 EFLAGS: 00010293
Sep  4 18:28:05 Wesker kernel: RAX: 00000000d2257545 RBX: 00000000000004c1 RCX: 0000000000000004
Sep  4 18:28:05 Wesker kernel: RDX: ffff8a65f49feee0 RSI: ffff8a65e67be150 RDI: ffff8a670dfc9a80
Sep  4 18:28:05 Wesker kernel: RBP: ffff8cea46443ad8 R08: 00000000769bb060 R09: 00000000000769bb
Sep  4 18:28:05 Wesker kernel: R10: 0000000000000000 R11: ffff8a65db756fec R12: ffff8a670dfc9a80
Sep  4 18:28:05 Wesker kernel: R13: 0000000000002800 R14: ffff8a65e67be150 R15: ffff8a65f49feee0
Sep  4 18:28:05 Wesker kernel: FS:  0000000000000000(0000) GS:ffff8a689dac0000(0000) knlGS:0000000000000000
Sep  4 18:28:05 Wesker kernel: CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
Sep  4 18:28:05 Wesker kernel: CR2: 0000000000000000 CR3: 0000000223e0a001 CR4: 00000000003606e0
Sep  4 18:28:05 Wesker kernel: Call Trace:
Sep  4 18:28:05 Wesker kernel:  zs_malloc+0x103/0x4e0
Sep  4 18:28:05 Wesker kernel:  zram_bvec_rw+0x1b4/0x470 [zram]
Sep  4 18:28:05 Wesker kernel:  zram_make_request+0x219/0x310 [zram]
Sep  4 18:28:05 Wesker kernel:  generic_make_request+0x156/0x350
Sep  4 18:28:05 Wesker kernel:  submit_bio+0xe7/0x180
Sep  4 18:28:05 Wesker kernel:  ? btrfs_bio_counter_inc_blocked+0x38/0x130 [btrfs]
Sep  4 18:28:05 Wesker kernel:  btrfs_map_bio+0x2a0/0x350 [btrfs]
Sep  4 18:28:05 Wesker kernel:  btrfs_submit_compressed_write+0x34f/0x3a0 [btrfs]
Sep  4 18:28:05 Wesker kernel:  submit_compressed_extents+0x3da/0x490 [btrfs]
Sep  4 18:28:05 Wesker kernel:  btrfs_work_helper+0x13b/0x1e0 [btrfs]
Sep  4 18:28:05 Wesker kernel:  process_one_work+0x1da/0x330
Sep  4 18:28:05 Wesker kernel:  worker_thread+0x26d/0x490
Sep  4 18:28:05 Wesker kernel:  kthread+0x11c/0x130
Sep  4 18:28:05 Wesker kernel:  ? process_one_work+0x330/0x330
Sep  4 18:28:05 Wesker kernel:  ? kthread_blkcg+0x30/0x30
Sep  4 18:28:05 Wesker kernel:  ret_from_fork+0x22/0x30
Sep  4 18:28:05 Wesker kernel: Modules linked in: rfcomm nvidia(PO) xt_CHECKSUM xt_MASQUERADE xt_conntrack ipt_REJECT nf_reject_ipv4 xt_tcpudp ip6table_mangle ip6table_nat iptable_mangle iptable_nat nf_nat nf_conntrack nf_defrag_ipv6 nf_defrag_ipv4 ebtable_filter ebtables ip6table_filter ip6_tables iptable_filter ip_tables x_tables bpfilter tun bridge stp llc nfs lockd grace fscache af_packet ccm algif_aead cbc des_generic libdes arc4 cmac sha512_ssse3 algif_skcipher sha512_generic bnep md4 algif_hash af_alg zram sunrpc fuse elan_i2c uvcvideo videobuf2_vmalloc videobuf2_memops videobuf2_v4l2 videobuf2_common videodev btusb btintel mc bluetooth ecdh_generic ecc crc16 btrfs xor joydev mousedev raid6_pq hid_generic usbhid hid mei_hdcp snd_hda_codec_realtek snd_hda_codec_generic ledtrig_audio intel_rapl_msr intel_rapl_common snd_soc_skl snd_soc_hdac_hda snd_hda_ext_core snd_soc_sst_dsp snd_soc_sst_ipc x86_pkg_temp_thermal intel_powerclamp i915 snd_soc_core iwlmvm coretemp snd_compress snd_soc_acpi_intel_match
Sep  4 18:28:05 Wesker kernel:  i2c_algo_bit snd_hda_codec_hdmi input_leds snd_soc_acpi iTCO_wdt drm_kms_helper mac80211 kvm_intel syscopyarea snd_hda_intel sysfillrect libarc4 psmouse snd_intel_dspcfg watchdog sysimgblt atkbd intel_pmc_bxt ahci fb_sys_fops sdhci_pci iTCO_vendor_support snd_hda_codec kvm iwlwifi cec xhci_pci snd_hwdep msi_wmi snd_hda_core libps2 wmi_bmof intel_wmi_thunderbolt mxm_wmi sparse_keymap irqbypass crc32_pclmul crc32c_intel xhci_pci_renesas snd_pcm cqhci xhci_hcd libahci sdhci snd_timer aesni_intel libaes crypto_simd glue_helper mmc_core i2c_i801 drm alx cfg80211 pcspkr i2c_smbus snd led_class usbcore mdio mei_me intel_gtt libata rfkill soundcore usb_common agpgart intel_pch_thermal thermal ac battery i8042 tpm_crb tpm_tis video wmi tpm_tis_core backlight tpm intel_pmc_core acpi_pad evdev
Sep  4 18:28:05 Wesker kernel: CR2: 0000000000000000
Sep  4 18:28:05 Wesker kernel: ---[ end trace b0cfc80bd3aa7b45 ]---
Sep  4 18:28:05 Wesker kernel: snd_hda_intel 0000:00:1f.3: Unstable LPIB (16048 >= 4408); disabling LPIB delay counting
Sep  4 18:28:05 Wesker kernel: RIP: 0010:obj_malloc+0x30/0xd0
Sep  4 18:28:05 Wesker kernel: Code: 48 44 0f af c0 4c 8b 56 10 41 81 f8 00 10 00 00 7c 33 45 89 c1 41 c1 f9 0c 31 c9 66 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 40 00 <49> f7 02 00 04 00 00 75 0d 4d 8b 52 20 ff c1 44 39 c9 7c ec eb 05
Sep  4 18:28:05 Wesker kernel: RSP: 0018:ffff8cea46443a68 EFLAGS: 00010293
Sep  4 18:28:05 Wesker kernel: RAX: 00000000d2257545 RBX: 00000000000004c1 RCX: 0000000000000004
Sep  4 18:28:05 Wesker kernel: RDX: ffff8a65f49feee0 RSI: ffff8a65e67be150 RDI: ffff8a670dfc9a80
Sep  4 18:28:05 Wesker kernel: RBP: ffff8cea46443ad8 R08: 00000000769bb060 R09: 00000000000769bb
Sep  4 18:28:05 Wesker kernel: R10: 0000000000000000 R11: ffff8a65db756fec R12: ffff8a670dfc9a80
Sep  4 18:28:05 Wesker kernel: R13: 0000000000002800 R14: ffff8a65e67be150 R15: ffff8a65f49feee0
Sep  4 18:28:05 Wesker kernel: FS:  0000000000000000(0000) GS:ffff8a689dac0000(0000) knlGS:0000000000000000
Sep  4 18:28:05 Wesker kernel: CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
Sep  4 18:28:05 Wesker kernel: CR2: 0000000000000000 CR3: 00000006932aa003 CR4: 00000000003606e0
Sep  4 18:28:06 Wesker su[41016]: pam_unix(su:session): session closed for user root
Sep  4 18:28:51 Wesker kernel: rcu: INFO: rcu_sched self-detected stall on CPU
Sep  4 18:28:51 Wesker kernel: rcu: \x095-....: (20999 ticks this GP) idle=bb2/1/0x4000000000000000 softirq=1761975/1761975 fqs=5248 
Sep  4 18:28:51 Wesker kernel: \x09(t=21000 jiffies g=6256137 q=12662)
Sep  4 18:28:51 Wesker kernel: NMI backtrace for cpu 5
Sep  4 18:28:51 Wesker kernel: CPU: 5 PID: 40989 Comm: btrfs-transacti Tainted: P     UD W  O      5.8.6-gentoo-x86_64 #1
Sep  4 18:28:51 Wesker kernel: Hardware name: Micro-Star International Co., Ltd. GS73 Stealth 8RE/MS-17B5, BIOS E17B5IMS.110 05/17/2019
Sep  4 18:28:51 Wesker kernel: Call Trace:
Sep  4 18:28:51 Wesker kernel:  <IRQ>
Sep  4 18:28:51 Wesker kernel:  dump_stack+0x8f/0xdb
Sep  4 18:28:51 Wesker kernel:  nmi_trigger_cpumask_backtrace+0xb1/0x100
Sep  4 18:28:51 Wesker kernel:  rcu_dump_cpu_stacks+0xd8/0xf0
Sep  4 18:28:51 Wesker kernel:  rcu_pending+0x3db/0x750
Sep  4 18:28:51 Wesker kernel:  rcu_sched_clock_irq+0x105/0x120
Sep  4 18:28:51 Wesker kernel:  update_process_times+0x56/0x90
Sep  4 18:28:51 Wesker kernel:  tick_sched_timer+0x7d/0xd0
Sep  4 18:28:51 Wesker kernel:  ? tick_setup_sched_timer+0x120/0x120
Sep  4 18:28:51 Wesker kernel:  __hrtimer_run_queues+0xe7/0x160
Sep  4 18:28:51 Wesker kernel:  hrtimer_interrupt+0x118/0x390
Sep  4 18:28:51 Wesker kernel:  ? __do_softirq+0x12e/0x20d
Sep  4 18:28:51 Wesker kernel:  __sysvec_apic_timer_interrupt+0x50/0xd0
Sep  4 18:28:51 Wesker kernel:  asm_call_on_stack+0x12/0x20
Sep  4 18:28:51 Wesker kernel:  </IRQ>
Sep  4 18:28:51 Wesker kernel:  sysvec_apic_timer_interrupt+0x55/0x90
Sep  4 18:28:51 Wesker kernel:  asm_sysvec_apic_timer_interrupt+0x12/0x20
Sep  4 18:28:51 Wesker kernel: RIP: 0010:queued_spin_lock_slowpath+0x148/0x1e0
Sep  4 18:28:51 Wesker kernel: Code: 89 c2 c1 e2 08 b9 ff 00 ff ff 23 0f 09 d1 81 f9 00 01 00 00 0f 83 8c 00 00 00 85 c9 74 0e 0f 1f 40 00 8b 07 84 c0 74 04 f3 90 <eb> f6 66 c7 07 01 00 c3 31 f6 eb 0e 31 f6 eb 0a 0f 1f 84 00 00 00
Sep  4 18:28:51 Wesker kernel: RSP: 0018:ffff8cea43fdb818 EFLAGS: 00000202
Sep  4 18:28:51 Wesker kernel: RAX: 0000000000000101 RBX: 00000000000004c5 RCX: 0000000000000001
Sep  4 18:28:51 Wesker kernel: RDX: 0000000000000000 RSI: 0000000000000001 RDI: ffff8a670dfc9a80
Sep  4 18:28:51 Wesker kernel: RBP: ffff8cea43fdb888 R08: ffffacea3fb49300 R09: ffff8a65de026f40
Sep  4 18:28:51 Wesker kernel: R10: ffff8a660a454dfd R11: ffff8a660a454fec R12: ffff8a670dfc9a80
Sep  4 18:28:51 Wesker kernel: R13: 0000000000002800 R14: ffff8a68945d1000 R15: 000000000000280a
Sep  4 18:28:51 Wesker kernel:  zs_malloc+0xa1/0x4e0
Sep  4 18:28:51 Wesker kernel:  zram_bvec_rw+0x1b4/0x470 [zram]
Sep  4 18:28:51 Wesker kernel:  zram_make_request+0x219/0x310 [zram]
Sep  4 18:28:51 Wesker kernel:  generic_make_request+0x156/0x350
Sep  4 18:28:51 Wesker kernel:  submit_bio+0xe7/0x180
Sep  4 18:28:51 Wesker kernel:  ? btrfs_bio_counter_inc_blocked+0x38/0x130 [btrfs]
Sep  4 18:28:51 Wesker kernel:  ? memcmp_extent_buffer+0x8b/0xd0 [btrfs]
Sep  4 18:28:51 Wesker kernel:  ? write_extent_buffer+0xb0/0x140 [btrfs]
Sep  4 18:28:51 Wesker kernel:  btrfs_map_bio+0x2a0/0x350 [btrfs]
Sep  4 18:28:51 Wesker kernel:  btree_submit_bio_hook+0x139/0x170 [btrfs]
Sep  4 18:28:51 Wesker kernel:  submit_extent_page+0xf6/0x250 [btrfs]
Sep  4 18:28:51 Wesker kernel:  write_one_eb+0x199/0x260 [btrfs]
Sep  4 18:28:51 Wesker kernel:  ? end_bio_extent_readpage+0x650/0x650 [btrfs]
Sep  4 18:28:51 Wesker kernel:  btree_write_cache_pages+0x1f7/0x410 [btrfs]
Sep  4 18:28:51 Wesker kernel:  ? unmask_8259A+0x2f/0x30
Sep  4 18:28:51 Wesker kernel:  do_writepages+0x48/0xf0
Sep  4 18:28:51 Wesker kernel:  __filemap_fdatawrite_range+0xff/0x130
Sep  4 18:28:51 Wesker kernel:  btrfs_write_marked_extents+0x144/0x180 [btrfs]
Sep  4 18:28:51 Wesker kernel:  btrfs_commit_transaction+0x71b/0xbd0 [btrfs]
Sep  4 18:28:51 Wesker kernel:  transaction_kthread+0xed/0x170 [btrfs]
Sep  4 18:28:51 Wesker kernel:  kthread+0x11c/0x130
Sep  4 18:28:51 Wesker kernel:  ? cleaner_kthread+0x120/0x120 [btrfs]
Sep  4 18:28:51 Wesker kernel:  ? kthread_blkcg+0x30/0x30
Sep  4 18:28:51 Wesker kernel:  ret_from_fork+0x22/0x30
Comment 1 David 2020-09-04 20:08:55 UTC
Note: It might be related to heavy CPU usage inside zram+btrfs, in my case it was a gentoo chrooted compiling.

When this bug happens, 100% of the times happens the "RCU CPU stall" so it might be related.
Comment 2 David 2020-09-18 20:45:17 UTC
Tested versions up to 5.8.10 with same problems despite all the newer fixes to other btrfs issues.
Comment 3 Tomas Thiemel 2020-11-02 17:59:57 UTC
"Same" problem.
Kernel version: 5.8.16 (gentoo)
Bug when running rsync. Previous kernel versions were fine.

[135011.002600] BUG: kernel NULL pointer dereference, address: 0000000000000018
[135011.010411] #PF: supervisor read access in kernel mode
[135011.016344] #PF: error_code(0x0000) - not-present page
[135011.022277] PGD 0 P4D 0
[135011.025619] Oops: 0000 [#1] SMP
[135011.029572] CPU: 7 PID: 32071 Comm: kworker/u16:0 Tainted: G       A          5.8.16-gentoo-xeon #2
[135011.039400] Hardware name: MSI MS-7759/Z77MA-G45 (MS-7759), BIOS V1.9 03/01/2013
[135011.047539] Workqueue: btrfs-delalloc btrfs_work_helper
[135011.053550] RIP: 0010:compress_file_range+0x618/0x780
[135011.059362] Code: c5 01 4d 85 f6 0f 84 cd fb ff ff 31 db 31 c0 48 83 7c 24 40 00 75 0f eb 3e 83 c3 01 48 63 c3 48 3b 44 24 40 73 31 49 8b 3c c6 <48> 83 7f 18 00 75 6c 48 8b 47 08 48 8d 50 ff a8 01 48 0f 45 fa f0
[135011.079687] RSP: 0018:ffffc900009ffd40 EFLAGS: 00010206
[135011.085771] RAX: 0000000000000000 RBX: 0000000000000000 RCX: 0000000000008412
[135011.093818] RDX: 0000000000001000 RSI: ffff8887f2ac0000 RDI: 0000000000000000
[135011.101881] RBP: ffff8882f10ea9f8 R08: 0000000000000001 R09: 0000000000008412
[135011.109880] R10: 0000000000000001 R11: 0000000000000000 R12: 0000000000001000
[135011.117908] R13: 0000000000000001 R14: ffff88817feba0c0 R15: 0000000000000000
[135011.125927] FS:  0000000000000000(0000) GS:ffff8887ff200000(0000) knlGS:0000000000000000
[135011.134936] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[135011.141595] CR2: 0000000000000018 CR3: 00000007f081e004 CR4: 00000000001626e0
[135011.149631] Call Trace:
[135011.152977]  async_cow_start+0xd/0x30
[135011.157547]  btrfs_work_helper+0xdd/0x1f0
[135011.162471]  process_one_work+0x201/0x3e0
[135011.167340]  ? process_one_work+0x1a4/0x3e0
[135011.172455]  worker_thread+0x4b/0x3a0
[135011.176986]  ? process_one_work+0x3e0/0x3e0
[135011.182035]  kthread+0x110/0x150
[135011.186075]  ? kthread_park+0x80/0x80
[135011.190569]  ret_from_fork+0x1f/0x30
[135011.195023] Modules linked in: isofs cdrom uas usb_storage xt_state vhost_net vhost vhost_iotlb tap xt_CHECKSUM xt_MASQUERADE xt_conntrack ipt_REJECT nf_reject_ipv4 xt_tcpudp ip6table_mangle ip6table_nat iptable_mangle iptable_nat nf_nat nf_conntrack nf_defrag_ipv6 nf_defrag_ipv4 ebtable_filter ebtables ip6table_filter ip6_tables iptable_filter ip_tables x_tables tun fuse nfsd auth_rpcgss oid_registry lockd grace sunrpc nls_iso8859_1 vfat f
at binfmt_misc dummy x86_pkg_temp_thermal kvm_intel f71882fg kvm at24 coretemp regmap_i2c iTCO_wdt iTCO_vendor_support crct10dif_pclmul crc32_pclmul crc32c_intel ghash_clmulni_intel ehci_pci ehci_hcd aesni_intel xhci_pci crypto_simd xhci_hcd i2c_i801 cryptd i2c_smbus glue_helper video usbcore mei_me i2c_core pm80xx r8169 realtek evdev backlight fan thermal lpc_ich libphy mei mfd_core usb_common
[135011.274331] CR2: 0000000000000018
[135011.278662] ---[ end trace 892756ca8ab77fe8 ]---
[135011.278664] BUG: kernel NULL pointer dereference, address: 0000000000000018
[135011.278666] #PF: supervisor read access in kernel mode
[135011.284239] RIP: 0010:compress_file_range+0x618/0x780
[135011.284242] Code: c5 01 4d 85 f6 0f 84 cd fb ff ff 31 db 31 c0 48 83 7c 24 40 00 75 0f eb 3e 83 c3 01 48 63 c3 48 3b 44 24 40 73 31 49 8b 3c c6 <48> 83 7f 18 00 75 6c 48 8b 47 08 48 8d 50 ff a8 01 48 0f 45 fa f0
[135011.292125] #PF: error_code(0x0000) - not-present page
[135011.298225] RSP: 0018:ffffc900009ffd40 EFLAGS: 00010206
[135011.304245] PGD 0 P4D 0
[135011.324995] RAX: 0000000000000000 RBX: 0000000000000000 RCX: 0000000000008412
[135011.324996] RDX: 0000000000001000 RSI: ffff8887f2ac0000 RDI: 0000000000000000
[135011.331181] Oops: 0000 [#2] SMP
[135011.337437] RBP: ffff8882f10ea9f8 R08: 0000000000000001 R09: 0000000000008412
[135011.337438] R10: 0000000000000001 R11: 0000000000000000 R12: 0000000000001000
[135011.341116] CPU: 5 PID: 8896 Comm: kworker/u16:2 Tainted: G      DA          5.8.16-gentoo-xeon #2
[135011.349280] R13: 0000000000000001 R14: ffff88817feba0c0 R15: 0000000000000000
[135011.349281] FS:  0000000000000000(0000) GS:ffff8887ff200000(0000) knlGS:0000000000000000
[135011.357403] Hardware name: MSI MS-7759/Z77MA-G45 (MS-7759), BIOS V1.9 03/01/2013
[135011.361584] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[135011.361585] CR2: 0000000000000018 CR3: 00000007f081e004 CR4: 00000000001626e0
[135011.369844] Workqueue: btrfs-delalloc btrfs_work_helper
[135011.435345] RIP: 0010:compress_file_range+0x6ed/0x780
[135011.435346] Code: 01 00 4d 85 f6 0f 84 4a fb ff ff 31 db 31 c0 48 83 7c 24 40 00 75 0f eb 33 83 c3 01 48 63 c3 48 3b 44 24 40 73 26 49 8b 3c c6 <48> 83 7f 18 00 75 2b 48 8b 47 08 48 8d 50 ff a8 01 48 0f 45 fa f0
[135011.435347] RSP: 0018:ffffc90001a97d40 EFLAGS: 00010202
[135011.435348] RAX: 0000000000000000 RBX: 0000000000000000 RCX: 0000000000000000
[135011.435349] RDX: 0000000000000000 RSI: 00000000000007dd RDI: 0000000000000000
[135011.435349] RBP: ffff8883d3786148 R08: 0000000000000000 R09: 0000000000000000
[135011.435350] R10: 00000000001e7578 R11: ffffffffffffffb8 R12: 0000000000001000
[135011.435351] R13: 0000000000000000 R14: ffff8887f9e8e850 R15: 0000000000000000
[135011.435352] FS:  0000000000000000(0000) GS:ffff8887fee00000(0000) knlGS:0000000000000000
[135011.435352] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[135011.435353] CR2: 0000000000000018 CR3: 0000000006211001 CR4: 00000000001626e0
[135011.435354] Call Trace:
[135011.435357]  async_cow_start+0xd/0x30
[135011.435360]  btrfs_work_helper+0xdd/0x1f0
[135011.435362]  process_one_work+0x201/0x3e0
[135011.435363]  ? process_one_work+0x1a4/0x3e0
[135011.435365]  worker_thread+0x4b/0x3a0
[135011.435366]  ? process_one_work+0x3e0/0x3e0
[135011.435368]  kthread+0x110/0x150
[135011.435370]  ? kthread_park+0x80/0x80
[135011.435372]  ret_from_fork+0x1f/0x30
[135011.435373] Modules linked in: isofs cdrom uas usb_storage xt_state vhost_net vhost vhost_iotlb tap xt_CHECKSUM xt_MASQUERADE xt_conntrack ipt_REJECT nf_reject_ipv4 xt_tcpudp ip6table_mangle ip6table_nat iptable_mangle iptable_nat nf_nat nf_conntrack nf_defrag_ipv6 nf_defrag_ipv4 ebtable_filter ebtables ip6table_filter ip6_tables iptable_filter ip_tables x_tables tun fuse nfsd auth_rpcgss oid_registry lockd grace sunrpc nls_iso8859_1 vfat f
at binfmt_misc dummy x86_pkg_temp_thermal kvm_intel f71882fg kvm at24 coretemp regmap_i2c iTCO_wdt iTCO_vendor_support crct10dif_pclmul crc32_pclmul crc32c_intel ghash_clmulni_intel ehci_pci ehci_hcd aesni_intel xhci_pci crypto_simd xhci_hcd i2c_i801 cryptd i2c_smbus glue_helper video usbcore mei_me i2c_core pm80xx r8169 realtek evdev backlight fan thermal lpc_ich libphy mei mfd_core usb_common
[135011.662212] CR2: 0000000000000018
[135011.662214] ---[ end trace 892756ca8ab77fe9 ]---
[135011.662222] RIP: 0010:compress_file_range+0x618/0x780
[135011.678619] Code: c5 01 4d 85 f6 0f 84 cd fb ff ff 31 db 31 c0 48 83 7c 24 40 00 75 0f eb 3e 83 c3 01 48 63 c3 48 3b 44 24 40 73 31 49 8b 3c c6 <48> 83 7f 18 00 75 6c 48 8b 47 08 48 8d 50 ff a8 01 48 0f 45 fa f0
[135011.678620] RSP: 0018:ffffc900009ffd40 EFLAGS: 00010206
[135011.678621] RAX: 0000000000000000 RBX: 0000000000000000 RCX: 0000000000008412
[135011.678621] RDX: 0000000000001000 RSI: ffff8887f2ac0000 RDI: 0000000000000000
[135011.678622] RBP: ffff8882f10ea9f8 R08: 0000000000000001 R09: 0000000000008412
[135011.678623] R10: 0000000000000001 R11: 0000000000000000 R12: 0000000000001000
[135011.678625] R13: 0000000000000001 R14: ffff88817feba0c0 R15: 0000000000000000
[135011.746874] FS:  0000000000000000(0000) GS:ffff8887fee00000(0000) knlGS:0000000000000000
[135011.746875] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[135011.746876] CR2: 0000000000000018 CR3: 0000000006211001 CR4: 00000000001626e0
[135011.746877] BUG: sleeping function called from invalid context at include/linux/percpu-rwsem.h:49
[135011.746878] in_atomic(): 0, irqs_disabled(): 1, non_block: 0, pid: 8896, name: kworker/u16:2
[135011.746879] INFO: lockdep is turned off.
[135011.746881] CPU: 5 PID: 8896 Comm: kworker/u16:2 Tainted: G      DA          5.8.16-gentoo-xeon #2
[135011.746882] Hardware name: MSI MS-7759/Z77MA-G45 (MS-7759), BIOS V1.9 03/01/2013
[135011.746887] Workqueue: btrfs-delalloc btrfs_work_helper
[135011.746888] Call Trace:
[135011.746893]  dump_stack+0x57/0x70
[135011.746896]  ___might_sleep.cold+0x95/0xa2
[135011.746899]  exit_signals+0x2b/0x220
[135011.746902]  do_exit+0xcb/0xb20
[135011.746904]  ? process_one_work+0x3e0/0x3e0
[135011.746905]  ? kthread+0x110/0x150
[135011.746909]  rewind_stack_do_exit+0x17/0x20
[135011.856735] RIP: 0000:0x0
[135011.856738] Code: Bad RIP value.
[135011.864533] RSP: 0000:0000000000000000 EFLAGS: 00000000 ORIG_RAX: 0000000000000000
[135011.864534] RAX: 0000000000000000 RBX: 0000000000000000 RCX: 0000000000000000
[135011.864534] RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000000000
[135011.864535] RBP: 0000000000000000 R08: 0000000000000000 R09: 0000000000000000
[135011.864536] R10: 0000000000000000 R11: 0000000000000000 R12: 0000000000000000
[135011.864536] R13: 0000000000000000 R14: 0000000000000000 R15: 0000000000000000
Comment 4 Tomas Thiemel 2020-11-14 02:40:22 UTC
Kernel version: 5.8.10 (vanilla)

[  270.080077] BUG: kernel NULL pointer dereference, address: 0000000000000018
[  270.087782] #PF: supervisor read access in kernel mode
[  270.093651] #PF: error_code(0x0000) - not-present page
[  270.099519] PGD 0 P4D 0
[  270.102772] Oops: 0000 [#1] SMP
[  270.106620] CPU: 6 PID: 804 Comm: kworker/u16:5 Tainted: G       A          5.8.10-xeon #2
[  270.115608] Hardware name: MSI MS-7759/Z77MA-G45 (MS-7759), BIOS V1.9 03/01/2013
[  270.123755] Workqueue: btrfs-delalloc btrfs_work_helper
[  270.129719] RIP: 0010:compress_file_range+0x618/0x780
[  270.135509] Code: c5 01 4d 85 f6 0f 84 cd fb ff ff 31 db 31 c0 48 83 7c 24 40 00 75 0f eb 3e 83 c3 01 48 63 c3 48 3b 44 24 40 73 31 49 8b 3c c6 <48> 83 7f 18 00 75 6c 48 8b 47 08 48 8d 50 ff a8 01 48 0f 45 fa f0
[  270.155844] RSP: 0018:ffffc9000080fd40 EFLAGS: 00010202
[  270.161878] RAX: 0000000000000000 RBX: 0000000000000000 RCX: 00000000000269a3
[  270.169829] RDX: 0000000000001000 RSI: ffff8887f38cc000 RDI: 0000000000000000
[  270.177779] RBP: ffff888458c35810 R08: 0000000000000001 R09: 00000000000269a3
[  270.185735] R10: 0000000000000001 R11: 0000000000000000 R12: 0000000000001000
[  270.193768] R13: 0000000000000001 R14: ffff8887f2b4de00 R15: 0000000000000000
[  270.201727] FS:  0000000000000000(0000) GS:ffff8887ff000000(0000) knlGS:0000000000000000
[  270.210642] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[  270.217211] CR2: 0000000000000018 CR3: 00000007edd10003 CR4: 00000000001626e0
[  270.225168] Call Trace:
[  270.228435]  async_cow_start+0xd/0x30
[  270.232912]  btrfs_work_helper+0xdd/0x1f0
[  270.237737]  process_one_work+0x201/0x3e0
[  270.242559]  ? process_one_work+0x1a4/0x3e0
[  270.247547]  worker_thread+0x4b/0x3a0
[  270.252010]  ? process_one_work+0x3e0/0x3e0
[  270.256982]  kthread+0x110/0x150
[  270.260997]  ? kthread_park+0x80/0x80
[  270.265443]  ret_from_fork+0x1f/0x30
[  270.269787] Modules linked in: xt_state vhost_net vhost vhost_iotlb tap tun xt_CHECKSUM xt_MASQUERADE xt_conntrack ipt_REJECT nf_reject_ipv4 xt_tcpudp ip6table_mangle ip6table_nat iptable_mangle iptable_nat nf_nat nf_conntrack nf_defrag_ipv6 nf_defrag_ipv4 ebtable_filter ebtables ip6table_filter ip6_tables iptable_filter ip_tables x_tables fuse nfsd auth_rpcgss oid_registry lockd grace sunrpc nls_iso8859_1 vfat fat binfmt_misc dummy f71882fg x86_pkg_temp_thermal coretemp kvm_intel at24 kvm regmap_i2c iTCO_wdt iTCO_vendor_support crct10dif_pclmul crc32_pclmul crc32c_intel ghash_clmulni_intel aesni_intel crypto_simd cryptd xhci_pci glue_helper xhci_hcd i2c_i801 i2c_smbus i2c_core ehci_pci ehci_hcd video backlight evdev thermal usbcore fan r8169 mei_me pm80xx realtek lpc_ich libphy mei usb_common mfd_core
[  270.346821] CR2: 0000000000000018
[  270.351030] ---[ end trace 71a7f7845787d06e ]---
[  270.356534] RIP: 0010:compress_file_range+0x618/0x780
[  270.362487] Code: c5 01 4d 85 f6 0f 84 cd fb ff ff 31 db 31 c0 48 83 7c 24 40 00 75 0f eb 3e 83 c3 01 48 63 c3 48 3b 44 24 40 73 31 49 8b 3c c6 <48> 83 7f 18 00 75 6c 48 8b 47 08 48 8d 50 ff a8 01 48 0f 45 fa f0
[  270.383134] RSP: 0018:ffffc9000080fd40 EFLAGS: 00010202
[  270.389324] RAX: 0000000000000000 RBX: 0000000000000000 RCX: 00000000000269a3
[  270.397429] RDX: 0000000000001000 RSI: ffff8887f38cc000 RDI: 0000000000000000
[  270.405546] RBP: ffff888458c35810 R08: 0000000000000001 R09: 00000000000269a3
[  270.413655] R10: 0000000000000001 R11: 0000000000000000 R12: 0000000000001000
[  270.421757] R13: 0000000000000001 R14: ffff8887f2b4de00 R15: 0000000000000000
[  270.429840] FS:  0000000000000000(0000) GS:ffff8887ff000000(0000) knlGS:0000000000000000
[  270.438879] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[  270.445578] CR2: 0000000000000018 CR3: 00000007edd10003 CR4: 00000000001626e0
[  270.453670] BUG: sleeping function called from invalid context at include/linux/percpu-rwsem.h:49
[  270.463517] in_atomic(): 0, irqs_disabled(): 1, non_block: 0, pid: 804, name: kworker/u16:5
[  270.472843] INFO: lockdep is turned off.
[  270.477734] CPU: 6 PID: 804 Comm: kworker/u16:5 Tainted: G      DA          5.8.10-xeon #2
[  270.487005] Hardware name: MSI MS-7759/Z77MA-G45 (MS-7759), BIOS V1.9 03/01/2013
[  270.495705] Workqueue: btrfs-delalloc btrfs_work_helper
[  270.502255] Call Trace:
[  270.505639]  dump_stack+0x57/0x70
[  270.509867]  ___might_sleep.cold+0x95/0xa2
[  270.514871]  exit_signals+0x2b/0x220
[  270.519344]  do_exit+0xcb/0xb20
[  270.523380]  ? process_one_work+0x3e0/0x3e0
[  270.528459]  ? kthread+0x110/0x150
[  270.532762]  rewind_stack_do_exit+0x17/0x20
[  270.537832] RIP: 0000:0x0
[  270.541329] Code: Bad RIP value.
[  270.545422] RSP: 0000:0000000000000000 EFLAGS: 00000000 ORIG_RAX: 0000000000000000
[  270.553867] RAX: 0000000000000000 RBX: 0000000000000000 RCX: 0000000000000000
[  270.561876] RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000000000
[  270.569881] RBP: 0000000000000000 R08: 0000000000000000 R09: 0000000000000000
[  270.577882] R10: 0000000000000000 R11: 0000000000000000 R12: 0000000000000000
[  270.585877] R13: 0000000000000000 R14: 0000000000000000 R15: 0000000000000000
Comment 5 Tomas Thiemel 2020-11-14 02:40:49 UTC
Kernel: 5.8.9 (vanilla)

[ 1386.180075] BUG: kernel NULL pointer dereference, address: 0000000000000018
[ 1386.187663] #PF: supervisor read access in kernel mode
[ 1386.193522] #PF: error_code(0x0000) - not-present page
[ 1386.199333] PGD 0 P4D 0
[ 1386.202518] Oops: 0000 [#1] SMP
[ 1386.206318] CPU: 3 PID: 13052 Comm: kworker/u16:15 Tainted: G       A          5.8.9-xeon #2
[ 1386.215400] Hardware name: MSI MS-7759/Z77MA-G45 (MS-7759), BIOS V1.9 03/01/2013
[ 1386.223450] Workqueue: btrfs-delalloc btrfs_work_helper
[ 1386.229338] RIP: 0010:compress_file_range+0x618/0x780
[ 1386.235036] Code: c5 01 4d 85 f6 0f 84 cd fb ff ff 31 db 31 c0 48 83 7c 24 40 00 75 0f eb 3e 83 c3 01 48 63 c3 48 3b 44 24 40 73 31 49 8b 3c c6 <48> 83 7f 18 00 75 6c 48 8b 47 08 48 8d 50 ff a8 01 48 0f 45 fa f0
[ 1386.255216] RSP: 0018:ffffc90000b5fd40 EFLAGS: 00010202
[ 1386.261161] RAX: 0000000000000000 RBX: 0000000000000000 RCX: 0000000000002000
[ 1386.269025] RDX: 0000000000001000 RSI: ffff8887f37bc000 RDI: 0000000000000000
[ 1386.276892] RBP: ffff888447866a80 R08: 0000000000000001 R09: 0000000000002000
[ 1386.284755] R10: 0000000000000001 R11: 0000000000000000 R12: 0000000000001000
[ 1386.292618] R13: 0000000000000001 R14: ffff8887e8703b20 R15: 0000000000000000
[ 1386.300477] FS:  0000000000000000(0000) GS:ffff8887fea00000(0000) knlGS:0000000000000000
[ 1386.309310] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[ 1386.315808] CR2: 0000000000000018 CR3: 0000000006211004 CR4: 00000000001626e0
[ 1386.323702] Call Trace:
[ 1386.327246]  async_cow_start+0xd/0x30
[ 1386.331644]  btrfs_work_helper+0xdd/0x1f0
[ 1386.336386]  process_one_work+0x201/0x3e0
[ 1386.341122]  ? process_one_work+0x1a4/0x3e0
[ 1386.346027]  worker_thread+0x4b/0x3a0
[ 1386.350406]  ? process_one_work+0x3e0/0x3e0
[ 1386.355299]  kthread+0x110/0x150
[ 1386.359236]  ? kthread_park+0x80/0x80
[ 1386.363603]  ret_from_fork+0x1f/0x30
[ 1386.367869] Modules linked in: xt_state vhost_net vhost vhost_iotlb tap tun xt_CHECKSUM xt_MASQUERADE xt_conntrack ipt_REJECT nf_reject_ipv4 xt_tcpudp ip6table_mangle ip6table_nat iptable_mangle iptable_nat nf_nat nf_conntrack nf_defrag_ipv6 nf_defrag_ipv4 ebtable_filter ebtables ip6table_filter ip6_tables iptable_filter ip_tables x_tables fuse nfsd auth_rpcgss oid_registry lockd grace sunrpc nls_iso8859_1 vfat fat binfmt_misc dummy x86_pkg_temp_thermal kvm_intel f71882fg coretemp kvm at24 regmap_i2c iTCO_wdt iTCO_vendor_support crct10dif_pclmul crc32_pclmul crc32c_intel ghash_clmulni_intel aesni_intel crypto_simd cryptd xhci_pci xhci_hcd glue_helper r8169 i2c_i801 ehci_pci i2c_smbus realtek ehci_hcd i2c_core evdev video usbcore libphy fan backlight lpc_ich mei_me thermal pm80xx mei mfd_core usb_common
[ 1386.444273] CR2: 0000000000000018
[ 1386.448385] ---[ end trace 202a591ab846605b ]---
[ 1386.453794] RIP: 0010:compress_file_range+0x618/0x780
[ 1386.459639] Code: c5 01 4d 85 f6 0f 84 cd fb ff ff 31 db 31 c0 48 83 7c 24 40 00 75 0f eb 3e 83 c3 01 48 63 c3 48 3b 44 24 40 73 31 49 8b 3c c6 <48> 83 7f 18 00 75 6c 48 8b 47 08 48 8d 50 ff a8 01 48 0f 45 fa f0
[ 1386.480083] RSP: 0018:ffffc90000b5fd40 EFLAGS: 00010202
[ 1386.486173] RAX: 0000000000000000 RBX: 0000000000000000 RCX: 0000000000002000
[ 1386.494171] RDX: 0000000000001000 RSI: ffff8887f37bc000 RDI: 0000000000000000
[ 1386.502179] RBP: ffff888447866a80 R08: 0000000000000001 R09: 0000000000002000
[ 1386.510180] R10: 0000000000000001 R11: 0000000000000000 R12: 0000000000001000
[ 1386.518174] R13: 0000000000000001 R14: ffff8887e8703b20 R15: 0000000000000000
[ 1386.526155] FS:  0000000000000000(0000) GS:ffff8887fea00000(0000) knlGS:0000000000000000
[ 1386.535093] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[ 1386.541685] CR2: 0000000000000018 CR3: 0000000006211004 CR4: 00000000001626e0
[ 1386.549678] BUG: sleeping function called from invalid context at include/linux/percpu-rwsem.h:49
[ 1386.559420] in_atomic(): 0, irqs_disabled(): 1, non_block: 0, pid: 13052, name: kworker/u16:15
[ 1386.568901] INFO: lockdep is turned off.
[ 1386.573688] CPU: 3 PID: 13052 Comm: kworker/u16:15 Tainted: G      DA          5.8.9-xeon #2
[ 1386.582999] Hardware name: MSI MS-7759/Z77MA-G45 (MS-7759), BIOS V1.9 03/01/2013
[ 1386.591275] Workqueue: btrfs-delalloc btrfs_work_helper
[ 1386.597359] Call Trace:
[ 1386.600628]  dump_stack+0x57/0x70
[ 1386.604755]  ___might_sleep.cold+0x95/0xa2
[ 1386.609650]  exit_signals+0x2b/0x220
[ 1386.614072]  do_exit+0xcb/0xb20
[ 1386.618032]  ? process_one_work+0x3e0/0x3e0
[ 1386.623026]  ? kthread+0x110/0x150
[ 1386.627228]  rewind_stack_do_exit+0x17/0x20
[ 1386.632202] RIP: 0000:0x0
[ 1386.635600] Code: Bad RIP value.
[ 1386.639599] RSP: 0000:0000000000000000 EFLAGS: 00000000 ORIG_RAX: 0000000000000000
[ 1386.647948] RAX: 0000000000000000 RBX: 0000000000000000 RCX: 0000000000000000
[ 1386.655862] RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000000000
[ 1386.663778] RBP: 0000000000000000 R08: 0000000000000000 R09: 0000000000000000
[ 1386.671702] R10: 0000000000000000 R11: 0000000000000000 R12: 0000000000000000
[ 1386.679612] R13: 0000000000000000 R14: 0000000000000000 R15: 0000000000000000
Comment 6 Tomas Thiemel 2020-11-14 02:56:10 UTC
Kernel: 5.8.8 (vanilla)

[  272.186455] BUG: kernel NULL pointer dereference, address: 0000000000000018
[  272.194340] #PF: supervisor read access in kernel mode
[  272.200422] #PF: error_code(0x0000) - not-present page
[  272.206478] PGD 0 P4D 0
[  272.209927] Oops: 0000 [#1] SMP
[  272.213962] CPU: 3 PID: 90 Comm: kworker/u16:4 Tainted: G       A          5.8.8-xeon #2
[  272.223023] Hardware name: MSI MS-7759/Z77MA-G45 (MS-7759), BIOS V1.9 03/01/2013
[  272.231340] Workqueue: btrfs-delalloc btrfs_work_helper
[  272.237534] RIP: 0010:compress_file_range+0x618/0x780
[  272.243440] Code: c5 01 4d 85 f6 0f 84 cd fb ff ff 31 db 31 c0 48 83 7c 24 40 00 75 0f eb 3e 83 c3 01 48 63 c3 48 3b 44 24 40 73 31 49 8b 3c c6 <48> 83 7f 18 00 75 6c 48 8b 47 08 48 8d 50 ff a8 01 48 0f 45 fa f0
[  272.264122] RSP: 0018:ffffc90000297d40 EFLAGS: 00010202
[  272.270375] RAX: 0000000000000000 RBX: 0000000000000000 RCX: 0000000000002000
[  272.278519] RDX: 0000000000001000 RSI: ffff8887f33c0000 RDI: 0000000000000000
[  272.286690] RBP: ffff8883b5f56a80 R08: 0000000000000001 R09: 0000000000002000
[  272.294871] R10: 0000000000000001 R11: 0000000000000000 R12: 0000000000001000
[  272.303062] R13: 0000000000000001 R14: ffff8887eb5c7080 R15: 0000000000000000
[  272.311237] FS:  0000000000000000(0000) GS:ffff8887fea00000(0000) knlGS:0000000000000000
[  272.320383] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[  272.327193] CR2: 0000000000000018 CR3: 0000000006211004 CR4: 00000000001626e0
[  272.335316] Call Trace:
[  272.339057]  async_cow_start+0xd/0x30
[  272.343742]  btrfs_work_helper+0xdd/0x1f0
[  272.348735]  process_one_work+0x201/0x3e0
[  272.353817]  ? process_one_work+0x1a4/0x3e0
[  272.358976]  worker_thread+0x4b/0x3a0
[  272.363636]  ? process_one_work+0x3e0/0x3e0
[  272.368805]  kthread+0x110/0x150
[  272.373003]  ? kthread_park+0x80/0x80
[  272.377651]  ret_from_fork+0x1f/0x30
[  272.382197] Modules linked in: xt_state vhost_net vhost vhost_iotlb tap tun xt_CHECKSUM xt_MASQUERADE xt_conntrack ipt_REJECT nf_reject_ipv4 xt_tcpudp ip6table_mangle ip6table_nat iptable_mangle iptable_nat nf_nat nf_conntrack nf_defrag_ipv6 nf_defrag_ipv4 ebtable_filter ebtables ip6table_filter ip6_tables iptable_filter ip_tables x_tables fuse nfsd auth_rpcgss oid_registry lockd grace sunrpc nls_iso8859_1 vfat fat binfmt_misc dummy x86_pkg_temp_thermal kvm_intel f71882fg at24 coretemp kvm regmap_i2c iTCO_wdt iTCO_vendor_support crct10dif_pclmul crc32_pclmul crc32c_intel ghash_clmulni_intel aesni_intel crypto_simd cryptd glue_helper i2c_i801 i2c_smbus ehci_pci r8169 xhci_pci video i2c_core realtek pm80xx xhci_hcd thermal ehci_hcd fan backlight libphy evdev usbcore mei_me lpc_ich mei mfd_core usb_common
[  272.461073] CR2: 0000000000000018
[  272.465530] ---[ end trace 53aabef3eaa41313 ]---
[  272.471310] RIP: 0010:compress_file_range+0x618/0x780
[  272.477492] Code: c5 01 4d 85 f6 0f 84 cd fb ff ff 31 db 31 c0 48 83 7c 24 40 00 75 0f eb 3e 83 c3 01 48 63 c3 48 3b 44 24 40 73 31 49 8b 3c c6 <48> 83 7f 18 00 75 6c 48 8b 47 08 48 8d 50 ff a8 01 48 0f 45 fa f0
[  272.498328] RSP: 0018:ffffc90000297d40 EFLAGS: 00010202
[  272.504692] RAX: 0000000000000000 RBX: 0000000000000000 RCX: 0000000000002000
[  272.512986] RDX: 0000000000001000 RSI: ffff8887f33c0000 RDI: 0000000000000000
[  272.521419] RBP: ffff8883b5f56a80 R08: 0000000000000001 R09: 0000000000002000
[  272.529751] R10: 0000000000000001 R11: 0000000000000000 R12: 0000000000001000
[  272.538074] R13: 0000000000000001 R14: ffff8887eb5c7080 R15: 0000000000000000
[  272.546435] FS:  0000000000000000(0000) GS:ffff8887fea00000(0000) knlGS:0000000000000000
[  272.555766] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[  272.562738] CR2: 0000000000000018 CR3: 0000000006211004 CR4: 00000000001626e0
[  272.571089] BUG: sleeping function called from invalid context at include/linux/percpu-rwsem.h:49
[  272.581200] in_atomic(): 0, irqs_disabled(): 1, non_block: 0, pid: 90, name: kworker/u16:4
[  272.590826] INFO: lockdep is turned off.
[  272.596022] CPU: 3 PID: 90 Comm: kworker/u16:4 Tainted: G      DA          5.8.8-xeon #2
[  272.605450] Hardware name: MSI MS-7759/Z77MA-G45 (MS-7759), BIOS V1.9 03/01/2013
[  272.614108] Workqueue: btrfs-delalloc btrfs_work_helper
[  272.620521] Call Trace:
[  272.624121]  dump_stack+0x57/0x70
[  272.628508]  ___might_sleep.cold+0x95/0xa2
[  272.633863]  exit_signals+0x2b/0x220
[  272.638536]  do_exit+0xcb/0xb20
[  272.642829]  ? process_one_work+0x3e0/0x3e0
[  272.648170]  ? kthread+0x110/0x150
[  272.652659]  rewind_stack_do_exit+0x17/0x20
[  272.657892] RIP: 0000:0x0
[  272.661549] Code: Bad RIP value.
[  272.665826] RSP: 0000:0000000000000000 EFLAGS: 00000000 ORIG_RAX: 0000000000000000
[  272.674489] RAX: 0000000000000000 RBX: 0000000000000000 RCX: 0000000000000000
[  272.682705] RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000000000
[  272.690938] RBP: 0000000000000000 R08: 0000000000000000 R09: 0000000000000000
[  272.699230] R10: 0000000000000000 R11: 0000000000000000 R12: 0000000000000000
[  272.707439] R13: 0000000000000000 R14: 0000000000000000 R15: 0000000000000000
Comment 7 Tomas Thiemel 2020-11-14 03:18:52 UTC
Kernel 5.8.6

[  377.212205] BUG: kernel NULL pointer dereference, address: 0000000000000018
[  377.220175] #PF: supervisor read access in kernel mode
[  377.226331] #PF: error_code(0x0000) - not-present page
[  377.232480] PGD 0 P4D 0
[  377.236021] Oops: 0000 [#1] SMP
[  377.240151] CPU: 0 PID: 10260 Comm: kworker/u16:13 Tainted: G       A          5.8.6-xeon #2
[  377.249585] Hardware name: MSI MS-7759/Z77MA-G45 (MS-7759), BIOS V1.9 03/01/2013
[  377.258007] Workqueue: btrfs-delalloc btrfs_work_helper
[  377.264242] RIP: 0010:compress_file_range+0x618/0x780
[  377.270324] Code: c5 01 4d 85 f6 0f 84 cd fb ff ff 31 db 31 c0 48 83 7c 24 40 00 75 0f eb 3e 83 c3 01 48 63 c3 48 3b 44 24 40 73 31 49 8b 3c c6 <48> 83 7f 18 00 75 6c 48 8b 47 08 48 8d 50 ff a8 01 48 0f 45 fa f0
[  377.291313] RSP: 0018:ffffc90000fbbd40 EFLAGS: 00010206
[  377.297674] RAX: 0000000000000000 RBX: 0000000000000000 RCX: 0000000000132000
[  377.305957] RDX: 0000000000001000 RSI: ffff8887f2ae0000 RDI: 0000000000000000
[  377.314262] RBP: ffff88816ee65810 R08: 0000000000000001 R09: 0000000000003000
[  377.322572] R10: 0000000000000001 R11: 0000000000000000 R12: 0000000000001000
[  377.330900] R13: 0000000000000001 R14: ffff88833e9738a0 R15: 0000000000000000
[  377.339211] FS:  0000000000000000(0000) GS:ffff8887fe400000(0000) knlGS:0000000000000000
[  377.348499] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[  377.355434] CR2: 0000000000000018 CR3: 00000007e94a8006 CR4: 00000000001626f0
[  377.363785] Call Trace:
[  377.367420]  async_cow_start+0xd/0x30
[  377.372299]  btrfs_work_helper+0xdd/0x1f0
[  377.377491]  process_one_work+0x201/0x3e0
[  377.382675]  ? process_one_work+0x1a4/0x3e0
[  377.388045]  worker_thread+0x4b/0x3a0
[  377.392886]  ? process_one_work+0x3e0/0x3e0
[  377.398204]  kthread+0x110/0x150
[  377.402583]  ? kthread_park+0x80/0x80
[  377.407393]  ret_from_fork+0x1f/0x30
[  377.412079] Modules linked in: xt_state vhost_net vhost vhost_iotlb tap tun xt_CHECKSUM xt_MASQUERADE xt_conntrack ipt_REJECT nf_reject_ipv4 xt_tcpudp ip6table_mangle ip6table_nat iptable_mangle iptable_nat nf_nat nf_conntrack nf_defrag_ipv6 nf_defrag_ipv4 ebtable_filter ebtables ip6table_filter ip6_tables iptable_filter ip_tables x_tables fuse nfsd auth_rpcgss oid_registry lockd grace sunrpc nls_iso8859_1 vfat fat binfmt_misc dummy f71882fg x86_pkg_temp_thermal coretemp kvm_intel at24 regmap_i2c kvm iTCO_wdt iTCO_vendor_support crct10dif_pclmul crc32_pclmul crc32c_intel xhci_pci xhci_hcd ghash_clmulni_intel ehci_pci aesni_intel i2c_i801 ehci_hcd r8169 crypto_simd i2c_smbus cryptd video glue_helper i2c_core backlight realtek usbcore fan pm80xx mei_me libphy evdev thermal lpc_ich mei mfd_core usb_common
[  377.492053] CR2: 0000000000000018
[  377.496717] ---[ end trace 9f0ef270af04493e ]---
[  377.502646] RIP: 0010:compress_file_range+0x618/0x780
[  377.509039] Code: c5 01 4d 85 f6 0f 84 cd fb ff ff 31 db 31 c0 48 83 7c 24 40 00 75 0f eb 3e 83 c3 01 48 63 c3 48 3b 44 24 40 73 31 49 8b 3c c6 <48> 83 7f 18 00 75 6c 48 8b 47 08 48 8d 50 ff a8 01 48 0f 45 fa f0
[  377.530628] RSP: 0018:ffffc90000fbbd40 EFLAGS: 00010206
[  377.537205] RAX: 0000000000000000 RBX: 0000000000000000 RCX: 0000000000132000
[  377.545614] RDX: 0000000000001000 RSI: ffff8887f2ae0000 RDI: 0000000000000000
[  377.554162] RBP: ffff88816ee65810 R08: 0000000000000001 R09: 0000000000003000
[  377.562713] R10: 0000000000000001 R11: 0000000000000000 R12: 0000000000001000
[  377.571227] R13: 0000000000000001 R14: ffff88833e9738a0 R15: 0000000000000000
[  377.579747] FS:  0000000000000000(0000) GS:ffff8887fe400000(0000) knlGS:0000000000000000
[  377.589224] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[  377.596358] CR2: 0000000000000018 CR3: 00000007e94a8006 CR4: 00000000001626f0
[  377.604897] BUG: sleeping function called from invalid context at include/linux/percpu-rwsem.h:49
[  377.615163] in_atomic(): 0, irqs_disabled(): 1, non_block: 0, pid: 10260, name: kworker/u16:13
[  377.625185] INFO: lockdep is turned off.
[  377.630496] CPU: 0 PID: 10260 Comm: kworker/u16:13 Tainted: G      DA          5.8.6-xeon #2
[  377.640447] Hardware name: MSI MS-7759/Z77MA-G45 (MS-7759), BIOS V1.9 03/01/2013
[  377.649274] Workqueue: btrfs-delalloc btrfs_work_helper
[  377.655906] Call Trace:
[  377.659736]  dump_stack+0x57/0x70
[  377.664389]  ___might_sleep.cold+0x95/0xa2
[  377.669836]  exit_signals+0x2b/0x220
[  377.674740]  do_exit+0xcb/0xb20
[  377.679218]  ? process_one_work+0x3e0/0x3e0
[  377.684747]  ? kthread+0x110/0x150
[  377.689466]  rewind_stack_do_exit+0x17/0x20
[  377.694981] RIP: 0000:0x0
[  377.698883] Code: Bad RIP value.
[  377.703402] RSP: 0000:0000000000000000 EFLAGS: 00000000 ORIG_RAX: 0000000000000000
[  377.712288] RAX: 0000000000000000 RBX: 0000000000000000 RCX: 0000000000000000
[  377.720748] RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000000000
[  377.729197] RBP: 0000000000000000 R08: 0000000000000000 R09: 0000000000000000
[  377.737611] R10: 0000000000000000 R11: 0000000000000000 R12: 0000000000000000
[  377.746024] R13: 0000000000000000 R14: 0000000000000000 R15: 0000000000000000
Comment 8 Tomas Thiemel 2020-11-14 03:34:02 UTC
Kernel 5.8.3 seems to be OK - I will run more tests.
Comment 9 Tomas Thiemel 2020-11-14 03:37:05 UTC
Kernel 5.8.3

[  742.849937] BUG: kernel NULL pointer dereference, address: 0000000000000018
[  742.857594] #PF: supervisor read access in kernel mode
[  742.863460] #PF: error_code(0x0000) - not-present page
[  742.869337] PGD 0 P4D 0
[  742.872569] Oops: 0000 [#1] SMP
[  742.876451] CPU: 0 PID: 8674 Comm: kworker/u16:17 Tainted: G       A          5.8.3-xeon #2
[  742.885500] Hardware name: MSI MS-7759/Z77MA-G45 (MS-7759), BIOS V1.9 03/01/2013
[  742.893625] Workqueue: btrfs-delalloc btrfs_work_helper
[  742.899556] RIP: 0010:compress_file_range+0x618/0x780
[  742.905340] Code: c5 01 4d 85 f6 0f 84 cd fb ff ff 31 db 31 c0 48 83 7c 24 40 00 75 0f eb 3e 83 c3 01 48 63 c3 48 3b 44 24 40 73 31 49 8b 3c c6 <48> 83 7f 18 00 75 6c 48 8b 47 08 48 8d 50 ff a8 01 48 0f 45 fa f0
[  742.925621] RSP: 0018:ffffc90000cbfd40 EFLAGS: 00010202
[  742.931606] RAX: 0000000000000000 RBX: 0000000000000000 RCX: 0000000000080ed0
[  742.939548] RDX: 0000000000001000 RSI: ffff8887f31ac000 RDI: 0000000000000000
[  742.947460] RBP: ffff88828bc7a0c0 R08: 0000000000000001 R09: 0000000000080000
[  742.955375] R10: 0000000000000001 R11: 0000000000000000 R12: 0000000000001000
[  742.963295] R13: 0000000000000001 R14: ffff88840c621900 R15: 0000000000000000
[  742.971201] FS:  0000000000000000(0000) GS:ffff8887fe400000(0000) knlGS:0000000000000000
[  742.980088] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[  742.986601] CR2: 0000000000000018 CR3: 0000000006211001 CR4: 00000000001626f0
[  742.994923] Call Trace:
[  742.998264]  async_cow_start+0xd/0x30
[  743.002722]  btrfs_work_helper+0xdd/0x1f0
[  743.007521]  process_one_work+0x201/0x3e0
[  743.012324]  ? process_one_work+0x1a4/0x3e0
[  743.017443]  worker_thread+0x4b/0x3a0
[  743.022274]  ? process_one_work+0x3e0/0x3e0
[  743.027456]  kthread+0x110/0x150
[  743.031611]  ? kthread_park+0x80/0x80
[  743.036399]  ret_from_fork+0x1f/0x30
[  743.041068] Modules linked in: xt_state vhost_net vhost vhost_iotlb tap tun xt_CHECKSUM xt_MASQUERADE xt_conntrack ipt_REJECT nf_reject_ipv4 xt_tcpudp ip6table_mangle ip6table_nat iptable_mangle iptable_nat nf_nat nf_conntrack nf_defrag_ipv6 nf_defrag_ipv4 ebtable_filter ebtables ip6table_filter ip6_tables iptable_filter ip_tables x_tables fuse nfsd auth_rpcgss oid_registry lockd grace sunrpc nls_iso8859_1 vfat fat binfmt_misc dummy x86_pkg_temp_thermal f71882fg kvm_intel coretemp kvm crct10dif_pclmul crc32_pclmul at24 regmap_i2c crc32c_intel iTCO_wdt iTCO_vendor_support ghash_clmulni_intel aesni_intel crypto_simd cryptd xhci_pci ehci_pci xhci_hcd glue_helper ehci_hcd r8169 video i2c_i801 usbcore thermal realtek i2c_smbus mei_me backlight pm80xx i2c_core libphy evdev lpc_ich fan mei mfd_core usb_common ie31200_edac
[  743.119131] CR2: 0000000000000018
[  743.123319] ---[ end trace 9858f808097db31c ]---
[  743.128835] RIP: 0010:compress_file_range+0x618/0x780
[  743.134766] Code: c5 01 4d 85 f6 0f 84 cd fb ff ff 31 db 31 c0 48 83 7c 24 40 00 75 0f eb 3e 83 c3 01 48 63 c3 48 3b 44 24 40 73 31 49 8b 3c c6 <48> 83 7f 18 00 75 6c 48 8b 47 08 48 8d 50 ff a8 01 48 0f 45 fa f0
[  743.156041] RSP: 0018:ffffc90000cbfd40 EFLAGS: 00010202
[  743.162624] RAX: 0000000000000000 RBX: 0000000000000000 RCX: 0000000000080ed0
[  743.170959] RDX: 0000000000001000 RSI: ffff8887f31ac000 RDI: 0000000000000000
[  743.179063] RBP: ffff88828bc7a0c0 R08: 0000000000000001 R09: 0000000000080000
[  743.187155] R10: 0000000000000001 R11: 0000000000000000 R12: 0000000000001000
[  743.195330] R13: 0000000000000001 R14: ffff88840c621900 R15: 0000000000000000
[  743.203408] FS:  0000000000000000(0000) GS:ffff8887fe400000(0000) knlGS:0000000000000000
[  743.212523] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[  743.219367] CR2: 0000000000000018 CR3: 0000000006211001 CR4: 00000000001626f0
[  743.227454] BUG: sleeping function called from invalid context at include/linux/percpu-rwsem.h:49
[  743.237313] in_atomic(): 0, irqs_disabled(): 1, non_block: 0, pid: 8674, name: kworker/u16:17
[  743.247027] INFO: lockdep is turned off.
[  743.251920] CPU: 0 PID: 8674 Comm: kworker/u16:17 Tainted: G      DA          5.8.3-xeon #2
[  743.261545] Hardware name: MSI MS-7759/Z77MA-G45 (MS-7759), BIOS V1.9 03/01/2013
[  743.270512] Workqueue: btrfs-delalloc btrfs_work_helper
[  743.276929] Call Trace:
[  743.280821]  dump_stack+0x57/0x70
[  743.285025]  ___might_sleep.cold+0x95/0xa2
[  743.290295]  exit_signals+0x2b/0x220
[  743.295097]  do_exit+0xcb/0xb20
[  743.299410]  ? process_one_work+0x3e0/0x3e0
[  743.304767]  ? kthread+0x110/0x150
[  743.309377]  rewind_stack_do_exit+0x17/0x20
[  743.314747] RIP: 0000:0x0
[  743.318519] Code: Bad RIP value.
[  743.322885] RSP: 0000:0000000000000000 EFLAGS: 00000000 ORIG_RAX: 0000000000000000
[  743.331601] RAX: 0000000000000000 RBX: 0000000000000000 RCX: 0000000000000000
[  743.339877] RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000000000
[  743.348192] RBP: 0000000000000000 R08: 0000000000000000 R09: 0000000000000000
[  743.356529] R10: 0000000000000000 R11: 0000000000000000 R12: 0000000000000000
[  743.364804] R13: 0000000000000000 R14: 0000000000000000 R15: 0000000000000000
Comment 10 Tomas Thiemel 2020-11-14 10:48:06 UTC
No error on 5.8.2 yet, I will do further check/test...

--- /usr/src/linux-5.8.2/fs/btrfs/./tree-log.c  2020-08-19 08:27:10.000000000 +0200
+++ /usr/src/linux-5.8.3/fs/btrfs/./tree-log.c  2020-08-21 13:15:22.000000000 +0200
@@ -3116,29 +3116,17 @@
        btrfs_init_log_ctx(&root_log_ctx, NULL);

        mutex_lock(&log_root_tree->log_mutex);
-       atomic_inc(&log_root_tree->log_batch);
-       atomic_inc(&log_root_tree->log_writers);

        index2 = log_root_tree->log_transid % 2;
        list_add_tail(&root_log_ctx.list, &log_root_tree->log_ctxs[index2]);
        root_log_ctx.log_transid = log_root_tree->log_transid;

-       mutex_unlock(&log_root_tree->log_mutex);
-
-       mutex_lock(&log_root_tree->log_mutex);
-
        /*
         * Now we are safe to update the log_root_tree because we're under the
         * log_mutex, and we're a current writer so we're holding the commit
         * open until we drop the log_mutex.
         */
        ret = update_log_root(trans, log, &new_root_item);
-
-       if (atomic_dec_and_test(&log_root_tree->log_writers)) {
-               /* atomic_dec_and_test implies a barrier */
-               cond_wake_up_nomb(&log_root_tree->log_writer_wait);
-       }
-
        if (ret) {
                if (!list_empty(&root_log_ctx.list))
                        list_del_init(&root_log_ctx.list);
@@ -3184,8 +3172,6 @@
                                root_log_ctx.log_transid - 1);
        }

-       wait_for_writer(log_root_tree);
-
        /*
         * now that we've moved on to the tree of log tree roots,
         * check the full commit flag again
@@ -4041,11 +4027,8 @@
                                                fs_info->csum_root,
                                                ds + cs, ds + cs + cl - 1,
                                                &ordered_sums, 0);
-                               if (ret) {
-                                       btrfs_release_path(dst_path);
-                                       kfree(ins_data);
-                                       return ret;
-                               }
+                               if (ret)
+                                       break;
                        }
                }
        }






--- /usr/src/linux-5.8.2/fs/btrfs/./volumes.c   2020-08-19 08:27:10.000000000 +0200
+++ /usr/src/linux-5.8.3/fs/btrfs/./volumes.c   2020-08-21 13:15:22.000000000 +0200
@@ -245,7 +245,9 @@
  *
  * global::fs_devs - add, remove, updates to the global list
  *
- * does not protect: manipulation of the fs_devices::devices list!
+ * does not protect: manipulation of the fs_devices::devices list in general
+ * but in mount context it could be used to exclude list modifications by eg.
+ * scan ioctl
  *
  * btrfs_device::name - renames (write side), read is RCU
  *
@@ -258,6 +260,9 @@
  * may be used to exclude some operations from running concurrently without any
  * modifications to the list (see write_all_supers)
  *
+ * Is not required at mount and close times, because our device list is
+ * protected by the uuid_mutex at that point.
+ *
  * balance_mutex
  * -------------
  * protects balance structures (status, state) and context accessed from
@@ -602,6 +607,11 @@
        return ret;
 }

+/*
+ * This is only used on mount, and we are protected from competing things
+ * messing with our fs_devices by the uuid_mutex, thus we do not need the
+ * fs_devices->device_list_mutex here.
+ */
 static int btrfs_open_one_device(struct btrfs_fs_devices *fs_devices,
                        struct btrfs_device *device, fmode_t flags,
                        void *holder)
@@ -1229,8 +1239,14 @@
        int ret;

        lockdep_assert_held(&uuid_mutex);
+       /*
+        * The device_list_mutex cannot be taken here in case opening the
+        * underlying device takes further locks like bd_mutex.
+        *
+        * We also don't need the lock here as this is called during mount and
+        * exclusion is provided by uuid_mutex
+        */

-       mutex_lock(&fs_devices->device_list_mutex);
        if (fs_devices->opened) {
                fs_devices->opened++;
                ret = 0;
@@ -1238,7 +1254,6 @@
                list_sort(NULL, &fs_devices->devices, devid_cmp);
                ret = open_fs_devices(fs_devices, flags, holder);
        }
-       mutex_unlock(&fs_devices->device_list_mutex);

        return ret;
 }
Comment 11 Tomas Thiemel 2020-11-14 21:48:35 UTC
5.8.3 - BUG

Nov 14 12:47:28 ftp1 kernel: BUG: kernel NULL pointer dereference, address: 0000000000000018
Nov 14 12:47:28 ftp1 kernel: #PF: supervisor read access in kernel mode
Nov 14 12:47:28 ftp1 kernel: #PF: error_code(0x0000) - not-present page
Nov 14 12:47:28 ftp1 kernel: PGD 0 P4D 0
Nov 14 12:47:28 ftp1 kernel: Oops: 0000 [#1] SMP
Nov 14 12:47:28 ftp1 kernel: CPU: 6 PID: 13146 Comm: kworker/u16:13 Tainted: G       A          5.8.3-xeon-debug #3
Nov 14 12:47:28 ftp1 kernel: Hardware name: MSI MS-7759/Z77MA-G45 (MS-7759), BIOS V1.9 03/01/2013
Nov 14 12:47:28 ftp1 kernel: Workqueue: btrfs-delalloc btrfs_work_helper
Nov 14 12:47:28 ftp1 kernel: RIP: 0010:compress_file_range+0x9bf/0x1030
Nov 14 12:47:28 ftp1 kernel: Code: 31 e4 31 c0 48 83 7c 24 68 00 75 10 eb 7c 41 83 c4 01 49 63 c4 48 3b 44 24 68 73 6e 49 8b 2c c7 40 f6 c5 0f 0f 85 4f 05 00 00 <48> 83 7d 18 00 75 6e 40 f6 c5 0f 0f 85 16 05 00 00 48 8b 45 08 48
Nov 14 12:47:28 ftp1 kernel: RSP: 0018:ffffc90000627ca8 EFLAGS: 00010246
Nov 14 12:47:28 ftp1 kernel: RAX: 0000000000000000 RBX: 0000000000001000 RCX: 00000000002003de
Nov 14 12:47:28 ftp1 kernel: RDX: 0000000000000000 RSI: 0000000000000000 RDI: ffffffff8371c444
Nov 14 12:47:28 ftp1 kernel: RBP: 0000000000000000 R08: 0000000000000000 R09: 0000000000000000
Nov 14 12:47:28 ftp1 kernel: R10: 0000000000000000 R11: 0000000000000000 R12: 0000000000000000
Nov 14 12:47:28 ftp1 kernel: R13: ffff8882a1441508 R14: 0000000000000000 R15: ffff8883f4b4b6e0
Nov 14 12:47:28 ftp1 kernel: FS:  0000000000000000(0000) GS:ffff8887fec00000(0000) knlGS:0000000000000000
Nov 14 12:47:28 ftp1 kernel: CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
Nov 14 12:47:28 ftp1 kernel: CR2: 0000000000000018 CR3: 000000000b811001 CR4: 00000000001626e0
Nov 14 12:47:28 ftp1 kernel: Call Trace:
Nov 14 12:47:28 ftp1 kernel:  ? submit_compressed_extents+0xc90/0xc90
Nov 14 12:47:28 ftp1 kernel:  async_cow_start+0x16/0x60
Nov 14 12:47:28 ftp1 kernel:  btrfs_work_helper+0x1d7/0xfc0
Nov 14 12:47:28 ftp1 kernel:  ? _raw_spin_unlock_irq+0x2e/0x50
Nov 14 12:47:28 ftp1 kernel:  ? process_one_work+0x3da/0x13b0
Nov 14 12:47:28 ftp1 kernel:  process_one_work+0x45e/0x13b0
Nov 14 12:47:28 ftp1 kernel:  worker_thread+0x346/0x1030
Nov 14 12:47:28 ftp1 kernel:  ? process_one_work+0x13b0/0x13b0
Nov 14 12:47:28 ftp1 kernel:  kthread+0x1c7/0x2b0
Nov 14 12:47:28 ftp1 kernel:  ? __kthread_queue_delayed_work+0x250/0x250
Nov 14 12:47:28 ftp1 kernel:  ? __kthread_queue_delayed_work+0x250/0x250
Nov 14 12:47:28 ftp1 kernel:  ret_from_fork+0x1f/0x30
Nov 14 12:47:28 ftp1 kernel: Modules linked in: xt_state vhost_net vhost vhost_iotlb tap tun xt_CHECKSUM xt_MASQUERADE xt_conntrack ipt_REJECT nf_reject_ipv4 xt_tcpudp ip6table_mangle ip6table_nat iptable_mangle iptable_nat nf_nat nf_conntrack nf_defrag_ipv6 nf_defrag_ipv4 ebtable_filter ebtables ip6table_filter ip6_tables iptable_filter ip_tables x_tables fuse nfsd auth_rpcgss oid_registry lockd grace sunrpc nls_iso8859_1 vfat fat binfmt_misc dummy f71882fg x86_pkg_temp_thermal coretemp at24 regmap_i2c kvm_intel iTCO_wdt iTCO_vendor_support kvm crct10dif_pclmul crc32_pclmul crc32c_intel ghash_clmulni_intel aesni_intel crypto_simd cryptd glue_helper i2c_i801 i2c_smbus xhci_pci ehci_pci i2c_core xhci_hcd ehci_hcd r8169 mei_me usbcore realtek pm80xx mei lpc_ich libphy usb_common mfd_core ie31200_edac fan thermal video evdev backlight
Nov 14 12:47:28 ftp1 kernel: ================================================================================
Nov 14 12:47:28 ftp1 kernel: UBSAN: misaligned-access in kernel/module.c:4542:2
Nov 14 12:47:28 ftp1 kernel: member access within misaligned address 00000000be8fd184 for type 'struct module'
Nov 14 12:47:28 ftp1 kernel: which requires 64 byte alignment
Nov 14 12:47:28 ftp1 kernel: CPU: 6 PID: 13146 Comm: kworker/u16:13 Tainted: G       A          5.8.3-xeon-debug #3
Nov 14 12:47:28 ftp1 kernel: Hardware name: MSI MS-7759/Z77MA-G45 (MS-7759), BIOS V1.9 03/01/2013
Nov 14 12:47:28 ftp1 kernel: Workqueue: btrfs-delalloc btrfs_work_helper
Nov 14 12:47:28 ftp1 kernel: Call Trace:
Nov 14 12:47:28 ftp1 kernel:  dump_stack+0x78/0xa0
Nov 14 12:47:28 ftp1 kernel:  ubsan_epilogue+0x5/0x40
Nov 14 12:47:28 ftp1 kernel:  ubsan_type_mismatch_common.cold+0x47/0xcd
Nov 14 12:47:28 ftp1 kernel:  __ubsan_handle_type_mismatch_v1+0x32/0x40
Nov 14 12:47:28 ftp1 kernel:  print_modules+0x4e/0x119
Nov 14 12:47:28 ftp1 kernel:  __die_body+0x21/0x80
Nov 14 12:47:28 ftp1 kernel:  no_context+0x26e/0x620
Nov 14 12:47:28 ftp1 kernel:  exc_page_fault+0x8c/0x410
Nov 14 12:47:28 ftp1 kernel:  asm_exc_page_fault+0x1e/0x30
Nov 14 12:47:28 ftp1 kernel: RIP: 0010:compress_file_range+0x9bf/0x1030
Nov 14 12:47:28 ftp1 kernel: Code: 31 e4 31 c0 48 83 7c 24 68 00 75 10 eb 7c 41 83 c4 01 49 63 c4 48 3b 44 24 68 73 6e 49 8b 2c c7 40 f6 c5 0f 0f 85 4f 05 00 00 <48> 83 7d 18 00 75 6e 40 f6 c5 0f 0f 85 16 05 00 00 48 8b 45 08 48
Nov 14 12:47:28 ftp1 kernel: RSP: 0018:ffffc90000627ca8 EFLAGS: 00010246
Nov 14 12:47:28 ftp1 kernel: RAX: 0000000000000000 RBX: 0000000000001000 RCX: 00000000002003de
Nov 14 12:47:28 ftp1 kernel: RDX: 0000000000000000 RSI: 0000000000000000 RDI: ffffffff8371c444
Nov 14 12:47:28 ftp1 kernel: RBP: 0000000000000000 R08: 0000000000000000 R09: 0000000000000000
Nov 14 12:47:28 ftp1 kernel: R10: 0000000000000000 R11: 0000000000000000 R12: 0000000000000000
Nov 14 12:47:28 ftp1 kernel: R13: ffff8882a1441508 R14: 0000000000000000 R15: ffff8883f4b4b6e0
Nov 14 12:47:28 ftp1 kernel:  ? compress_file_range+0x98b/0x1030
Nov 14 12:47:28 ftp1 kernel:  ? submit_compressed_extents+0xc90/0xc90
Nov 14 12:47:28 ftp1 kernel:  async_cow_start+0x16/0x60
Nov 14 12:47:28 ftp1 kernel:  btrfs_work_helper+0x1d7/0xfc0
Nov 14 12:47:28 ftp1 kernel:  ? _raw_spin_unlock_irq+0x2e/0x50
Nov 14 12:47:28 ftp1 kernel:  ? process_one_work+0x3da/0x13b0
Nov 14 12:47:28 ftp1 kernel:  process_one_work+0x45e/0x13b0
Nov 14 12:47:28 ftp1 kernel:  worker_thread+0x346/0x1030
Nov 14 12:47:28 ftp1 kernel:  ? process_one_work+0x13b0/0x13b0
Nov 14 12:47:28 ftp1 kernel:  kthread+0x1c7/0x2b0
Nov 14 12:47:28 ftp1 kernel:  ? __kthread_queue_delayed_work+0x250/0x250
Nov 14 12:47:28 ftp1 kernel:  ? __kthread_queue_delayed_work+0x250/0x250
Nov 14 12:47:28 ftp1 kernel:  ret_from_fork+0x1f/0x30
Nov 14 12:47:28 ftp1 kernel: ================================================================================
Nov 14 12:47:28 ftp1 kernel: CR2: 0000000000000018
Nov 14 12:47:28 ftp1 kernel: ---[ end trace 2c7d82573dc1a05c ]---
Nov 14 12:47:28 ftp1 kernel: RIP: 0010:compress_file_range+0x9bf/0x1030
Nov 14 12:47:28 ftp1 kernel: Code: 31 e4 31 c0 48 83 7c 24 68 00 75 10 eb 7c 41 83 c4 01 49 63 c4 48 3b 44 24 68 73 6e 49 8b 2c c7 40 f6 c5 0f 0f 85 4f 05 00 00 <48> 83 7d 18 00 75 6e 40 f6 c5 0f 0f 85 16 05 00 00 48 8b 45 08 48
Nov 14 12:47:28 ftp1 kernel: RSP: 0018:ffffc90000627ca8 EFLAGS: 00010246
Nov 14 12:47:28 ftp1 kernel: RAX: 0000000000000000 RBX: 0000000000001000 RCX: 00000000002003de
Nov 14 12:47:28 ftp1 kernel: RDX: 0000000000000000 RSI: 0000000000000000 RDI: ffffffff8371c444
Nov 14 12:47:28 ftp1 kernel: RBP: 0000000000000000 R08: 0000000000000000 R09: 0000000000000000
Nov 14 12:47:28 ftp1 kernel: R10: 0000000000000000 R11: 0000000000000000 R12: 0000000000000000
Nov 14 12:47:28 ftp1 kernel: R13: ffff8882a1441508 R14: 0000000000000000 R15: ffff8883f4b4b6e0
Nov 14 12:47:28 ftp1 kernel: FS:  0000000000000000(0000) GS:ffff8887fec00000(0000) knlGS:0000000000000000
Nov 14 12:47:28 ftp1 kernel: CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
Nov 14 12:47:28 ftp1 kernel: CR2: 0000000000000018 CR3: 000000000b811001 CR4: 00000000001626e0
Nov 14 12:47:28 ftp1 kernel: BUG: sleeping function called from invalid context at include/linux/percpu-rwsem.h:49
Nov 14 12:47:28 ftp1 kernel: in_atomic(): 0, irqs_disabled(): 1, non_block: 0, pid: 13146, name: kworker/u16:13
Nov 14 12:47:28 ftp1 kernel: INFO: lockdep is turned off.
Nov 14 12:47:28 ftp1 kernel: irq event stamp: 0
Nov 14 12:47:28 ftp1 kernel: hardirqs last  enabled at (0): [<0000000000000000>] 0x0
Nov 14 12:47:28 ftp1 kernel: hardirqs last disabled at (0): [<ffffffff81102927>] copy_process+0x9f7/0x4f40
Nov 14 12:47:28 ftp1 kernel: softirqs last  enabled at (0): [<ffffffff81102969>] copy_process+0xa39/0x4f40
Nov 14 12:47:28 ftp1 kernel: softirqs last disabled at (0): [<0000000000000000>] 0x0
Nov 14 12:47:28 ftp1 kernel: CPU: 6 PID: 13146 Comm: kworker/u16:13 Tainted: G      DA          5.8.3-xeon-debug #3
Nov 14 12:47:28 ftp1 kernel: Hardware name: MSI MS-7759/Z77MA-G45 (MS-7759), BIOS V1.9 03/01/2013
Nov 14 12:47:28 ftp1 kernel: Workqueue: btrfs-delalloc btrfs_work_helper
Nov 14 12:47:28 ftp1 kernel: Call Trace:
Nov 14 12:47:28 ftp1 kernel:  dump_stack+0x78/0xa0
Nov 14 12:47:28 ftp1 kernel:  ___might_sleep.cold+0x12c/0x190
Nov 14 12:47:28 ftp1 kernel:  exit_signals+0x33/0x690
Nov 14 12:47:28 ftp1 kernel:  do_exit+0x122/0x2dc0
Nov 14 12:47:28 ftp1 kernel:  ? process_one_work+0x13b0/0x13b0
Nov 14 12:47:28 ftp1 kernel:  ? kthread+0x1c7/0x2b0
Nov 14 12:47:28 ftp1 kernel:  rewind_stack_do_exit+0x17/0x20
Nov 14 12:47:28 ftp1 kernel: RIP: 0000:0x0
Nov 14 12:47:28 ftp1 kernel: Code: Bad RIP value.
Nov 14 12:47:28 ftp1 kernel: RSP: 0000:0000000000000000 EFLAGS: 00000000 ORIG_RAX: 0000000000000000
Nov 14 12:47:28 ftp1 kernel: RAX: 0000000000000000 RBX: 0000000000000000 RCX: 0000000000000000
Nov 14 12:47:28 ftp1 kernel: RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000000000
Nov 14 12:47:28 ftp1 kernel: RBP: 0000000000000000 R08: 0000000000000000 R09: 0000000000000000
Nov 14 12:47:28 ftp1 kernel: R10: 0000000000000000 R11: 0000000000000000 R12: 0000000000000000
Nov 14 12:47:28 ftp1 kernel: R13: 0000000000000000 R14: 0000000000000000 R15: 0000000000000000










5.8.2 - WARNING

Nov 14 12:13:20 ftp1 kernel: ------------[ cut here ]------------
Nov 14 12:13:20 ftp1 kernel: BTRFS: block rsv returned -28
Nov 14 12:13:20 ftp1 kernel: WARNING: CPU: 0 PID: 27263 at fs/btrfs/block-rsv.c:513 btrfs_use_block_rsv+0x159/0x170
Nov 14 12:13:20 ftp1 kernel: Modules linked in: xt_state vhost_net vhost vhost_iotlb tap tun xt_CHECKSUM xt_MASQUERADE xt_conntrack ipt_REJECT nf_reject_ipv4 xt_tcpudp ip6table_mangle ip6table_nat iptable_mangle iptable_nat nf_nat nf_conntrack nf_defrag_ip
v6 nf_defrag_ipv4 ebtable_filter ebtables ip6table_filter ip6_tables iptable_filter ip_tables x_tables fuse nfsd auth_rpcgss oid_registry lockd grace sunrpc nls_iso8859_1 vfat fat binfmt_misc dummy x86_pkg_temp_thermal kvm_intel f71882fg kvm at24 coretemp
regmap_i2c iTCO_wdt iTCO_vendor_support crct10dif_pclmul crc32_pclmul crc32c_intel ghash_clmulni_intel aesni_intel crypto_simd cryptd glue_helper xhci_pci ehci_pci xhci_hcd ehci_hcd i2c_i801 r8169 thermal pm80xx i2c_smbus mei_me fan video realtek i2c_core
evdev usbcore mei libphy backlight lpc_ich usb_common mfd_core ie31200_edac
Nov 14 12:13:20 ftp1 kernel: CPU: 0 PID: 27263 Comm: kworker/u16:14 Tainted: G       AW         5.8.2-xeon #2
Nov 14 12:13:20 ftp1 kernel: Hardware name: MSI MS-7759/Z77MA-G45 (MS-7759), BIOS V1.9 03/01/2013
Nov 14 12:13:20 ftp1 kernel: Workqueue: btrfs-endio-write btrfs_work_helper
Nov 14 12:13:20 ftp1 kernel: RIP: 0010:btrfs_use_block_rsv+0x159/0x170
Nov 14 12:13:20 ftp1 kernel: Code: 48 c7 c6 f0 eb e7 81 48 c7 c7 40 3d 27 82 e8 8e 2b 0e 00 85 c0 0f 84 6f ff ff ff 44 89 f6 48 c7 c7 30 2a 08 82 e8 35 43 c3 ff <0f> 0b e9 59 ff ff ff 4d 63 e6 e9 71 ff ff ff cc cc cc cc cc cc cc
Nov 14 12:13:20 ftp1 kernel: RSP: 0018:ffffc900081879e8 EFLAGS: 00010282
Nov 14 12:13:20 ftp1 kernel: RAX: 0000000000000000 RBX: ffff8887f5c70000 RCX: 0000000000000027
Nov 14 12:13:20 ftp1 kernel: RDX: 0000000000000027 RSI: ffffffff810bb6e5 RDI: ffff8887fe5d7e08
Nov 14 12:13:20 ftp1 kernel: RBP: 0000000000004000 R08: ffff8887fe5d7e00 R09: 0000000000000000
Nov 14 12:13:20 ftp1 kernel: R10: 0000000000000001 R11: 0000000000000000 R12: ffff88844a94cd90
Nov 14 12:13:20 ftp1 kernel: R13: ffff8887faaae000 R14: 00000000ffffffe4 R15: ffff8887f5c70000
Nov 14 12:13:20 ftp1 kernel: FS:  0000000000000000(0000) GS:ffff8887fe400000(0000) knlGS:0000000000000000
Nov 14 12:13:20 ftp1 kernel: CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
Nov 14 12:13:20 ftp1 kernel: CR2: 00007ffe08cd6508 CR3: 0000000006211002 CR4: 00000000001626f0
Nov 14 12:13:20 ftp1 kernel: Call Trace:
Nov 14 12:13:20 ftp1 kernel:  btrfs_alloc_tree_block+0x75/0x4c0
Nov 14 12:13:20 ftp1 kernel:  ? _raw_spin_unlock+0x1a/0x30
Nov 14 12:13:20 ftp1 kernel:  alloc_tree_block_no_bg_flush+0x45/0x50
Nov 14 12:13:20 ftp1 kernel:  __btrfs_cow_block+0x118/0x4e0
Nov 14 12:13:20 ftp1 kernel:  btrfs_cow_block+0xf0/0x140
Nov 14 12:13:20 ftp1 kernel:  btrfs_search_slot+0x540/0x9e0
Nov 14 12:13:20 ftp1 kernel:  btrfs_lookup_csum+0x70/0x170
Nov 14 12:13:20 ftp1 kernel:  btrfs_csum_file_blocks+0x18b/0x760
Nov 14 12:13:20 ftp1 kernel:  add_pending_csums+0x4b/0x70
Nov 14 12:13:20 ftp1 kernel:  btrfs_finish_ordered_io+0x3f1/0x6f0
Nov 14 12:13:20 ftp1 kernel:  process_one_work+0x201/0x3e0
Nov 14 12:13:20 ftp1 kernel:  ? process_one_work+0x1a4/0x3e0
Nov 14 12:13:20 ftp1 kernel:  worker_thread+0x4b/0x3a0
Nov 14 12:13:20 ftp1 kernel:  ? process_one_work+0x3e0/0x3e0
Nov 14 12:13:20 ftp1 kernel:  kthread+0x110/0x150
Nov 14 12:13:20 ftp1 kernel:  ? kthread_park+0x80/0x80
Nov 14 12:13:20 ftp1 kernel:  ret_from_fork+0x1f/0x30
Nov 14 12:13:20 ftp1 kernel: ---[ end trace 51ed8aaae251aec2 ]---
Comment 12 Tomas Thiemel 2020-12-18 22:46:53 UTC
*** Bug 209295 has been marked as a duplicate of this bug. ***
Comment 13 Tomas Thiemel 2020-12-21 21:00:48 UTC
I have kernel 5.9.15 right now and so far so good - no error/bug during last 2 days, yet. :)
Comment 14 Tomas Thiemel 2020-12-22 01:49:59 UTC
Kernel 5.9.15 - same problem


[Dec22 02:44] BUG: kernel NULL pointer dereference, address: 0000000000000018
[  +0.007502] #PF: supervisor read access in kernel mode
[  +0.005660] #PF: error_code(0x0000) - not-present page
[  +0.005707] PGD 0 P4D 0
[  +0.003281] Oops: 0000 [#2] SMP
[  +0.003685] CPU: 5 PID: 18397 Comm: kworker/u16:0 Tainted: G      DAW         5.9.15-xeon #2
[  +0.009051] Hardware name: MSI MS-7759/Z77MA-G45 (MS-7759), BIOS V1.9 03/01/2013
[  +0.007989] Workqueue: btrfs-delalloc btrfs_work_helper
[  +0.005763] RIP: 0010:compress_file_range+0x612/0x7a0
[  +0.005837] Code: c5 01 4d 85 ff 0f 84 08 fd ff ff 31 db 31 c0 48 83 7c 24 48 00 75 0f eb 3e 83 c3 01 48 63 c3 48 3b 44 24 48 73 31 49 8b 3c c7 <48> 83 7f 18 00 75 6c 48 8b 47 08 48 8d 50 ff a8 01 48 0f 45 fa f0
[  +0.020207] RSP: 0018:ffffc900004c7d38 EFLAGS: 00010206
[  +0.005859] RAX: 0000000000000000 RBX: 0000000000000000 RCX: 0000000000000000
[  +0.007785] RDX: ffffffff82e17c00 RSI: ffffffff81401e94 RDI: 0000000000000000
[  +0.007778] RBP: ffff88815a79aa20 R08: ffff8887a228abe0 R09: ffff8887a228abe0
[  +0.007880] R10: 0000000000000000 R11: ffffffffffffffff R12: 0000000000001000
[  +0.007772] R13: 0000000000000001 R14: 0000000000003000 R15: ffff888104430860
[  +0.007775] FS:  0000000000000000(0000) GS:ffff8887fee00000(0000) knlGS:0000000000000000
[  +0.008797] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[  +0.006403] CR2: 0000000000000018 CR3: 0000000006211004 CR4: 00000000001726e0
[  +0.007823] Call Trace:
[  +0.003127]  async_cow_start+0xd/0x40
[  +0.004343]  btrfs_work_helper+0xdd/0x200
[  +0.004668]  process_one_work+0x201/0x3e0
[  +0.004671]  ? process_one_work+0x1a4/0x3e0
[  +0.004847]  worker_thread+0x4b/0x3a0
[  +0.004328]  ? process_one_work+0x3e0/0x3e0
[  +0.004847]  kthread+0x110/0x160
[  +0.003894]  ? kthread_park+0x80/0x80
[  +0.004319]  ret_from_fork+0x1f/0x30
[  +0.004223] Modules linked in: nfnetlink xt_nat xt_state tun xt_CHECKSUM xt_MASQUERADE xt_conntrack ipt_REJECT nf_reject_ipv4 xt_tcpudp ip6table_mangle ip6table_nat iptable_mangle iptable_nat nf_nat nf_conntrack nf_defrag_ipv6 nf_defrag_ipv4 ebtable_filter ebtables ip6table_filter ip6_tables iptable_filter ip_tables x_tables fuse nfsd auth_rpcgss oid_registry lockd grace sunrpc f2fs nls_iso8859_1 vfat fat dm_raid raid456 async_raid6_recov async_memcpy async_pq async_xor async_tx binfmt_misc pm80xx dummy x86_pkg_temp_thermal at24 kvm_intel regmap_i2c f71882fg iTCO_wdt iTCO_vendor_support kvm coretemp crct10dif_pclmul crc32_pclmul crc32c_intel ghash_clmulni_intel aesni_intel crypto_simd xhci_pci ehci_pci cryptd xhci_hcd ehci_hcd glue_helper i2c_i801 r8169 i2c_smbus video realtek i2c_core usbcore mei_me fan mdio_devres backlight thermal libphy evdev mei lpc_ich mfd_core usb_common
[  +0.083012] CR2: 0000000000000018
[  +0.004236] ---[ end trace 610f89c67d5762c5 ]---
[  +0.005437] RIP: 0010:extent_io_tree_panic.isra.0+0x0/0x27
[  +0.006317] Code: f0 20 06 82 48 8b b8 f0 01 00 00 e8 3b ab ff ff 48 8b 53 20 4c 8b 44 24 08 e9 e8 d0 aa ff 48 8b 3d c6 6e 4f 01 e9 e1 3d 88 ff <48> 8b 47 28 89 f1 ba a9 02 00 00 49 c7 c0 d8 21 06 82 48 c7 c6 90
[  +0.020934] RSP: 0018:ffffc900029a79a0 EFLAGS: 00010282
[  +0.006231] RAX: 00000000ffffffef RBX: 0000000001bfffff RCX: 0000000000000000
[  +0.008162] RDX: ffffc900029a79ec RSI: 00000000ffffffef RDI: 0000000000000000
[  +0.008171] RBP: ffff8887a12fd620 R08: ffff8887fefd7e10 R09: 0000000000000000
[  +0.008140] R10: 0000000000000000 R11: 0000000000000001 R12: 0000000002400000
[  +0.008157] R13: ffff888177450e10 R14: 0000000000000000 R15: ffff888177450d80
[  +0.008160] FS:  0000000000000000(0000) GS:ffff8887fee00000(0000) knlGS:0000000000000000
[  +0.009101] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[  +0.006782] CR2: 0000000000000018 CR3: 0000000006211004 CR4: 00000000001726e0
[  +0.008138] BUG: sleeping function called from invalid context at include/linux/percpu-rwsem.h:49
[  +0.009835] in_atomic(): 0, irqs_disabled(): 1, non_block: 0, pid: 18397, name: kworker/u16:0
[  +0.009568] INFO: lockdep is turned off.
[  +0.004969] CPU: 5 PID: 18397 Comm: kworker/u16:0 Tainted: G      DAW         5.9.15-xeon #2
[  +0.009479] Hardware name: MSI MS-7759/Z77MA-G45 (MS-7759), BIOS V1.9 03/01/2013
[  +0.008448] Workqueue: btrfs-delalloc btrfs_work_helper
[  +0.006448] Call Trace:
[  +0.003440]  dump_stack+0x57/0x6a
[  +0.004298]  ___might_sleep.cold+0x95/0xa2
[  +0.005080]  exit_signals+0x2b/0x220
[  +0.004625]  do_exit+0xcb/0xb20
[  +0.004113]  ? process_one_work+0x3e0/0x3e0
[  +0.005214]  ? kthread+0x110/0x160
[  +0.004225]  rewind_stack_do_exit+0x17/0x20
[  +0.005127] RIP: 0000:0x0
[  +0.003581] Code: Unable to access opcode bytes at RIP 0xffffffffffffffd6.
[  +0.007678] RSP: 0000:0000000000000000 EFLAGS: 00000000 ORIG_RAX: 0000000000000000
[  +0.008374] RAX: 0000000000000000 RBX: 0000000000000000 RCX: 0000000000000000
[  +0.008086] RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000000000
[  +0.008082] RBP: 0000000000000000 R08: 0000000000000000 R09: 0000000000000000
[  +0.008089] R10: 0000000000000000 R11: 0000000000000000 R12: 0000000000000000
[  +0.008058] R13: 0000000000000000 R14: 0000000000000000 R15: 0000000000000000
Comment 15 martin 2021-01-03 15:42:12 UTC
While I'm also using btrfs, I get the same issue with ext4 on zram:

```
Jan  3 06:54:47 kernel: [21256.490685] BUG: kernel NULL pointer dereference, address: 0000000000000000
Jan  3 06:54:47 kernel: [21256.490719] #PF: supervisor read access in kernel mode
Jan  3 06:54:47 kernel: [21256.490735] #PF: error_code(0x0000) - not-present page
Jan  3 06:54:47 kernel: [21256.490751] PGD 0 P4D 0
Jan  3 06:54:47 kernel: [21256.490761] Oops: 0000 [#1] SMP NOPTI
Jan  3 06:54:47 kernel: [21256.490775] CPU: 0 PID: 36503 Comm: kworker/u128:36 Not tainted 5.9.16 #3
Jan  3 06:54:47 kernel: [21256.491630] Hardware name: Microsoft Corporation Virtual Machine/Virtual Machine, BIOS 090006  04/28/2016
Jan  3 06:54:47 kernel: [21256.492062] Workqueue: writeback wb_workfn (flush-252:1)
Jan  3 06:54:47 kernel: [21256.492062] RIP: 0010:obj_malloc.isra.0+0x2a/0xe0
Jan  3 06:54:47 kernel: [21256.492062] Code: 0f 1f 44 00 00 44 8b 5a 08 48 8b 42 10 48 83 c9 01 41 0f af fb 41 89 fa 81 e7 ff 0f 00 00 41 c1 fa 0c 45 85 d2 7e 20 45 31 c0 <4c> 8b 08 41 f7 c1 00 04 00 00 0f 85 8d 00 00 00 48 8b 40 20 41 83
Jan  3 06:54:47 kernel: [21256.492062] RSP: 0018:ffffc90008b337e8 EFLAGS: 00010202
Jan  3 06:54:47 kernel: [21256.500085] RAX: 0000000000000000 RBX: ffff88814e06d000 RCX: ffff88810d4e7049
Jan  3 06:54:47 kernel: [21256.501064] RDX: ffff888123a08c30 RSI: ffff88814c286f80 RDI: 0000000000000cd0
Jan  3 06:54:47 kernel: [21256.501064] RBP: ffff88810d4e7048 R08: 0000000000000001 R09: 02ffff8000002000
Jan  3 06:54:47 kernel: [21256.501064] R10: 000000000005fed1 R11: 000000007debe5ff R12: 000000000000280a
Jan  3 06:54:47 kernel: [21256.501064] R13: ffff88814c286f00 R14: 0000000000002800 R15: ffff888123a08c30
Jan  3 06:54:47 kernel: [21256.501064] FS:  0000000000000000(0000) GS:ffff8881f3000000(0000) knlGS:0000000000000000
Jan  3 06:54:47 kernel: [21256.501064] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
Jan  3 06:54:47 kernel: [21256.501064] CR2: 0000000000000000 CR3: 00000001511a2000 CR4: 00000000003506f0
Jan  3 06:54:47 kernel: [21256.501064] Call Trace:
Jan  3 06:54:47 kernel: [21256.501064]  zs_malloc+0x1d8/0x450
Jan  3 06:54:47 kernel: [21256.501064]  zram_bvec_rw.isra.0+0x366/0x5f0 [zram]
Jan  3 06:54:47 kernel: [21256.501064]  zram_submit_bio+0x19a/0x36f [zram]
Jan  3 06:54:47 kernel: [21256.501064]  submit_bio_noacct+0x11b/0x4f0
Jan  3 06:54:47 kernel: [21256.501064]  submit_bio+0x4b/0x1a0
Jan  3 06:54:47 kernel: [21256.501064]  ext4_io_submit+0x49/0x60
Jan  3 06:54:47 kernel: [21256.501064]  ext4_writepages+0x5aa/0xd60
Jan  3 06:54:47 kernel: [21256.501064]  ? _cond_resched+0x15/0x30
Jan  3 06:54:47 kernel: [21256.501064]  ? __getblk_gfp+0x2c/0x240
Jan  3 06:54:47 kernel: [21256.501064]  ? do_writepages+0x43/0xd0
Jan  3 06:54:47 kernel: [21256.501064]  do_writepages+0x43/0xd0
Jan  3 06:54:47 kernel: [21256.501064]  ? ext4_write_inode+0x12f/0x160
Jan  3 06:54:47 kernel: [21256.501064]  __writeback_single_inode+0x3d/0x320
Jan  3 06:54:47 kernel: [21256.501064]  ? inode_io_list_move_locked+0x5a/0xc0
Jan  3 06:54:47 kernel: [21256.501064]  writeback_sb_inodes+0x204/0x460
Jan  3 06:54:47 kernel: [21256.501064]  __writeback_inodes_wb+0x4c/0xe0
Jan  3 06:54:47 kernel: [21256.501064]  wb_writeback+0x20c/0x2f0
Jan  3 06:54:47 kernel: [21256.501064]  ? get_nr_inodes+0x32/0x50
Jan  3 06:54:47 kernel: [21256.501064]  wb_workfn+0x1a4/0x4d0
Jan  3 06:54:47 kernel: [21256.501064]  ? check_preempt_curr+0x51/0x60
Jan  3 06:54:47 kernel: [21256.501064]  ? ttwu_do_wakeup+0x19/0x150
Jan  3 06:54:47 kernel: [21256.501064]  process_one_work+0x1b4/0x370
Jan  3 06:54:47 kernel: [21256.501064]  worker_thread+0x50/0x3b0
Jan  3 06:54:47 kernel: [21256.501064]  ? process_one_work+0x370/0x370
Jan  3 06:54:47 kernel: [21256.501064]  kthread+0xfe/0x140
Jan  3 06:54:47 kernel: [21256.501064]  ? kthread_park+0x90/0x90
Jan  3 06:54:47 kernel: [21256.501064]  ret_from_fork+0x22/0x30
Jan  3 06:54:47 kernel: [21256.501064] Modules linked in: bcache crc64 zram dm_cache_smq dm_cache dm_persistent_data dm_bio_prison dm_bufio loop dm_crypt xfs dm_mod st sr_mod cdrom nf_tables nfnetlink iptable_filter bridge stp llc sg hv_balloon hyperv_keyboard hv_utils snd_pcm snd_timer snd hyperv_fb soundcore button evdev pcspkr serio_raw joydev ib_iser rdma_cm iw_cm ib_cm ib_core iscsi_tcp libiscsi_tcp libiscsi scsi_transport_iscsi drm fuse configfs ip_tables x_tables autofs4 raid10 raid456 async_raid6_recov async_memcpy async_pq async_xor async_tx raid1 raid0 multipath linear md_mod ata_generic sd_mod t10_pi crct10dif_pclmul crc32_pclmul crc32c_intel hid_generic ghash_clmulni_intel hv_netvsc hid_hyperv hv_storvsc hid scsi_transport_fc aesni_intel crypto_simd ata_piix cryptd glue_helper libata psmouse scsi_mod i2c_piix4 hv_vmbus
Jan  3 06:54:47 kernel: [21256.501064] CR2: 0000000000000000
Jan  3 06:54:47 kernel: [21256.501064] ---[ end trace ead2489a18980e4e ]---
Jan  3 06:54:47 kernel: [21256.501064] RIP: 0010:obj_malloc.isra.0+0x2a/0xe0
Jan  3 06:54:47 kernel: [21256.501064] Code: 0f 1f 44 00 00 44 8b 5a 08 48 8b 42 10 48 83 c9 01 41 0f af fb 41 89 fa 81 e7 ff 0f 00 00 41 c1 fa 0c 45 85 d2 7e 20 45 31 c0 <4c> 8b 08 41 f7 c1 00 04 00 00 0f 85 8d 00 00 00 48 8b 40 20 41 83
Jan  3 06:54:47 kernel: [21256.501064] RSP: 0018:ffffc90008b337e8 EFLAGS: 00010202
Jan  3 06:54:47 kernel: [21256.501064] RAX: 0000000000000000 RBX: ffff88814e06d000 RCX: ffff88810d4e7049
Jan  3 06:54:47 kernel: [21256.501064] RDX: ffff888123a08c30 RSI: ffff88814c286f80 RDI: 0000000000000cd0
Jan  3 06:54:47 kernel: [21256.501064] RBP: ffff88810d4e7048 R08: 0000000000000001 R09: 02ffff8000002000
Jan  3 06:54:47 kernel: [21256.501064] R10: 000000000005fed1 R11: 000000007debe5ff R12: 000000000000280a
Jan  3 06:54:47 kernel: [21256.501064] R13: ffff88814c286f00 R14: 0000000000002800 R15: ffff888123a08c30
Jan  3 06:54:47 kernel: [21256.501064] FS:  0000000000000000(0000) GS:ffff8881f3000000(0000) knlGS:0000000000000000
Jan  3 06:54:47 kernel: [21256.501064] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
Jan  3 06:54:47 kernel: [21256.501064] CR2: 0000000000000000 CR3: 00000001511a2000 CR4: 00000000003506f0
```

Location:

```
list *('obj_malloc.isra.0'+0x2a)
0xffffffff8124cb7a is in obj_malloc (./arch/x86/include/asm/bitops.h:206).
```