6113077cd319e747875ec71227d2b5cb54e08c76 in btrfs_kernel_fixes failed on B/C/D

Bug #1810384 reported by Po-Hsu Lin
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
ubuntu-kernel-tests
Fix Released
Undecided
Unassigned
linux (Ubuntu)
Confirmed
Undecided
Unassigned
Bionic
New
Undecided
Unassigned
Cosmic
New
Undecided
Unassigned
Disco
Won't Fix
Undecided
Unassigned

Bug Description

Test failed with disk quota exceeded when trying to create subvolume, and error traces could be found in the kernel log.

This patch exists in the Bionic kernel tree:
https://kernel.ubuntu.com/git/ubuntu/ubuntu-bionic.git/commit/?id=6113077cd319e747875ec71227d2b5cb54e08c76

Invoking test 6113077cd319e747875ec71227d2b5cb54e08c76

fix 6113077cd319e747875ec71227d2b5cb54e08c76

    Btrfs: fix missing qgroup reservation before fallocating

    Steps to reproduce:
        mkfs.btrfs <disk>
        mount <disk> <mnt>
        btrfs quota enable <mnt>
        btrfs sub create <mnt>/subv
        btrfs qgroup limit 10M <mnt>/subv
        fallocate --length 20M <mnt>/subv/data

    For the above example, fallocating will return successfully which
    is not expected, we try to fix it by doing qgroup reservation before
    fallocating.

Create subvolume '/tmp/mnt-6113077cd319e747875ec71227d2b5cb54e08c76/subv'
fallocate: fallocate failed: Disk quota exceeded

Found kernel issue:

[ 829.940603] Invoking test 6113077cd319e747875ec71227d2b5cb54e08c76
[ 830.001738] BTRFS: device fsid 134f6701-7984-42bc-affc-e423f4e6c750 devid 1 transid 5 /dev/loop0
[ 830.005573] BTRFS info (device loop0): disk space caching is enabled
[ 830.005574] BTRFS info (device loop0): has skinny extents
[ 830.005575] BTRFS info (device loop0): flagging fs with big metadata feature
[ 830.006375] BTRFS info (device loop0): creating UUID tree
[ 830.038054] BTRFS info (device loop0): qgroup scan completed (inconsistency flag cleared)
[ 830.042133] WARNING: CPU: 1 PID: 15933 at /build/linux-oem-RkS9Vy/linux-oem-4.15.0/fs/btrfs/extent-tree.c:4433 btrfs_free_reserved_data_space_noquota+0xcb/0xe0 [btrfs]
[ 830.042133] Modules linked in: btrfs zstd_compress intel_rapl x86_pkg_temp_thermal intel_powerclamp coretemp kvm_intel kvm irqbypass ppdev input_leds intel_cstate joydev intel_rapl_perf intel_pch_thermal parport_pc ipmi_si parport lpc_ich mac_hid ipmi_devintf ipmi_msghandler sch_fq_codel ib_iser rdma_cm iw_cm ib_cm ib_core iscsi_tcp libiscsi_tcp libiscsi scsi_transport_iscsi ip_tables x_tables autofs4 raid10 raid456 async_raid6_recov async_memcpy async_pq async_xor async_tx xor raid6_pq libcrc32c raid1 raid0 multipath linear i915 mgag200 crct10dif_pclmul crc32_pclmul ttm ghash_clmulni_intel pcbc igb drm_kms_helper hid_generic aesni_intel dca syscopyarea i2c_algo_bit sysfillrect aes_x86_64 sysimgblt fb_sys_fops crypto_simd ptp ahci usbhid glue_helper cryptd drm libahci hid pps_core video [last unloaded: zstd_compress]
[ 830.042166] CPU: 1 PID: 15933 Comm: fallocate Not tainted 4.15.0-1030-oem #35-Ubuntu
[ 830.042167] Hardware name: Intel Corporation S1200RP/S1200RP, BIOS S1200RP.86B.03.02.0003.070120151022 07/01/2015
[ 830.042176] RIP: 0010:btrfs_free_reserved_data_space_noquota+0xcb/0xe0 [btrfs]
[ 830.042177] RSP: 0018:ffffaa474a647d88 EFLAGS: 00010287
[ 830.042178] RAX: 0000000000000000 RBX: 0000000001400000 RCX: 0000000001400000
[ 830.042178] RDX: 0000000000000001 RSI: 0000000000000000 RDI: ffff8febd2814200
[ 830.042179] RBP: ffffaa474a647db0 R08: 0000000000027fc0 R09: ffffffffc0877688
[ 830.042180] R10: ffff8feb877f0000 R11: 0000000000000001 R12: ffff8febd2814200
[ 830.042180] R13: ffff8feb877f0000 R14: ffff8feb1ff25f40 R15: 0000000001400000
[ 830.042181] FS: 00007f7b7a10c540(0000) GS:ffff8febe0840000(0000) knlGS:0000000000000000
[ 830.042182] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[ 830.042183] CR2: 00007f7b79f4baa0 CR3: 000000045a996004 CR4: 00000000003606e0
[ 830.042184] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
[ 830.042184] DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
[ 830.042185] Call Trace:
[ 830.042194] btrfs_free_reserved_data_space+0x50/0x70 [btrfs]
[ 830.042205] btrfs_fallocate+0x3f8/0x750 [btrfs]
[ 830.042208] vfs_fallocate+0x144/0x260
[ 830.042209] SyS_fallocate+0x48/0x80
[ 830.042211] do_syscall_64+0x73/0x130
[ 830.042214] entry_SYSCALL_64_after_hwframe+0x3d/0xa2
[ 830.042215] RIP: 0033:0x7f7b79c13857
[ 830.042215] RSP: 002b:00007ffc1ad01498 EFLAGS: 00000246 ORIG_RAX: 000000000000011d
[ 830.042216] RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 00007f7b79c13857
[ 830.042217] RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000000008
[ 830.042217] RBP: 0000000000000004 R08: 0000000000000000 R09: 0000000000000000
[ 830.042218] R10: 0000000001400000 R11: 0000000000000246 R12: 00007ffc1ad016c8
[ 830.042219] R13: 0000000000000000 R14: 0000000000000000 R15: 0000000001400000
[ 830.042219] Code: c7 49 8b 7f 08 49 83 c7 18 45 31 c9 49 89 d8 4c 89 f1 48 c7 c2 d5 5a 8e c0 4c 89 ee e8 6f 88 7c fc 4d 8b 17 4d 85 d2 75 d8 eb 97 <0f> 0b 49 c7 44 24 28 00 00 00 00 eb 85 0f 1f 84 00 00 00 00 00
[ 830.042240] ---[ end trace 4a601597480dd14c ]---
[ 830.208479] Test 6113077cd319e747875ec71227d2b5cb54e08c76 returned 0

