Comment 0 for bug 1822560

Revision history for this message
Po-Hsu Lin (cypressyew) wrote :

Probably caused by bug 1821913

Invoking test e755f780865221252ef3321215c9796b78e7b1c5

fix e755f780865221252ef3321215c9796b78e7b1c5

btrfs: fix null pointer dereference in clone_fs_devices when name is null

when one of the device path is missing btrfs_device name is null. So this
patch will check for that.

mount: /dev/loop0 is write-protected, mounting read-only
Performing full device TRIM (2.00GiB) ...
mount failed, kernel bug:
[ 8680.949850] BTRFS: device fsid 197ab202-8eef-4a3d-bca6-98f07f73a2e6 devid 1 transid 3 /dev/loop0
[ 8680.953724] BTRFS: device fsid 197ab202-8eef-4a3d-bca6-98f07f73a2e6 devid 2 transid 3 /dev/loop2
[ 8681.335859] =============================================================================
[ 8681.335879] BUG btrfs_extent_map (Tainted: G B ): Objects remaining in btrfs_extent_map on kmem_cache_close()
[ 8681.335899] -----------------------------------------------------------------------------

[ 8681.335917] INFO: Slab 0xf7360ac8 objects=34 used=1 fp=0xe8e45c30 flags=0x2800080
[ 8681.335962] CPU: 3 PID: 29896 Comm: modprobe Tainted: G B 4.4.0-145-generic #171-Ubuntu
[ 8681.335964] Hardware name: Dell Inc. PowerEdge R310/05XKKK, BIOS 1.8.2 08/17/2011
[ 8681.335965] c1b0f967 1c177eb0 00000286 e0dcdddc c13c089f f7360ac8 e0dcddfc e0dcde70
[ 8681.335969] c11cce82 c1a17524 f7360ac8 00000022 00000001 e8e45c30 02800080 656a624f
[ 8681.335973] 20737463 616d6572 6e696e69 6e692067 72746220 655f7366 6e657478 616d5f74
[ 8681.335976] Call Trace:
[ 8681.335984] [] dump_stack+0x58/0x79
[ 8681.335987] [] slab_err+0x82/0xa0
[ 8681.335989] [] ? __kmalloc+0x22d/0x240
[ 8681.335993] [] ? smp_call_function_many+0x1ad/0x220
[ 8681.335995] [] ? free_partial+0xa9/0x1b0
[ 8681.335996] [] ? free_partial+0xa9/0x1b0
[ 8681.335998] [] free_partial+0xce/0x1b0
[ 8681.336001] [] ? __flush_cpu_slab+0x40/0x40
[ 8681.336003] [] __kmem_cache_shutdown+0x42/0x80
[ 8681.336006] [] kmem_cache_destroy+0x162/0x1e0
[ 8681.336028] [] extent_map_exit+0x16/0x20 [btrfs]
[ 8681.336042] [] exit_btrfs_fs+0x26/0xfc [btrfs]
[ 8681.336044] [] SyS_delete_module+0x1af/0x200
[ 8681.336047] [] ? ____fput+0xd/0x10
[ 8681.336050] [] ? task_work_run+0x8f/0xa0
[ 8681.336052] [] ? exit_to_usermode_loop+0xb6/0xe0
[ 8681.336054] [] do_fast_syscall_32+0x9f/0x160
[ 8681.336057] [] sysenter_past_esp+0x3d/0x61
[ 8681.336060] INFO: Object 0xe8e450f0 @offset=240
[ 8681.336085] kmem_cache_destroy btrfs_extent_map: Slab cache still has objects
[ 8681.336114] CPU: 3 PID: 29896 Comm: modprobe Tainted: G B 4.4.0-145-generic #171-Ubuntu
[ 8681.336115] Hardware name: Dell Inc. PowerEdge R310/05XKKK, BIOS 1.8.2 08/17/2011
[ 8681.336116] c1b0f967 1c177eb0 00000286 e0dcded4 c13c089f f55b0cc0 f55b0d34 e0dcdf0c
[ 8681.336120] c119e880 c1a15d8c ec0edb20 e0dcdf04 000d986b e0dcdeec e0dcdeec e0dcdef4
[ 8681.336124] e0dcdef4 1c177eb0 007b5f34 f8dd0880 e0dcc000 e0dcdf14 f8d48f86 e0dcdf1c
[ 8681.336127] Call Trace:
[ 8681.336129] [] dump_stack+0x58/0x79
[ 8681.336131] [] kmem_cache_destroy+0x1b0/0x1e0
[ 8681.336146] [] extent_map_exit+0x16/0x20 [btrfs]
[ 8681.336160] [] exit_btrfs_fs+0x26/0xfc [btrfs]
[ 8681.336162] [] SyS_delete_module+0x1af/0x200
[ 8681.336164] [] ? ____fput+0xd/0x10
[ 8681.336166] [] ? task_work_run+0x8f/0xa0
[ 8681.336168] [] ? exit_to_usermode_loop+0xb6/0xe0
[ 8681.336170] [] do_fast_syscall_32+0x9f/0x160
[ 8681.336172] [] sysenter_past_esp+0x3d/0x61
[ 8681.455355] Btrfs loaded
[ 8681.483803] BTRFS: device fsid 197ab202-8eef-4a3d-bca6-98f07f73a2e6 devid 1 transid 6 /dev/loop0
[ 8681.539920] BTRFS info (device loop0): allowing degraded mounts
[ 8681.539929] BTRFS info (device loop0): disk space caching is enabled
[ 8681.539930] BTRFS: has skinny extents
[ 8681.539932] BTRFS: flagging fs with big metadata feature
[ 8681.540722] BTRFS warning (device loop0): devid 2 uuid 5af56aa2-70cd-446c-9c91-e42ce244669e is missing
[ 8681.705354] BTRFS info (device loop0): relocating block group 676855808 flags 2
[ 8681.821174] BTRFS info (device loop0): relocating block group 20971520 flags 18
[ 8681.969227] BTRFS info (device loop0): disk added /dev/loop3
umount: /tmp/mnt-e755f780865221252ef3321215c9796b78e7b1c5: not mounted
losetup: /dev/loop0: detach failed: No such device or address
losetup: /dev/loop2: detach failed: No such device or address
losetup: /dev/loop3: detach failed: No such device or address

