Re: kernel BUG at fs/btrfs/delayed-inode.c:1579!

2016-08-24 Thread Sverd Johnsen
pstore to the rescue.

BTRFS error (device dm-1): err add delayed dir index item(index: 3864)
into the deletion tree of the delayed node(root id: 452, inode id:
1299522, errno: -17)

On 24 August 2016 at 23:09, Omar Sandoval  wrote:
> On Wed, Aug 24, 2016 at 09:27:16PM +0200, Sverd Johnsen wrote:
>> https://bugzilla.kernel.org/show_bug.cgi?id=153891
>>
>> [  879.935385] [ cut here ]
>> [  879.935400] kernel BUG at fs/btrfs/delayed-inode.c:1579!
>> [  879.935414] invalid opcode:  [#1] PREEMPT SMP
>> [  879.935425] Modules linked in: veth binfmt_misc nft_reject_inet
>> nf_reject_ipv4 nf_reject_ipv6 nft_reject nf_log_ipv6 nf_log_ipv4
>> nf_log_common nf_conntrack_ipv6 nf_defrag_ipv6 nf_conntrack_ipv4
>> nf_defrag_ipv4 nft_ct nf_conntrack nft_log nft_counter nft_meta
>> nft_hash nft_rbtree nf_tables_inet nf_tables_ipv6 nf_tables_ipv4
>> nf_tables nfnetlink algif_skcipher af_alg af_packet bridge hid_generic
>> usbhid hid ghash_clmulni_intel stp intel_cstate llc intel_uncore
>> psmouse intel_rapl_perf efi_pstore efivarfs snd_hda_codec_hdmi
>> snd_hda_codec_realtek snd_hda_codec_generic x86_pkg_temp_thermal
>> intel_powerclamp atkbd libps2 kvm_intel kvm irqbypass crct10dif_pclmul
>> crc32_pclmul crc32c_intel aesni_intel aes_x86_64 glue_helper lrw
>> gf128mul ablk_helper cryptd efivars snd_hda_intel snd_hda_codec
>> snd_hda_core snd_pcm
>> [  879.935636]  snd_timer i915 shpchp sd_mod xhci_pci xhci_hcd usbcore
>> mei_me mei usb_common intel_gtt fan thermal battery i8042 serio
>> pinctrl_sunrisepoint pinctrl_intel acpi_pad tpm_infineon tpm_tis tpm
>> [  879.935694] CPU: 2 PID: 3125 Comm: CJobMgr::m_Work Tainted: G
>>  W   4.7.2-1-ph #1
>> [  879.935713] Hardware name: Gigabyte Technology Co., Ltd.
>> Z170X-UD3/Z170X-UD3-CF, BIOS F6 03/01/2016
>> [  879.935733] task: 88045cae9a80 ti: 88007091 task.ti:
>> 88007091
>> [  879.935750] RIP: 0010:[]  []
>> btrfs_delete_delayed_dir_index+0x215/0x220
>> [  879.935775] RSP: 0018:880070913d48  EFLAGS: 00010246
>> [  879.935787] RAX:  RBX: 880461fc6180 RCX: 
>> 
>> [  879.935804] RDX:  RSI: 880475d0c9e8 RDI: 
>> 880475d0c9e8
>> [  879.935820] RBP: 8803ef4de4c0 R08: 0533 R09: 
>> 0005
>> [  879.935842] R10:  R11: a597e28d R12: 
>> 8803ef4de508
>> [  879.935858] R13: 0f18 R14: 880463326000 R15: 
>> 880458ebac78
>> [  879.935874] FS:  () GS:880475d0(0063)
>> knlGS:ed7ffb40
>> [  879.935893] CS:  0010 DS: 002b ES: 002b CR0: 80050033
>> [  879.935906] CR2: 7f0bfe6b7000 CR3: 0003fd5ae000 CR4: 
>> 003406e0
>> [  879.935922] DR0:  DR1:  DR2: 
>> 
>> [  879.935938] DR3:  DR6: fffe0ff0 DR7: 
>> 0400
>> [  879.935955] Stack:
>> [  879.935961]  0004 42ffa5275611 600013d4
>> 0f18
>> [  879.935981]  cfbff096 8803f16ac788 880070913e20
>> 8804601a01f0
>> [  879.936001]  0013d6da 0013d442 880458ed3000
>> a5224fbe
>> [  879.936021] Call Trace:
>> [  879.936030]  [] ? __btrfs_unlink_inode+0x1ae/0x470
>> [  879.936045]  [] ? btrfs_unlink_inode+0x12/0x40
>> [  879.936060]  [] ? btrfs_unlink+0x61/0xb0
>> [  879.936074]  [] ? vfs_unlink+0xed/0x180
>> [  879.936087]  [] ? do_unlinkat+0x295/0x310
>> [  879.936101]  [] ? do_fast_syscall_32+0x8d/0x150
>> [  879.936116]  [] ? entry_SYSENTER_compat+0x4c/0x5b
>> [  879.936130] Code: ff 0f 0b 48 8b 55 10 41 89 c1 49 8b be f0 01 00
>> 00 48 c7 c6 78 5b 73 a5 4c 8b 45 00 48 8b 8a 48 03 00 00 4c 89 ea e8
>> eb 84 f7 ff <0f> 0b e8 e4 0b dd ff 0f 1f 40 00 53 48 89 fb e8 e7 e1 ff
>> ff 48
>> [  879.936234] RIP  []
>> btrfs_delete_delayed_dir_index+0x215/0x220
>> [  879.936253]  RSP 
>> [  879.939739] ---[ end trace b01dc7191bc4c300 ]---
>
> That's here:
>
> 1572 ret = __btrfs_add_delayed_deletion_item(node, item);
> 1573 if (unlikely(ret)) {
> 1574 btrfs_err(root->fs_info, "err add delayed dir index 
> item(index: %llu) "
> 1575 "into the deletion tree of the delayed 
> node"
> 1576 "(root id: %llu, inode id: %llu, errno: 
> %d)",
> 1577 index, node->root->objectid, 
> node->inode_id,
> 1578 ret);
> 1579 BUG();
> 1580 }
>
> As far as I can tell, the only way that __btrfs_add_delayed_deletion_item()
> will fail is with -EEXIST, which would be a bug, but your trace doesn't 
> include
> the btrfs_err message right before the BUG(). Do you still have that dmesg
> lying around just to be sure?
>
> --
> Omar
--
To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
the body of a message to majord...@vger.kernel.org
More majordomo info at 

