On 2019/3/25 9:16 上午, Ed Spiridonov wrote: > I used bcache+btrfs for a several month. Bcache in writeback mode. > Yesterday after reboot btrfs wasn't mounted. > > I found such messages in dmesg: > [ 34.352638] BUG: unable to handle kernel NULL pointer dereference > at 0000000000000340 > [ 34.352726] PGD 0 P4D 0 > [ 34.352784] Oops: 0000 [#1] SMP PTI > [ 34.352844] CPU: 4 PID: 33 Comm: kworker/4:0 Not tainted > 4.19.0-2-amd64 #1 Debian 4.19.16-1 > [ 34.352928] Hardware name: To be filled by O.E.M. To be filled by > O.E.M./P8B-C Series, BIOS 0603 x64 09/28/2011 > [ 34.353026] Workqueue: events update_writeback_rate [bcache] > [ 34.353094] RIP: 0010:update_writeback_rate+0x2f/0x2f0 [bcache] > [ 34.353158] Code: 41 57 41 56 41 55 41 54 55 53 48 8b af 00 f4 ff > ff f0 80 8f 20 f4 ff ff 10 f0 83 44 24 fc 00 48 8b 87 20 f4 ff ff a8 > 08 74 4d <48> 8b 85 40 03 00 00 a8 08 75 42 8b 47 e8 48 89 fb 85 c0 74 > 09 80 > [ 34.353281] RSP: 0018:ffffaad5c326be68 EFLAGS: 00010202 > [ 34.353343] RAX: 0000000000000018 RBX: ffff8a013e890c80 RCX: ffff8a0147b215a0 > [ 34.353408] RDX: 0000000000000001 RSI: ffff8a013e890c88 RDI: ffff8a013e890c80 > [ 34.353474] RBP: 0000000000000000 R08: 0000000000000000 R09: 000073746e657665 > [ 34.353540] R10: 8080808080808080 R11: ffff8a0147b20be8 R12: ffff8a0147b25500 > [ 34.353605] R13: 0000000000000000 R14: ffff8a0144280840 R15: ffff8a013e890c88 > [ 34.353671] FS: 0000000000000000(0000) GS:ffff8a0147b00000(0000) > knlGS:0000000000000000 > [ 34.353756] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 > [ 34.353819] CR2: 0000000000000340 CR3: 000000037bc0a003 CR4: 00000000000606e0 > [ 34.353884] Call Trace: > [ 34.353947] process_one_work+0x1a7/0x3a0 > [ 34.354008] worker_thread+0x30/0x390 > [ 34.354068] ? pwq_unbound_release_workfn+0xd0/0xd0 > [ 34.354130] kthread+0x112/0x130 > [ 34.354188] ? kthread_bind+0x30/0x30 > [ 34.354248] ret_from_fork+0x35/0x40 > [ 34.354307] Modules linked in: veth bcache crc64 nfsd auth_rpcgss > nfs_acl nfs lockd grace fscache sunrpc bridge stp llc bonding loop > intel_rapl x86_pkg_temp_thermal intel_powerclamp coretemp kvm_intel > kvm iTCO_wdt iTCO_vendor_support ppdev irqbypass crct10dif_pclmul > crc32_pclmul ghash_clmulni_intel intel_cstate intel_uncore > intel_rapl_perf serio_raw pcspkr evdev joydev lpc_ich sg parport_pc > ie31200_edac parport pcc_cpufreq button xfs btrfs zstd_decompress > zstd_compress xxhash raid10 raid0 multipath linear raid456 > async_raid6_recov async_memcpy async_pq async_xor async_tx xor > raid6_pq libcrc32c crc32c_generic raid1 md_mod sd_mod hid_generic > usbhid hid crc32c_intel ahci libahci libata mpt3sas aesni_intel > ehci_pci ehci_hcd i2c_i801 aes_x86_64 raid_class crypto_simd psmouse > cryptd glue_helper scsi_transport_sas > [ 34.354713] usbcore e1000e scsi_mod usb_common > [ 34.354776] CR2: 0000000000000340 > [ 34.354835] ---[ end trace aee7a08b04d8972c ]--- > [ 34.354903] RIP: 0010:update_writeback_rate+0x2f/0x2f0 [bcache] > [ 34.354967] Code: 41 57 41 56 41 55 41 54 55 53 48 8b af 00 f4 ff > ff f0 80 8f 20 f4 ff ff 10 f0 83 44 24 fc 00 48 8b 87 20 f4 ff ff a8 > 08 74 4d <48> 8b 85 40 03 00 00 a8 08 75 42 8b 47 e8 48 89 fb 85 c0 74 > 09 80 > [ 34.355090] RSP: 0018:ffffaad5c326be68 EFLAGS: 00010202 > [ 34.355152] RAX: 0000000000000018 RBX: ffff8a013e890c80 RCX: ffff8a0147b215a0 > [ 34.355218] RDX: 0000000000000001 RSI: ffff8a013e890c88 RDI: ffff8a013e890c80 > [ 34.355284] RBP: 0000000000000000 R08: 0000000000000000 R09: 000073746e657665 > [ 34.355349] R10: 8080808080808080 R11: ffff8a0147b20be8 R12: ffff8a0147b25500 > [ 34.355415] R13: 0000000000000000 R14: ffff8a0144280840 R15: ffff8a013e890c88 > [ 34.355481] FS: 0000000000000000(0000) GS:ffff8a0147b00000(0000) > knlGS:0000000000000000 > [ 34.355566] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 > [ 34.355629] CR2: 0000000000000340 CR3: 000000037bc0a003 CR4: 00000000000606e0 > [ 76.773732] BTRFS error (device bcache0): parent transid verify > failed on 5500652945408 wanted 2813817 found 2813839 > [ 76.796008] BTRFS error (device bcache0): parent transid verify > failed on 5500652945408 wanted 2813817 found 2813839 > [ 76.796112] BTRFS error (device bcache0): failed to read block groups: -5 > [ 76.847560] BTRFS error (device bcache0): open_ctree failed > > I started 'btrfs balance -m' before reboot, so LOT of metadata writes > was in cache. > I guess that bcache0 now is in inconsistent state. > How can I check it? > Can you post all dmesg lines started with "bcache:" ? Thanks. Coly Li -- Coly Li