FYI, we noticed the following commit (built with gcc-7):
commit: 77f797eb8584e667eb32b5b7fbd39d8788938612 ("btrfs: Add a simple buffered iomap
write")
https://github.com/goldwynr/linux btrfs-iomap
in testcase: xfstests
with following parameters:
disk: 4HDD
fs: btrfs
test: generic-group8
test-description: xfstests is a regression test suite for xfs and other files ystems.
test-url:
git://git.kernel.org/pub/scm/fs/xfs/xfstests-dev.git
on test machine: qemu-system-x86_64 -enable-kvm -cpu SandyBridge -smp 2 -m 2G
caused below changes (please refer to attached dmesg/kmsg for entire log/backtrace):
+----------------------------------------------------------------------------------+------------+------------+
| |
bf4c71f78d | 77f797eb85 |
+----------------------------------------------------------------------------------+------------+------------+
| boot_successes | 33
| 3 |
| boot_failures | 82
| 110 |
| invoked_oom-killer:gfp_mask=0x | 2
| |
| Mem-Info | 2
| |
| BUG:kernel_reboot-without-warning_in_test_stage | 76
| 12 |
| BUG:kernel_hang_in_boot_stage | 4
| 10 |
| WARNING:at_fs/btrfs/extent-tree.c:#btrfs_free_reserved_data_space_noquota[btrfs] | 0
| 38 |
| RIP:btrfs_free_reserved_data_space_noquota[btrfs] | 0
| 38 |
| WARNING:at_fs/btrfs/inode.c:#btrfs_destroy_inode[btrfs] | 0
| 64 |
| RIP:btrfs_destroy_inode[btrfs] | 0
| 64 |
| WARNING:at_fs/btrfs/extent-tree.c:#btrfs_free_block_groups[btrfs] | 0
| 53 |
| RIP:btrfs_free_block_groups[btrfs] | 0
| 53 |
| kernel_BUG_at_fs/iomap.c | 0
| 44 |
| invalid_opcode:#[##] | 0
| 44 |
| RIP:iomap_write_begin | 0
| 44 |
| Kernel_panic-not_syncing:Fatal_exception | 0
| 44 |
| WARNING:at_fs/btrfs/extent-tree.c:#update_bytes_may_use[btrfs] | 0
| 36 |
| RIP:update_bytes_may_use[btrfs] | 0
| 36 |
| BUG:kernel_hang_in_test_stage | 0
| 2 |
| BUG:soft_lockup-CPU##stuck_for#s | 0
| 1 |
| RIP:__memcpy | 0
| 1 |
| Kernel_panic-not_syncing:softlockup:hung_tasks | 0
| 1 |
+----------------------------------------------------------------------------------+------------+------------+
If you fix the issue, kindly add following tag
Reported-by: kernel test robot <rong.a.chen(a)intel.com>
[ 36.938978] WARNING: CPU: 0 PID: 1946 at fs/btrfs/extent-tree.c:69
btrfs_free_reserved_data_space_noquota+0xf7/0x110 [btrfs]
[ 36.944910] Modules linked in: btrfs xor zstd_decompress zstd_compress raid6_pq
libcrc32c dm_mod crct10dif_pclmul crc32_pclmul crc32c_intel ghash_clmulni_intel sr_mod
cdrom sg ata_generic pata_acpi ppdev bochs_drm ttm snd_pcm aesni_intel snd_timer snd
drm_kms_helper crypto_simd cryptd glue_helper joydev soundcore ata_piix pcspkr syscopyarea
serio_raw sysfillrect libata sysimgblt fb_sys_fops i2c_piix4 drm parport_pc floppy parport
ip_tables
[ 36.960760] CPU: 0 PID: 1946 Comm: rm Not tainted 5.2.0-rc4-00004-g77f797e #1
[ 36.964087] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.10.2-1
04/01/2014
[ 36.967740] RIP: 0010:btrfs_free_reserved_data_space_noquota+0xf7/0x110 [btrfs]
[ 36.971102] Code: ee e8 9d da bb c4 49 8b 04 24 48 85 c0 75 da 65 ff 0d a5 39 9d 3f e9
79 ff ff ff 48 89 c1 48 f7 d9 48 39 ca 0f 83 5e ff ff ff <0f> 0b 48 c7 43 28 00 00
00 00 e9 56 ff ff ff 66 2e 0f 1f 84 00 00
[ 36.978983] RSP: 0018:ffffb0f10316bcd8 EFLAGS: 00010287
[ 36.981856] RAX: fffffffffffff000 RBX: ffff8ff0cf4f7400 RCX: 0000000000001000
[ 36.985231] RDX: 0000000000000000 RSI: 0000000000000000 RDI: ffff8ff0cf4f7400
[ 36.988659] RBP: 0000000000000fff R08: 0000000000004000 R09: ffff8ff0fc6a0000
[ 36.994422] R10: ffff8ff0d04a9000 R11: 0000000000000001 R12: ffff8ff0eb0f9e60
[ 36.997846] R13: ffff8ff0fc6a0000 R14: ffff8ff0d04a9000 R15: ffffb0f10316bdd4
[ 37.001278] FS: 00007faf9844c480(0000) GS:ffff8ff0eb000000(0000)
knlGS:0000000000000000
[ 37.004933] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[ 37.007912] CR2: 0000555b176921f8 CR3: 000000005b266000 CR4: 00000000000406f0
[ 37.011332] Call Trace:
[ 37.013405] btrfs_clear_delalloc_extent+0x1a1/0x420 [btrfs]
[ 37.016327] ? _cond_resched+0x19/0x30
[ 37.018764] clear_state_bit+0x75/0x1b0 [btrfs]
[ 37.021409] __clear_extent_bit+0x222/0x440 [btrfs]
[ 37.024117] ? _cond_resched+0x19/0x30
[ 37.026529] clear_extent_bit+0x15/0x20 [btrfs]
[ 37.029122] btrfs_evict_inode+0x152/0x4c0 [btrfs]
[ 37.031692] evict+0xd9/0x1b0
[ 37.033758] do_unlinkat+0x1ab/0x320
[ 37.035979] do_syscall_64+0x5b/0x1e0
[ 37.038263] entry_SYSCALL_64_after_hwframe+0x44/0xa9
[ 37.040914] RIP: 0033:0x7faf97f6e117
[ 37.043118] Code: 73 01 c3 48 8b 0d 81 bd 2b 00 f7 d8 64 89 01 48 83 c8 ff c3 66 2e 0f
1f 84 00 00 00 00 00 0f 1f 44 00 00 b8 07 01 00 00 0f 05 <48> 3d 01 f0 ff ff 73 01
c3 48 8b 0d 51 bd 2b 00 f7 d8 64 89 01 48
[ 37.051009] RSP: 002b:00007ffd09883228 EFLAGS: 00000206 ORIG_RAX: 0000000000000107
[ 37.054494] RAX: ffffffffffffffda RBX: 0000555b17692320 RCX: 00007faf97f6e117
[ 37.057846] RDX: 0000000000000000 RSI: 0000555b176910f0 RDI: 00000000ffffff9c
[ 37.061279] RBP: 0000000000000000 R08: 0000000000000000 R09: 0000000000000000
[ 37.064611] R10: 000000000000015d R11: 0000000000000206 R12: 0000555b17691060
[ 37.068040] R13: 00007ffd09883360 R14: 0000555b17692320 R15: 0000000000000000
[ 37.071513] ---[ end trace 35d42372724e81c8 ]---
To reproduce:
# build kernel
cd linux
cp config-5.2.0-rc4-00004-g77f797e .config
make HOSTCC=gcc-7 CC=gcc-7 ARCH=x86_64 olddefconfig
make HOSTCC=gcc-7 CC=gcc-7 ARCH=x86_64 prepare
make HOSTCC=gcc-7 CC=gcc-7 ARCH=x86_64 modules_prepare
make HOSTCC=gcc-7 CC=gcc-7 ARCH=x86_64 SHELL=/bin/bash
make HOSTCC=gcc-7 CC=gcc-7 ARCH=x86_64 bzImage
git clone
https://github.com/intel/lkp-tests.git
cd lkp-tests
find lib/ | cpio -o -H newc --quiet | gzip > modules.cgz
bin/lkp qemu -k <bzImage> -m modules.cgz job-script # job-script is attached in
this email
Thanks,
Rong Chen