Bug 103811 - Kernel bug after changing raid levels
Summary: Kernel bug after changing raid levels
Status: RESOLVED OBSOLETE
Alias: None
Product: File System
Classification: Unclassified
Component: btrfs (show other bugs)
Hardware: x86-64 Linux
: P1 normal
Assignee: Josef Bacik
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-08-31 17:53 UTC by Néstor Uribe-Patarroyo
Modified: 2022-10-04 09:26 UTC (History)
2 users (show)

See Also:
Kernel Version: 3.19.0
Subsystem:
Regression: No
Bisected commit-id:


Attachments
dmesg output (232.59 KB, text/x-log)
2015-08-31 17:53 UTC, Néstor Uribe-Patarroyo
Details

Description Néstor Uribe-Patarroyo 2015-08-31 17:53:51 UTC
Created attachment 186401 [details]
dmesg output

I have had a kernel bug happen twice in two different btrfs volumes (I *think* it's the same bug). Both volumes are currently in raid0, AFTER they had been converted from a different raid level (raid5 in one case, raid1 in the other case). The devices in each volume are connected through different controllers (a raid controller in pass through mode for raid1, an esata connection for raid5).

The crash happened after successfully doing the conversion, when doing normal tasks (in the raid5 case when deleting all the files left on the volume, in the raid1 case when creating the only file in the volume after deleting everything).

The output from dmesg was this in the raid1 case:

[168473.698611] ------------[ cut here ]------------
[168473.698620] kernel BUG at /build/linux-lts-vivid-BZwsXG/linux-lts-vivid-3.19.0/fs/btrfs/inode.c:3142!
[168473.698623] invalid opcode: 0000 [#1] SMP 
[168473.698626] Modules linked in: uas usb_storage rfcomm bnep bluetooth nvidia(POE) uvcvideo videobuf2_vmalloc videobuf2_memops snd_usb_audio videobuf2_core v4l2_common videodev snd_usbmidi_lib media joydev snd_hda_codec_hdmi serio_raw dcdbas i8k snd_hda_codec_realtek intel_rapl iosf_mbi x86_pkg_temp_thermal intel_powerclamp coretemp kvm_intel kvm sb_edac edac_core snd_hda_codec_generic snd_hda_intel snd_hda_controller snd_hda_codec snd_hwdep snd_pcm snd_seq_midi snd_seq_midi_event ru1144e(POE) snd_rawmidi lpc_ich snd_seq snd_seq_device snd_timer drm snd mei_me mei soundcore shpchp 8250_fintek mac_hid nls_iso8859_1 parport_pc ppdev lp parport btrfs xor raid6_pq dm_crypt hid_generic usbhid hid crct10dif_pclmul crc32_pclmul ghash_clmulni_intel aesni_intel aes_x86_64 lrw gf128mul glue_helper ablk_helper cryptd psmouse e1000e ahci megaraid_sas libahci ptp pata_acpi pps_core pata_marvell
[168473.698679] CPU: 7 PID: 6248 Comm: btrfs-cleaner Tainted: P           OE  3.19.0-26-generic #28~14.04.1-Ubuntu
[168473.698681] Hardware name: Dell Inc. Precision T5600/0Y56T3, BIOS A06 10/25/2012
[168473.698684] task: ffff8808290dce80 ti: ffff8807fb8ac000 task.ti: ffff8807fb8ac000
[168473.698686] RIP: 0010:[<ffffffffc03422d2>]  [<ffffffffc03422d2>] btrfs_orphan_add+0x1d2/0x1e0 [btrfs]
[168473.698713] RSP: 0018:ffff8807fb8afc48  EFLAGS: 00010286
[168473.698715] RAX: 00000000ffffffe4 RBX: ffff88002e7cafc0 RCX: ffff88081590a000
[168473.698716] RDX: 000000000000a0c8 RSI: 0000000000040000 RDI: ffff88081590a138
[168473.698718] RBP: ffff8807fb8afc88 R08: 000060efb0001b40 R09: ffff880d8fd8ae10
[168473.698720] R10: ffffffffc03578b7 R11: ffffea00215f3b40 R12: ffff88100bd8e800
[168473.698721] R13: ffff8810202d6210 R14: ffff88100bd8ec58 R15: 0000000000000001
[168473.698723] FS:  0000000000000000(0000) GS:ffff88104fc20000(0000) knlGS:0000000000000000
[168473.698725] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[168473.698727] CR2: 000000000574a0b8 CR3: 000000082a150000 CR4: 00000000000407e0
[168473.698728] Stack:
[168473.698730]  ffff8807fb8afc88 ffffffffc0380d84 ffff88081590ab04 ffff881028e0d800
[168473.698733]  ffff880d8fd8ae10 ffff88002e7cafc0 ffff88005c4eb400 ffff88010c01c480
[168473.698747]  ffff8807fb8afd18 ffffffffc032bab7 ffff880d8fd8ae14 ffff880d8fd8ae10
[168473.698749] Call Trace:
[168473.698767]  [<ffffffffc0380d84>] ? lookup_free_space_inode+0x44/0x100 [btrfs]
[168473.698779]  [<ffffffffc032bab7>] btrfs_remove_block_group+0x137/0x740 [btrfs]
[168473.698794]  [<ffffffffc03649d2>] btrfs_remove_chunk+0x672/0x780 [btrfs]
[168473.698804]  [<ffffffffc032c31f>] btrfs_delete_unused_bgs+0x25f/0x280 [btrfs]
[168473.698828]  [<ffffffffc0334b0c>] cleaner_kthread+0x12c/0x190 [btrfs]
[168473.698840]  [<ffffffffc03349e0>] ? check_leaf+0x350/0x350 [btrfs]
[168473.698847]  [<ffffffff81093802>] kthread+0xd2/0xf0
[168473.698851]  [<ffffffff81093730>] ? kthread_create_on_node+0x1c0/0x1c0
[168473.698857]  [<ffffffff817b67d8>] ret_from_fork+0x58/0x90
[168473.698860]  [<ffffffff81093730>] ? kthread_create_on_node+0x1c0/0x1c0
[168473.698862] Code: ff ff 0f 1f 80 00 00 00 00 89 45 c8 f0 80 63 80 fd 48 89 df e8 e0 22 fe ff 8b 45 c8 e9 14 ff ff ff b8 f4 ff ff ff e9 12 ff ff ff <0f> 0b 66 66 66 2e 0f 1f 84 00 00 00 00 00 66 66 66 66 90 55 48 
[168473.698900] RIP  [<ffffffffc03422d2>] btrfs_orphan_add+0x1d2/0x1e0 [btrfs]
[168473.698911]  RSP <ffff8807fb8afc48>
[168473.698914] ---[ end trace 427a620ca31fe423 ]---

An this one in the raid5 case:

[152486.025578] ------------[ cut here ]------------
[152486.025584] kernel BUG at /build/linux-lts-vivid-BZwsXG/linux-lts-vivid-3.19.0/fs/btrfs/inode.c:3142!
[152486.025587] invalid opcode: 0000 [#1] SMP 
[152486.025590] Modules linked in: binfmt_misc uas usb_storage rfcomm bnep bluetooth nvidia(POE) uvcvideo videobuf2_vmalloc videobuf2_memops videobuf2_core v4l2_common joydev videodev snd_usb_audio media snd_usbmidi_lib snd_hda_codec_hdmi dcdbas i8k intel_rapl iosf_mbi x86_pkg_temp_thermal intel_powerclamp coretemp kvm_intel kvm snd_hda_codec_realtek serio_raw snd_hda_codec_generic snd_hda_intel snd_hda_controller snd_hda_codec snd_hwdep sb_edac snd_pcm edac_core snd_seq_midi snd_seq_midi_event snd_rawmidi snd_seq lpc_ich snd_seq_device snd_timer mei_me ru1144e(POE) mei snd drm soundcore 8250_fintek shpchp mac_hid nls_iso8859_1 parport_pc ppdev lp parport btrfs xor raid6_pq dm_crypt hid_generic usbhid hid crct10dif_pclmul crc32_pclmul ghash_clmulni_intel aesni_intel aes_x86_64 lrw gf128mul glue_helper ablk_helper cryptd psmouse e1000e ahci megaraid_sas libahci ptp pata_acpi pps_core pata_marvell
[152486.025640] CPU: 0 PID: 18004 Comm: btrfs-cleaner Tainted: P           OE  3.19.0-26-generic #28~14.04.1-Ubuntu
[152486.025642] Hardware name: Dell Inc. Precision T5600/0Y56T3, BIOS A06 10/25/2012
[152486.025644] task: ffff880828ac5850 ti: ffff880187ce0000 task.ti: ffff880187ce0000
[152486.025645] RIP: 0010:[<ffffffffc04e92d2>]  [<ffffffffc04e92d2>] btrfs_orphan_add+0x1d2/0x1e0 [btrfs]
[152486.025669] RSP: 0018:ffff880187ce3c48  EFLAGS: 00010286
[152486.025670] RAX: 00000000ffffffe4 RBX: ffff880178fe98b0 RCX: ffff88082be30000
[152486.025672] RDX: 0000000000000fc0 RSI: 0000000000040000 RDI: ffff88082be30138
[152486.025673] RBP: ffff880187ce3c88 R08: 000060efb0001b40 R09: ffff880627f76510
[152486.025674] R10: ffffffffc04fe8b7 R11: ffffea0014783000 R12: ffff880a89981000
[152486.025676] R13: ffff8808272551e0 R14: ffff880a89981458 R15: 0000000000000001
[152486.025678] FS:  0000000000000000(0000) GS:ffff88082fc00000(0000) knlGS:0000000000000000
[152486.025680] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[152486.025681] CR2: 0000000002379400 CR3: 0000000003c16000 CR4: 00000000000407f0
[152486.025682] Stack:
[152486.025684]  ffff880187ce3c88 ffffffffc0527d84 ffff88082be30b04 ffff880f3417e000
[152486.025686]  ffff880627f76510 ffff880178fe98b0 ffff880065c9de00 ffff880676d4fbd0
[152486.025689]  ffff880187ce3d18 ffffffffc04d2ab7 ffff880627f76514 ffff880627f76510
[152486.025691] Call Trace:
[152486.025709]  [<ffffffffc0527d84>] ? lookup_free_space_inode+0x44/0x100 [btrfs]
[152486.025721]  [<ffffffffc04d2ab7>] btrfs_remove_block_group+0x137/0x740 [btrfs]
[152486.025736]  [<ffffffffc050b9d2>] btrfs_remove_chunk+0x672/0x780 [btrfs]
[152486.025747]  [<ffffffffc04d331f>] btrfs_delete_unused_bgs+0x25f/0x280 [btrfs]
[152486.025759]  [<ffffffffc04dbb0c>] cleaner_kthread+0x12c/0x190 [btrfs]
[152486.025769]  [<ffffffffc04db9e0>] ? check_leaf+0x350/0x350 [btrfs]
[152486.025774]  [<ffffffff81093802>] kthread+0xd2/0xf0
[152486.025778]  [<ffffffff81093730>] ? kthread_create_on_node+0x1c0/0x1c0
[152486.025782]  [<ffffffff817b67d8>] ret_from_fork+0x58/0x90
[152486.025785]  [<ffffffff81093730>] ? kthread_create_on_node+0x1c0/0x1c0
[152486.025786] Code: ff ff 0f 1f 80 00 00 00 00 89 45 c8 f0 80 63 80 fd 48 89 df e8 e0 22 fe ff 8b 45 c8 e9 14 ff ff ff b8 f4 ff ff ff e9 12 ff ff ff <0f> 0b 66 66 66 2e 0f 1f 84 00 00 00 00 00 66 66 66 66 90 55 48 
[152486.025811] RIP  [<ffffffffc04e92d2>] btrfs_orphan_add+0x1d2/0x1e0 [btrfs]
[152486.025823]  RSP <ffff880187ce3c48>
[152486.025826] ---[ end trace 8dd08e9c9dab275a ]---

I don't have access to the full dmesg for the raid1 to raid0 case, but I do have it for the raid5 to raid0 case which is being attached to this message. Additionally, in the raid1 case, after formating the volume again with the desired raid0 configuration, it has been working fine. I will hold on formatting the raid5 case for a few days in case it is helpful for debugging.

Details about my system follows. The raid1->raid0 case was the volume IntHDDRAID, raid5->raid0 was ExtHDDRAID:

uname -a:
Linux precision 3.19.0-26-generic #28~14.04.1-Ubuntu SMP Wed Aug 12 14:09:17 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux

btrfs --version:
Btrfs v3.12

btrfs fi show:
Label: HomeBackup  uuid: bb7341f1-0ca4-47c6-abf4-86da03b945b4
	Total devices 1 FS bytes used 384.00KiB
	devid    1 size 115.08GiB used 2.04GiB path /dev/dm-4

Label: none  uuid: b3ea3b3a-f532-46cb-a06f-868aae092e4c
	Total devices 4 FS bytes used 658.55GiB
	devid    1 size 465.76GiB used 223.02GiB path /dev/mapper/HomeSSD1
	devid    2 size 465.76GiB used 223.00GiB path /dev/dm-7
	devid    3 size 465.76GiB used 223.00GiB path /dev/dm-9
	devid    4 size 465.76GiB used 223.00GiB path /dev/dm-8

Label: IntHDDRAID  uuid: 906dde31-9e6c-4d7f-885e-215a536cacc7
	Total devices 2 FS bytes used 4.60TiB
	devid    1 size 2.73TiB used 2.30TiB path /dev/mapper/IntHDDRAIDCrypt1
	devid    2 size 2.73TiB used 2.30TiB path /dev/mapper/IntHDDRAIDCrypt2

Label: ExtHDDRAID  uuid: 19478a89-d11f-410a-842f-da8785e7b56e
	Total devices 4 FS bytes used 360.16MiB
	devid    1 size 698.63GiB used 242.02GiB path /dev/mapper/ExtHDDRAIDCrypt1
	devid    2 size 698.63GiB used 242.00GiB path /dev/dm-11
	devid    3 size 698.63GiB used 242.00GiB path /dev/dm-14
	devid    4 size 698.63GiB used 242.00GiB path /dev/dm-13

btrfs fi df /data/ExtHDDRAID/:
Data, RAID0: total=968.00GiB, used=348.75MiB
System, single: total=4.00MiB, used=0.00
System, RAID5: total=12.00MiB, used=80.00KiB
Metadata, single: total=8.00MiB, used=0.00
Metadata, RAID5: total=3.00GiB, used=496.00KiB
unknown, single: total=16.00MiB, used=10.84MiB
Comment 1 David Sterba 2022-10-04 09:26:58 UTC
This is a semi-automated bugzilla cleanup, report is against an old kernel version. If the problem still happens, please open a new bug. Thanks.

Note You need to log in before you can comment on or make changes to this bug.