Re: kernel BUG at fs/btrfs/delayed-inode.c:1579!

2016-08-24 Thread Omar Sandoval
On Wed, Aug 24, 2016 at 09:27:16PM +0200, Sverd Johnsen wrote:
> https://bugzilla.kernel.org/show_bug.cgi?id=153891
> 
> [  879.935385] [ cut here ]
> [  879.935400] kernel BUG at fs/btrfs/delayed-inode.c:1579!
> [  879.935414] invalid opcode:  [#1] PREEMPT SMP
> [  879.935425] Modules linked in: veth binfmt_misc nft_reject_inet
> nf_reject_ipv4 nf_reject_ipv6 nft_reject nf_log_ipv6 nf_log_ipv4
> nf_log_common nf_conntrack_ipv6 nf_defrag_ipv6 nf_conntrack_ipv4
> nf_defrag_ipv4 nft_ct nf_conntrack nft_log nft_counter nft_meta
> nft_hash nft_rbtree nf_tables_inet nf_tables_ipv6 nf_tables_ipv4
> nf_tables nfnetlink algif_skcipher af_alg af_packet bridge hid_generic
> usbhid hid ghash_clmulni_intel stp intel_cstate llc intel_uncore
> psmouse intel_rapl_perf efi_pstore efivarfs snd_hda_codec_hdmi
> snd_hda_codec_realtek snd_hda_codec_generic x86_pkg_temp_thermal
> intel_powerclamp atkbd libps2 kvm_intel kvm irqbypass crct10dif_pclmul
> crc32_pclmul crc32c_intel aesni_intel aes_x86_64 glue_helper lrw
> gf128mul ablk_helper cryptd efivars snd_hda_intel snd_hda_codec
> snd_hda_core snd_pcm
> [  879.935636]  snd_timer i915 shpchp sd_mod xhci_pci xhci_hcd usbcore
> mei_me mei usb_common intel_gtt fan thermal battery i8042 serio
> pinctrl_sunrisepoint pinctrl_intel acpi_pad tpm_infineon tpm_tis tpm
> [  879.935694] CPU: 2 PID: 3125 Comm: CJobMgr::m_Work Tainted: G
>  W   4.7.2-1-ph #1
> [  879.935713] Hardware name: Gigabyte Technology Co., Ltd.
> Z170X-UD3/Z170X-UD3-CF, BIOS F6 03/01/2016
> [  879.935733] task: 88045cae9a80 ti: 88007091 task.ti:
> 88007091
> [  879.935750] RIP: 0010:[]  []
> btrfs_delete_delayed_dir_index+0x215/0x220
> [  879.935775] RSP: 0018:880070913d48  EFLAGS: 00010246
> [  879.935787] RAX:  RBX: 880461fc6180 RCX: 
> 
> [  879.935804] RDX:  RSI: 880475d0c9e8 RDI: 
> 880475d0c9e8
> [  879.935820] RBP: 8803ef4de4c0 R08: 0533 R09: 
> 0005
> [  879.935842] R10:  R11: a597e28d R12: 
> 8803ef4de508
> [  879.935858] R13: 0f18 R14: 880463326000 R15: 
> 880458ebac78
> [  879.935874] FS:  () GS:880475d0(0063)
> knlGS:ed7ffb40
> [  879.935893] CS:  0010 DS: 002b ES: 002b CR0: 80050033
> [  879.935906] CR2: 7f0bfe6b7000 CR3: 0003fd5ae000 CR4: 
> 003406e0
> [  879.935922] DR0:  DR1:  DR2: 
> 
> [  879.935938] DR3:  DR6: fffe0ff0 DR7: 
> 0400
> [  879.935955] Stack:
> [  879.935961]  0004 42ffa5275611 600013d4
> 0f18
> [  879.935981]  cfbff096 8803f16ac788 880070913e20
> 8804601a01f0
> [  879.936001]  0013d6da 0013d442 880458ed3000
> a5224fbe
> [  879.936021] Call Trace:
> [  879.936030]  [] ? __btrfs_unlink_inode+0x1ae/0x470
> [  879.936045]  [] ? btrfs_unlink_inode+0x12/0x40
> [  879.936060]  [] ? btrfs_unlink+0x61/0xb0
> [  879.936074]  [] ? vfs_unlink+0xed/0x180
> [  879.936087]  [] ? do_unlinkat+0x295/0x310
> [  879.936101]  [] ? do_fast_syscall_32+0x8d/0x150
> [  879.936116]  [] ? entry_SYSENTER_compat+0x4c/0x5b
> [  879.936130] Code: ff 0f 0b 48 8b 55 10 41 89 c1 49 8b be f0 01 00
> 00 48 c7 c6 78 5b 73 a5 4c 8b 45 00 48 8b 8a 48 03 00 00 4c 89 ea e8
> eb 84 f7 ff <0f> 0b e8 e4 0b dd ff 0f 1f 40 00 53 48 89 fb e8 e7 e1 ff
> ff 48
> [  879.936234] RIP  []
> btrfs_delete_delayed_dir_index+0x215/0x220
> [  879.936253]  RSP 
> [  879.939739] ---[ end trace b01dc7191bc4c300 ]---

That's here:

1572 ret = __btrfs_add_delayed_deletion_item(node, item);
1573 if (unlikely(ret)) {
1574 btrfs_err(root->fs_info, "err add delayed dir index 
item(index: %llu) "
1575 "into the deletion tree of the delayed 
node"
1576 "(root id: %llu, inode id: %llu, errno: 
%d)",
1577 index, node->root->objectid, 
node->inode_id,
1578 ret);
1579 BUG();
1580 }

As far as I can tell, the only way that __btrfs_add_delayed_deletion_item()
will fail is with -EEXIST, which would be a bug, but your trace doesn't include
the btrfs_err message right before the BUG(). Do you still have that dmesg
lying around just to be sure?

-- 
Omar
--
To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html