Found kernel issue:

[ 8680.949850] BTRFS: device fsid 197ab202-8eef-4a3d-bca6-98f07f73a2e6 devid 1 transid 3 /dev/loop0
[ 8680.953724] BTRFS: device fsid 197ab202-8eef-4a3d-bca6-98f07f73a2e6 devid 2 transid 3 /dev/loop2
[ 8681.335859] =============================================================================
[ 8681.335879] BUG btrfs_extent_map (Tainted: G B ): Objects remaining in btrfs_extent_map on kmem_cache_close()
[ 8681.335899] -----------------------------------------------------------------------------

[ 8681.335917] INFO: Slab 0xf7360ac8 objects=34 used=1 fp=0xe8e45c30 flags=0x2800080
[ 8681.335962] CPU: 3 PID: 29896 Comm: modprobe Tainted: G B 4.4.0-145-generic #171-Ubuntu
[ 8681.335964] Hardware name: Dell Inc. PowerEdge R310/05XKKK, BIOS 1.8.2 08/17/2011
[ 8681.335965] c1b0f967 1c177eb0 00000286 e0dcdddc c13c089f f7360ac8 e0dcddfc e0dcde70
[ 8681.335969] c11cce82 c1a17524 f7360ac8 00000022 00000001 e8e45c30 02800080 656a624f
[ 8681.335973] 20737463 616d6572 6e696e69 6e692067 72746220 655f7366 6e657478 616d5f74
[ 8681.335976] Call Trace:
[ 8681.335984] [] dump_stack+0x58/0x79
[ 8681.335987] [] slab_err+0x82/0xa0
[ 8681.335989] [] ? __kmalloc+0x22d/0x240
[ 8681.335993] [] ? smp_call_function_many+0x1ad/0x220
[ 8681.335995] [] ? free_partial+0xa9/0x1b0
[ 8681.335996] [] ? free_partial+0xa9/0x1b0
[ 8681.335998] [] free_partial+0xce/0x1b0
[ 8681.336001] [] ? __flush_cpu_slab+0x40/0x40
[ 8681.336003] [] __kmem_cache_shutdown+0x42/0x80
[ 8681.336006] [] kmem_cache_destroy+0x162/0x1e0
[ 8681.336028] [] extent_map_exit+0x16/0x20 [btrfs]
[ 8681.336042] [] exit_btrfs_fs+0x26/0xfc [btrfs]
[ 8681.336044] [] SyS_delete_module+0x1af/0x200
[ 8681.336047] [] ? ____fput+0xd/0x10
[ 8681.336050] [] ? task_work_run+0x8f/0xa0
[ 8681.336052] [] ? exit_to_usermode_loop+0xb6/0xe0
[ 8681.336054] [] do_fast_syscall_32+0x9f/0x160
[ 8681.336057] [] sysenter_past_esp+0x3d/0x61
[ 8681.336060] INFO: Object 0xe8e450f0 @offset=240
[ 8681.336085] kmem_cache_destroy btrfs_extent_map: Slab cache still has objects
[ 8681.336114] CPU: 3 PID: 29896 Comm: modprobe Tainted: G B 4.4.0-145-generic #171-Ubuntu
[ 8681.336115] Hardware name: Dell Inc. PowerEdge R310/05XKKK, BIOS 1.8.2 08/17/2011
[ 8681.336116] c1b0f967 1c177eb0 00000286 e0dcded4 c13c089f f55b0cc0 f55b0d34 e0dcdf0c
[ 8681.336120] c119e880 c1a15d8c ec0edb20 e0dcdf04 000d986b e0dcdeec e0dcdeec e0dcdef4
[ 8681.336124] e0dcdef4 1c177eb0 007b5f34 f8dd0880 e0dcc000 e0dcdf14 f8d48f86 e0dcdf1c
[ 8681.336127] Call Trace:
[ 8681.336129] [] dump_stack+0x58/0x79
[ 8681.336131] [] kmem_cache_destroy+0x1b0/0x1e0
[ 8681.336146] [] extent_map_exit+0x16/0x20 [btrfs]
[ 8681.336160] [] exit_btrfs_fs+0x26/0xfc [btrfs]
[ 8681.336162] [] SyS_delete_module+0x1af/0x200
[ 8681.336164] [] ? ____fput+0xd/0x10
[ 8681.336166] [] ? task_work_run+0x8f/0xa0
[ 8681.336168] [] ? exit_to_usermode_loop+0xb6/0xe0
[ 8681.336170] [] do_fast_syscall_32+0x9f/0x160
[ 8681.336172] [] sysenter_past_esp+0x3d/0x61
[ 8681.455355] Btrfs loaded
[ 8681.483803] BTRFS: device fsid 197ab202-8eef-4a3d-bca6-98f07f73a2e6 devid 1 transid 6 /dev/loop0
[ 8681.539920] BTRFS info (device loop0): allowing degraded mounts
[ 8681.539929] BTRFS info (device loop0): disk space caching is enabled
[ 8681.539930] BTRFS: has skinny extents
[ 8681.539932] BTRFS: flagging fs with big metadata feature
[ 8681.540722] BTRFS warning (device loop0): devid 2 uuid 5af56aa2-70cd-446c-9c91-e42ce244669e is missing
[ 8681.705354] BTRFS info (device loop0): relocating block group 676855808 flags 2
[ 8681.821174] BTRFS info (device loop0): relocating block group 20971520 flags 18
[ 8681.969227] BTRFS info (device loop0): disk added /dev/loop3
[ 8682.152909] Test e755f780865221252ef3321215c9796b78e7b1c5 returned 0

