quotactl04 from ubuntu_ltp_syscalls failed with B

Bug #1868665 reported by Po-Hsu Lin
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
ubuntu-kernel-tests
Fix Released
Undecided
Po-Hsu Lin
linux (Ubuntu)
Fix Released
Undecided
Unassigned
Bionic
Fix Released
Undecided
Po-Hsu Lin

Bug Description

== SRU Justification ==
Commit d65d87a07476 ("ext4: improve explanation of a mount failure
caused by a misconfigured kernel") applied to our Bionic tree via the
stable-update process does not consider the situation when quota support
was configured as a module.

This will cause failure to quotactl04 test from ubuntu_ltp_syscalls:
  <<<test_start>>>
  tag=quotactl04 stime=1585032076
  cmdline="quotactl04"
  contacts=""
  analysis=exit
  <<<test_output>>>
  incrementing stop
  tst_kconfig.c:62: INFO: Parsing kernel config '/boot/config-4.15.0-92-generic'
  tst_device.c:244: INFO: Using test device LTP_DEV='/dev/loop0'
  tst_test.c:1229: INFO: Timeout per run is 0h 05m 00s
  tst_mkfs.c:90: INFO: Formatting /dev/loop0 with ext4 opts='' extra opts='-O quota,project'
  mke2fs 1.44.1 (24-Mar-2018)
  safe_macros.c:769: BROK: quotactl04.c:109: mount(/dev/loop0, mntpoint, ext4, 0, 0x55edd2c1ab1d) failed: EINVAL (22)

  Summary:
  passed 0
  failed 0
  skipped 0
  warnings 0
  <<<execution_status>>>
  initiation_status="ok"
  duration=2 termination_type=exited termination_id=2 corefile=no
  cutime=0 cstime=2
  <<<test_end>>>

And from the syslog you will see:
  LTP: starting quotactl04
  EXT4-fs (loop0): The kernel was not built with CONFIG_QUOTA and CONFIG_QFMT_V2

== Fix ==
* 9db176bceb5c ("ext4: fix mount failure with quota configured as module")

This patch can be cherry-picked into Bionic and it's already in Focal.

I didn't see commit d65d87a07476 in Eoan / Disco, so I think they don't
need this patch.

== Test ==
Test kernel could be found here:
https://people.canonical.com/~phlin/kernel/lp-1868665-quota-module/

Tested with the quotactl04 test from ubuntu_ltp_syscalls and it has
passed as expected.

== Regression Potential ==
Low, this patch is specific to ext4 quota support. And it's just using
a more general way to do the check.

== Original Bug Report ==
Issue found on Bionic 4.15.0-92-generic
Manually verified with 4.15.0-91, this issue does not exist.

Result for 4.15.0-92:
<<<test_start>>>
tag=quotactl04 stime=1585032076
cmdline="quotactl04"
contacts=""
analysis=exit
<<<test_output>>>
incrementing stop
tst_kconfig.c:62: INFO: Parsing kernel config '/boot/config-4.15.0-92-generic'
tst_device.c:244: INFO: Using test device LTP_DEV='/dev/loop0'
tst_test.c:1229: INFO: Timeout per run is 0h 05m 00s
tst_mkfs.c:90: INFO: Formatting /dev/loop0 with ext4 opts='' extra opts='-O quota,project'
mke2fs 1.44.1 (24-Mar-2018)
safe_macros.c:769: BROK: quotactl04.c:109: mount(/dev/loop0, mntpoint, ext4, 0, 0x55edd2c1ab1d) failed: EINVAL (22)

Summary:
passed 0
failed 0
skipped 0
warnings 0
<<<execution_status>>>
initiation_status="ok"
duration=2 termination_type=exited termination_id=2 corefile=no
cutime=0 cstime=2
<<<test_end>>>

Syslog for 4.15.0-92:
Mar 24 06:40:31 larry kernel: [ 135.916625] LTP: starting quotactl04
Mar 24 06:40:32 larry kernel: [ 136.163837] EXT4-fs (loop0): The kernel was not built with CONFIG_QUOTA and CONFIG_QFMT_V2

Result for 4.15.0-91:
<<<test_start>>>
tag=quotactl04 stime=1585031743
cmdline="quotactl04"
contacts=""
analysis=exit
<<<test_output>>>
tst_kconfig.c:62: INFO: Parsing kernel config '/boot/config-4.15.0-91-generic'
tst_device.c:244: INFO: Using test device LTP_DEV='/dev/loop1'
tst_test.c:1229: INFO: Timeout per run is 0h 05m 00s
tst_mkfs.c:90: INFO: Formatting /dev/loop1 with ext4 opts='' extra opts='-O quota,project'
mke2fs 1.44.1 (24-Mar-2018)
quotactl04.c:127: INFO: Test #0: QCMD(Q_QUOTAON, PRJQUOTA)
quotactl04.c:142: PASS: quotactl succeeded to turn on quota for project
quotactl04.c:127: INFO: Test #1: QCMD(Q_SETQUOTA, PRJQUOTA)
quotactl04.c:142: PASS: quotactl succeeded to set disk quota limit for project
quotactl04.c:127: INFO: Test #2: QCMD(Q_GETQUOTA, PRJQUOTA)
quotactl04.c:142: PASS: quotactl succeeded to get disk quota limit for project
quotactl04.c:127: INFO: Test #3: QCMD(Q_SETINFO, PRJQUOTA
quotactl04.c:142: PASS: quotactl succeeded to set information about quotafile for project
quotactl04.c:127: INFO: Test #4: QCMD(Q_GETINFO, PRJQUOTA
quotactl04.c:142: PASS: quotactl succeeded to get information about quotafile for project
quotactl04.c:127: INFO: Test #5: QCMD(Q_GETFMT, PRJQUOTA)
quotactl04.c:142: PASS: quotactl succeeded to get quota format for project
quotactl04.c:127: INFO: Test #6: QCMD(Q_GETNEXTQUOTA, PRJQUOTA)
quotactl04.c:142: PASS: quotactl succeeded to get next disk quota limit for project
quotactl04.c:127: INFO: Test #7: QCMD(Q_QUOTAOFF, PRJQUOTA)
quotactl04.c:142: PASS: quotactl succeeded to turn off quota for project

Summary:
passed 8
failed 0
skipped 0
warnings 0
<<<execution_status>>>
initiation_status="ok"
duration=0 termination_type=exited termination_id=0 corefile=no
cutime=0 cstime=2
<<<test_end>>>

Syslog for 4.15.0-91:
Mar 24 06:35:43 larry kernel: [ 845.408249] LTP: starting quotactl04
Mar 24 06:35:43 larry kernel: [ 845.692112] EXT4-fs (loop1): mounted filesystem with ordered data mode. Opts: quota

ProblemType: Bug
DistroRelease: Ubuntu 18.04
Package: linux-image-4.15.0-92-generic 4.15.0-92.93
ProcVersionSignature: User Name 4.15.0-92.93-generic 4.15.18
Uname: Linux 4.15.0-92-generic x86_64
AlsaDevices:
 total 0
 crw-rw---- 1 root audio 116, 1 Mar 24 06:38 seq
 crw-rw---- 1 root audio 116, 33 Mar 24 06:38 timer
AplayDevices: Error: [Errno 2] No such file or directory: 'aplay': 'aplay'
ApportVersion: 2.20.9-0ubuntu7.12
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: Tue Mar 24 06:42:01 2020
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:

ProcEnviron:
 TERM=xterm-256color
 PATH=(custom, no user)
 XDG_RUNTIME_DIR=<set>
 LANG=C.UTF-8
 SHELL=/bin/bash
ProcFB: 0 cirrusdrmfb
ProcKernelCmdLine: BOOT_IMAGE=/boot/vmlinuz-4.15.0-92-generic root=UUID=29438a95-0e7a-484b-a1fb-527f0e3d2e06 ro console=tty1 console=ttyS0
RelatedPackageVersions:
 linux-restricted-modules-4.15.0-92-generic N/A
 linux-backports-modules-4.15.0-92-generic N/A
 linux-firmware 1.173.16
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: 1.10.2-1ubuntu1
dmi.chassis.type: 1
dmi.chassis.vendor: QEMU
dmi.chassis.version: pc-i440fx-bionic
dmi.modalias: dmi:bvnSeaBIOS:bvr1.10.2-1ubuntu1:bd04/01/2014:svnQEMU:pnStandardPC(i440FX+PIIX,1996):pvrpc-i440fx-bionic:cvnQEMU:ct1:cvrpc-i440fx-bionic:
dmi.product.name: Standard PC (i440FX + PIIX, 1996)
dmi.product.version: pc-i440fx-bionic
dmi.sys.vendor: QEMU

Revision history for this message
Po-Hsu Lin (cypressyew) wrote :
tags: added: 4.15 kqa-blocker sru-20200316 ubuntu-ltp-syscalls
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
Revision history for this message
Po-Hsu Lin (cypressyew) wrote :

It looks like this is the cause in master-next of ubuntu-bionic:
86cd0ee502bd2f16f331bf26cb434f45ac69b21f
ext4: improve explanation of a mount failure caused by a misconfigured kernel

This issue happens when quota was configured as a module, looks like this is the upstream fix:
9db176bceb5c5df4990486709da386edadc6bd1d
ext4: fix mount failure with quota configured as module

Changed in ubuntu-kernel-tests:
assignee: nobody → Po-Hsu Lin (cypressyew)
status: New → In Progress
Changed in linux (Ubuntu):
status: Confirmed → In Progress
assignee: nobody → Po-Hsu Lin (cypressyew)
Changed in linux (Ubuntu Bionic):
assignee: nobody → Po-Hsu Lin (cypressyew)
status: New → In Progress
Revision history for this message
Po-Hsu Lin (cypressyew) wrote :

A test kernel built with the fix in comment #3, it works as expected.
https://people.canonical.com/~phlin/kernel/lp-1868665-quota-module/

I will SRU this patch later.

Po-Hsu Lin (cypressyew)
Changed in linux (Ubuntu):
status: In Progress → Fix Released
Revision history for this message
Po-Hsu Lin (cypressyew) wrote :
description: updated
Po-Hsu Lin (cypressyew)
Changed in linux (Ubuntu):
assignee: Po-Hsu Lin (cypressyew) → nobody
Changed in linux (Ubuntu Bionic):
status: In Progress → Fix Committed
Revision history for this message
Ubuntu Kernel Bot (ubuntu-kernel-bot) wrote :

This bug is awaiting verification that the kernel in -proposed solves the problem. Please test the kernel and update this bug with the results. If the problem is solved, change the tag 'verification-needed-bionic' to 'verification-done-bionic'. If the problem still exists, change the tag 'verification-needed-bionic' to 'verification-failed-bionic'.

If verification is not done by 5 working days from today, this fix will be dropped from the source code, and this bug will be closed.

See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Thank you!

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

Test passed with 4.15.0-94.95

01:10:42 DEBUG| [stdout] startup='Fri Mar 27 00:58:27 2020'
01:10:42 DEBUG| [stdout] tst_kconfig.c:62: INFO: Parsing kernel config '/boot/config-4.15.0-94-generic'
01:10:42 DEBUG| [stdout] tst_device.c:244: INFO: Using test device LTP_DEV='/dev/loop0'
01:10:42 DEBUG| [stdout] tst_test.c:1229: INFO: Timeout per run is 0h 05m 00s
01:10:42 DEBUG| [stdout] tst_mkfs.c:90: INFO: Formatting /dev/loop0 with ext4 opts='' extra opts='-O quota,project'
01:10:42 DEBUG| [stdout] mke2fs 1.44.1 (24-Mar-2018)
01:10:42 DEBUG| [stdout] quotactl04.c:127: INFO: Test #0: QCMD(Q_QUOTAON, PRJQUOTA)
01:10:42 DEBUG| [stdout] quotactl04.c:142: PASS: quotactl succeeded to turn on quota for project
01:10:42 DEBUG| [stdout] quotactl04.c:127: INFO: Test #1: QCMD(Q_SETQUOTA, PRJQUOTA)
01:10:42 DEBUG| [stdout] quotactl04.c:142: PASS: quotactl succeeded to set disk quota limit for project
01:10:42 DEBUG| [stdout] quotactl04.c:127: INFO: Test #2: QCMD(Q_GETQUOTA, PRJQUOTA)
01:10:42 DEBUG| [stdout] quotactl04.c:142: PASS: quotactl succeeded to get disk quota limit for project
01:10:42 DEBUG| [stdout] quotactl04.c:127: INFO: Test #3: QCMD(Q_SETINFO, PRJQUOTA
01:10:42 DEBUG| [stdout] quotactl04.c:142: PASS: quotactl succeeded to set information about quotafile for project
01:10:42 DEBUG| [stdout] quotactl04.c:127: INFO: Test #4: QCMD(Q_GETINFO, PRJQUOTA
01:10:42 DEBUG| [stdout] quotactl04.c:142: PASS: quotactl succeeded to get information about quotafile for project
01:10:42 DEBUG| [stdout] quotactl04.c:127: INFO: Test #5: QCMD(Q_GETFMT, PRJQUOTA)
01:10:42 DEBUG| [stdout] quotactl04.c:142: PASS: quotactl succeeded to get quota format for project
01:10:42 DEBUG| [stdout] quotactl04.c:127: INFO: Test #6: QCMD(Q_GETNEXTQUOTA, PRJQUOTA)
01:10:42 DEBUG| [stdout] quotactl04.c:142: PASS: quotactl succeeded to get next disk quota limit for project
01:10:42 DEBUG| [stdout] quotactl04.c:127: INFO: Test #7: QCMD(Q_QUOTAOFF, PRJQUOTA)
01:10:42 DEBUG| [stdout] quotactl04.c:142: PASS: quotactl succeeded to turn off quota for project
01:10:42 DEBUG| [stdout]
01:10:42 DEBUG| [stdout] Summary:
01:10:42 DEBUG| [stdout] passed 8
01:10:42 DEBUG| [stdout] failed 0
01:10:42 DEBUG| [stdout] skipped 0
01:10:42 DEBUG| [stdout] warnings 0

tags: added: verification-done-bionic
removed: verification-needed-bionic
Changed in ubuntu-kernel-tests:
status: In Progress → Fix Released
Sean Feole (sfeole)
Changed in linux (Ubuntu Bionic):
status: Fix Committed → Fix Released
tags: removed: kqa-blocker
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.