FAIL: 6113077cd319e747875ec71227d2b5cb54e08c76 (ret=1)

ProblemType: Bug
DistroRelease: Ubuntu 18.04
Package: linux-image-4.15.0-43-generic 4.15.0-43.46
ProcVersionSignature: User Name 4.15.0-43.46-generic 4.15.18
Uname: Linux 4.15.0-43-generic x86_64
AlsaDevices:
 total 0
 crw-rw---- 1 root audio 116, 1 Dec 31 02:11 seq
 crw-rw---- 1 root audio 116, 33 Dec 31 02:11 timer
AplayDevices: Error: [Errno 2] No such file or directory: 'aplay': 'aplay'
ApportVersion: 2.20.9-0ubuntu7.5
Architecture: amd64
ArecordDevices: Error: [Errno 2] No such file or directory: 'arecord': 'arecord'
AudioDevicesInUse: Error: command ['fuser', '-v', '/dev/snd/seq', '/dev/snd/timer'] failed with exit code 1:
Date: Thu Jan 3 08:14:38 2019
IwConfig: Error: [Errno 2] No such file or directory: 'iwconfig': 'iwconfig'
Lsusb: Bus 001 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
MachineType: QEMU Standard PC (i440FX + PIIX, 1996)
PciMultimedia:

ProcFB: 0 cirrusdrmfb
ProcKernelCmdLine: BOOT_IMAGE=/boot/vmlinuz-4.15.0-43-generic root=UUID=2f68c627-8ab4-40d5-8c06-6563436d0f96 ro console=ttyS0,115200n8
RelatedPackageVersions:
 linux-restricted-modules-4.15.0-43-generic N/A
 linux-backports-modules-4.15.0-43-generic N/A
 linux-firmware 1.173.2
RfKill: Error: [Errno 2] No such file or directory: 'rfkill': 'rfkill'
SourcePackage: linux
UpgradeStatus: No upgrade log present (probably fresh install)
dmi.bios.date: 04/01/2014
dmi.bios.vendor: SeaBIOS
dmi.bios.version: Ubuntu-1.8.2-1ubuntu1
dmi.chassis.type: 1
dmi.chassis.vendor: QEMU
dmi.chassis.version: pc-i440fx-xenial
dmi.modalias: dmi:bvnSeaBIOS:bvrUbuntu-1.8.2-1ubuntu1:bd04/01/2014:svnQEMU:pnStandardPC(i440FX+PIIX,1996):pvrpc-i440fx-xenial:cvnQEMU:ct1:cvrpc-i440fx-xenial:
dmi.product.name: Standard PC (i440FX + PIIX, 1996)
dmi.product.version: pc-i440fx-xenial
dmi.sys.vendor: QEMU

Revision history for this message
Po-Hsu Lin (cypressyew) wrote :
Revision history for this message
Ubuntu Kernel Bot (ubuntu-kernel-bot) wrote : Status changed to Confirmed

This change was made by a bot.

Changed in linux (Ubuntu):
status: New → Confirmed
Po-Hsu Lin (cypressyew)
summary: 6113077cd319e747875ec71227d2b5cb54e08c76 in btrfs_kernel_fixes failed
- on T
+ on B
description: updated
Revision history for this message
Po-Hsu Lin (cypressyew) wrote : Re: 6113077cd319e747875ec71227d2b5cb54e08c76 in btrfs_kernel_fixes failed on B

This issue could be found on a SUT with 1TB disk space.

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

Spotted on Cosmic.

tags: added: cosmic
summary: 6113077cd319e747875ec71227d2b5cb54e08c76 in btrfs_kernel_fixes failed
- on B
+ on B/C/D
Revision history for this message
Po-Hsu Lin (cypressyew) wrote :
Changed in ubuntu-kernel-tests:
status: New → Fix Released
Brad Figg (brad-figg)
tags: added: cscc
Steve Langasek (vorlon)
Changed in linux (Ubuntu Disco):
status: Confirmed → Won't Fix
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.