FAIL: e755f780865221252ef3321215c9796b78e7b1c5 (ret=1)

ProblemType: Bug
DistroRelease: Ubuntu 16.04
Package: linux-image-4.4.0-143-generic 4.4.0-143.169
ProcVersionSignature: User Name 4.4.0-143.169-generic 4.4.170
Uname: Linux 4.4.0-143-generic i686
AlsaDevices:
 total 0
 crw-rw---- 1 root audio 116, 1 Apr 1 03:35 seq
 crw-rw---- 1 root audio 116, 33 Apr 1 03:35 timer
AplayDevices: Error: [Errno 2] No such file or directory: 'aplay'
ApportVersion: 2.20.1-0ubuntu2.18
Architecture: i386
ArecordDevices: Error: [Errno 2] No such file or directory: 'arecord'
AudioDevicesInUse: Error: command ['fuser', '-v', '/dev/snd/seq', '/dev/snd/timer'] failed with exit code 1:
CurrentDmesg:

Date: Mon Apr 1 08:35:27 2019
IwConfig: Error: [Errno 2] No such file or directory: 'iwconfig'
MachineType: Dell Inc. PowerEdge R310
PciMultimedia:

ProcFB:

ProcKernelCmdLine: BOOT_IMAGE=/boot/vmlinuz-4.4.0-143-generic root=UUID=6aaa11f6-d386-4c0c-b4b8-38e6c408980a ro
RelatedPackageVersions:
 linux-restricted-modules-4.4.0-143-generic N/A
 linux-backports-modules-4.4.0-143-generic N/A
 linux-firmware 1.157.21
RfKill: Error: [Errno 2] No such file or directory: 'rfkill'
SourcePackage: linux
UpgradeStatus: No upgrade log present (probably fresh install)
dmi.bios.date: 09/18/2012
dmi.bios.vendor: Dell Inc.
dmi.bios.version: 1.11.0
dmi.board.name: 05XKKK
dmi.board.vendor: Dell Inc.
dmi.board.version: A05
dmi.chassis.type: 23
dmi.chassis.vendor: Dell Inc.
dmi.modalias: dmi:bvnDellInc.:bvr1.11.0:bd09/18/2012:svnDellInc.:pnPowerEdgeR310:pvr:rvnDellInc.:rn05XKKK:rvrA05:cvnDellInc.:ct23:cvr:
dmi.product.name: PowerEdge R310
dmi.sys.vendor: Dell Inc.