debian/tests/corosync: gfs2_jadd fails with ENOTTY for i386 package on amd64 kernel

Bug #1859827 reported by Mauricio Faria de Oliveira
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
gfs2-utils (Ubuntu)
Invalid
Undecided
Unassigned
Eoan
Invalid
Undecided
Unassigned
Focal
Invalid
Undecided
Unassigned
linux (Ubuntu)
Fix Released
Medium
Mauricio Faria de Oliveira
Eoan
Fix Released
Medium
Mauricio Faria de Oliveira
Focal
Fix Released
Medium
Mauricio Faria de Oliveira

Bug Description

[Impact]

 * The gfs2_jadd command (used in debian/tests/corosync)
   fails with ENOTTY ("Inappropriate ioctl for device")
   when the i386 packages are run on an amd64 kernel.

 * The i386 kernel is gone, only amd64 is available.

 * The fix introduces the compat ioctl()s for gfs2,
   which landed in v5.5-rc1 thus not in Eoan/Focal.

[Test Case]

 * The test steps are detailed in comment #2
   based on gfs2-utils:debian/tests/corosync,
   modified to be simpler and to fail either
   with ENOTTY (failure) or ENOSPC (success).

[Regression Potential]

 * The previous surface for this problem is
   likely low, as i386 arch installs (which
   is not as popular/widely used as amd64
   nowadays) probably used the i386 kernel.

 * The amd64-only kernel version released
   is 5.3.0-17.18 dated 2019-10-10; gives
   ~3 month window to mid January 2020.

 * So, behavior changes could theoretically
   be seen on i386 installs with the newer
   kernel which is amd64-only, where gfs2-utils
   failed with ENOTTY and now is working fine
   or failing differently (e.g. see test-case).

[Original Description]

The gfs2_jadd command (used in debian/tests/corosync)
fails with ENOTTY ("Inappropriate ioctl for device")
when the i386 packages are run on an amd64 kernel.

The i386 kernel has gone away, only amd64 is available:

- The i386 kernel build is dropped as of 5.3.0-15.16:
  * Drop i386 build for 19.10 (LP: #1845714)

- Only linux-libc-dev:i386 is still built as of 5.3.0-17.18
  * Re-enable linux-libc-dev build on i386 (LP: #1846508)

The last passing autopkgtests for gfs2-utils:i386 are on 5.3.0-13.14 built for i386.
The same kernel version built for amd64 _fails_.
(so it's potentially user/kernel interface, or kernel-only.)

- i386/i686)

# uname -rvm
5.3.0-13-generic #14-Ubuntu SMP Tue Sep 24 02:43:47 UTC 2019 i686

root@sf256930ei:~# gfs2_jadd -j 1 /mnt
Filesystem: /mnt
Old journals: 2
New journals: 3

- amd64/x86_64)

# uname -rvm
5.3.0-13-generic #14-Ubuntu SMP Tue Sep 24 02:46:08 UTC 2019 x86_64

# gfs2_jadd -j 1 /mnt
GETFLAGS: Inappropriate ioctl for device

Changed in gfs2-utils (Ubuntu):
status: New → Confirmed
importance: Undecided → Medium
assignee: nobody → Mauricio Faria de Oliveira (mfo)
Changed in gfs2-utils (Ubuntu Eoan):
status: New → Confirmed
importance: Undecided → Medium
assignee: nobody → Mauricio Faria de Oliveira (mfo)
Revision history for this message
Mauricio Faria de Oliveira (mfo) wrote :

This issue should be fixed with linux commit 8d0980704842 ("gfs2: add compat_ioctl support") [1] introduced in v5.5-rc1 which adds handling for ioctl FS_IOC32_GETFLAGS and FS_IOC32_SETFLAGS.
Kicking a test build.

$ git describe --contains 8d0980704842e
v5.5-rc1~101^2~14

[1] https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=8d0980704842e

Revision history for this message
Mauricio Faria de Oliveira (mfo) wrote :

Test Environment:
---

Eoan/Focal amd64 kernel on i386 dpkg arch.

$ dpkg-architecture | grep DEB_HOST_ARCH=
DEB_HOST_ARCH=i386

$ uname -m
x86_64

Test Steps:
---

apt install -y gfs2-utils corosync dlm-controld linux-modules-extra-$(uname -r)

corosync-quorumtool -e 1
systemctl restart dlm.service

DISK=disk.img
dd if=/dev/zero of=$DISK bs=1M count=128 2>&1
LOOP=$(losetup --find --show $DISK)

mkfs.gfs2 -p lock_dlm -t debian:test -J 32 -j 2 -O $LOOP
mount $LOOP /mnt

gfs2_jadd -j 1 /mnt

Note:
The 'gfs2_jadd' command either fails with ENOTTY upfront or goes on.
For a simple test let's make it fail with ENOSPC instead.

Revision history for this message
Mauricio Faria de Oliveira (mfo) wrote :

Test on Eoan:
---

Before:

# uname -rv
5.3.0-27-generic #29-Ubuntu SMP Thu Jan 9 01:36:10 UTC 2020

gfs2_jadd -j 1 /mnt
GETFLAGS: Inappropriate ioctl for device

After:

# uname -rv
5.3.0-27-generic #29+gfs2compatioctl SMP Wed Jan 15 13:56:12 UTC 2020

# gfs2_jadd -j 1 /mnt
add_j: No space left on device

Revision history for this message
Mauricio Faria de Oliveira (mfo) wrote :

Test on Focal:
---

Before:

# uname -rv
5.4.0-9-generic #12-Ubuntu SMP Mon Dec 16 22:34:19 UTC 2019

# gfs2_jadd -j 1 /mnt
GETFLAGS: Inappropriate ioctl for device

After:

# uname -rv
5.4.0-11-generic #14+gfs2compatioctl.1 SMP Wed Jan 15 13:40:46 UTC 2020

# gfs2_jadd -j 1 /mnt
add_j: No space left on device

description: updated
description: updated
description: updated
description: updated
description: updated
Changed in gfs2-utils (Ubuntu Eoan):
status: Confirmed → In Progress
Changed in gfs2-utils (Ubuntu Focal):
status: Confirmed → In Progress
description: updated
Revision history for this message
Mauricio Faria de Oliveira (mfo) wrote :
Revision history for this message
Rafael David Tinoco (rafaeldtinoco) wrote :

Very nice! Thanks Mauricio!

Should we flag this bug to linux instead of gfs2-utils ?

Revision history for this message
Mauricio Faria de Oliveira (mfo) wrote :

Rafael, oh indeed; I missed updating the affected packages. Thanks for catching that! Done.

Changed in linux (Ubuntu Eoan):
status: New → In Progress
importance: Undecided → Medium
assignee: nobody → Mauricio Faria de Oliveira (mfo)
Changed in linux (Ubuntu Focal):
status: New → In Progress
importance: Undecided → Medium
assignee: nobody → Mauricio Faria de Oliveira (mfo)
Changed in gfs2-utils (Ubuntu Eoan):
status: In Progress → Invalid
importance: Medium → Undecided
assignee: Mauricio Faria de Oliveira (mfo) → nobody
Changed in gfs2-utils (Ubuntu Focal):
status: In Progress → Invalid
importance: Medium → Undecided
assignee: Mauricio Faria de Oliveira (mfo) → nobody
Seth Forshee (sforshee)
Changed in linux (Ubuntu Focal):
status: In Progress → Fix Committed
Changed in linux (Ubuntu Eoan):
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-eoan' to 'verification-done-eoan'. If the problem still exists, change the tag 'verification-needed-eoan' to 'verification-failed-eoan'.

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-eoan
Revision history for this message
Mauricio Faria de Oliveira (mfo) wrote :

Verification done on Eoan.
The gfs2_jadd i386 command on amd64 kernel no longer fails with ENOTTY upfront.

# lsb_release -cs
eoan

# dpkg --print-architecture
i386

# uname -m
x86_64

# uname -rv
5.3.0-40-generic #32-Ubuntu SMP Fri Jan 31 20:24:34 UTC 2020

# apt-cache madison linux-image-5.3.0-40-generic
linux-image-5.3.0-40-generic:amd64 | 5.3.0-40.32 | http://archive.ubuntu.com/ubuntu eoan-proposed/main amd64 Packages

# apt install -y gfs2-utils corosync dlm-controld linux-modules-extra-$(uname -r)

# corosync-quorumtool -e 1
# systemctl restart dlm.service

# DISK=disk.img
# dd if=/dev/zero of=$DISK bs=1M count=128 2>&1
# LOOP=$(losetup --find --show $DISK)

# mkfs.gfs2 -p lock_dlm -t debian:test -J 32 -j 2 -O $LOOP
# mount $LOOP /mnt

# gfs2_jadd -j 1 /mnt
add_j: No space left on device

tags: added: verification-done-eoan
removed: verification-needed-eoan
Revision history for this message
Launchpad Janitor (janitor) wrote :
Download full text (78.1 KiB)

This bug was fixed in the package linux - 5.3.0-40.32

---------------
linux (5.3.0-40.32) eoan; urgency=medium

  * eoan/linux: 5.3.0-40.32 -proposed tracker (LP: #1861214)

  * No sof soundcard for 'ASoC: CODEC DAI intel-hdmi-hifi1 not registered' after
    modprobe sof (LP: #1860248)
    - ASoC: SOF: Intel: fix HDA codec driver probe with multiple controllers

  * ocfs2-tools is causing kernel panics in Ubuntu Focal (Ubuntu-5.4.0-9.12)
    (LP: #1852122)
    - ocfs2: fix the crash due to call ocfs2_get_dlm_debug once less

  * QAT drivers for C3XXX and C62X not included as modules (LP: #1845959)
    - [Config] CRYPTO_DEV_QAT_C3XXX=m, CRYPTO_DEV_QAT_C62X=m and
      CRYPTO_DEV_QAT_DH895xCC=m

  * Eoan update: upstream stable patchset 2020-01-24 (LP: #1860816)
    - scsi: lpfc: Fix discovery failures when target device connectivity bounces
    - scsi: mpt3sas: Fix clear pending bit in ioctl status
    - scsi: lpfc: Fix locking on mailbox command completion
    - Input: atmel_mxt_ts - disable IRQ across suspend
    - f2fs: fix to update time in lazytime mode
    - iommu: rockchip: Free domain on .domain_free
    - iommu/tegra-smmu: Fix page tables in > 4 GiB memory
    - dmaengine: xilinx_dma: Clear desc_pendingcount in xilinx_dma_reset
    - scsi: target: compare full CHAP_A Algorithm strings
    - scsi: lpfc: Fix SLI3 hba in loop mode not discovering devices
    - scsi: csiostor: Don't enable IRQs too early
    - scsi: hisi_sas: Replace in_softirq() check in hisi_sas_task_exec()
    - powerpc/pseries: Mark accumulate_stolen_time() as notrace
    - powerpc/pseries: Don't fail hash page table insert for bolted mapping
    - powerpc/tools: Don't quote $objdump in scripts
    - dma-debug: add a schedule point in debug_dma_dump_mappings()
    - leds: lm3692x: Handle failure to probe the regulator
    - clocksource/drivers/asm9260: Add a check for of_clk_get
    - clocksource/drivers/timer-of: Use unique device name instead of timer
    - powerpc/security/book3s64: Report L1TF status in sysfs
    - powerpc/book3s64/hash: Add cond_resched to avoid soft lockup warning
    - ext4: update direct I/O read lock pattern for IOCB_NOWAIT
    - ext4: iomap that extends beyond EOF should be marked dirty
    - jbd2: Fix statistics for the number of logged blocks
    - scsi: tracing: Fix handling of TRANSFER LENGTH == 0 for READ(6) and WRITE(6)
    - scsi: lpfc: Fix duplicate unreg_rpi error in port offline flow
    - f2fs: fix to update dir's i_pino during cross_rename
    - clk: qcom: Allow constant ratio freq tables for rcg
    - clk: clk-gpio: propagate rate change to parent
    - irqchip/irq-bcm7038-l1: Enable parent IRQ if necessary
    - irqchip: ingenic: Error out if IRQ domain creation failed
    - fs/quota: handle overflows of sysctl fs.quota.* and report as unsigned long
    - scsi: lpfc: fix: Coverity: lpfc_cmpl_els_rsp(): Null pointer dereferences
    - PCI: rpaphp: Fix up pointer to first drc-info entry
    - scsi: ufs: fix potential bug which ends in system hang
    - powerpc/pseries/cmm: Implement release() function for sysfs device
    - PCI: rpaphp: Don't rely on firmware feature to imply drc-info support
    - PCI: rpaphp: Annotate and corr...

Changed in linux (Ubuntu Eoan):
status: Fix Committed → Fix Released
Revision history for this message
Launchpad Janitor (janitor) wrote :
Download full text (81.5 KiB)

This bug was fixed in the package linux - 5.4.0-18.22

---------------
linux (5.4.0-18.22) focal; urgency=medium

  * focal/linux: 5.4.0-18.22 -proposed tracker (LP: #1866488)

  * Packaging resync (LP: #1786013)
    - [Packaging] resync getabis
    - [Packaging] update helper scripts

  * Add sysfs attribute to show remapped NVMe (LP: #1863621)
    - SAUCE: ata: ahci: Add sysfs attribute to show remapped NVMe device count

  * [20.04 FEAT] Compression improvements in Linux kernel (LP: #1830208)
    - lib/zlib: add s390 hardware support for kernel zlib_deflate
    - s390/boot: rename HEAP_SIZE due to name collision
    - lib/zlib: add s390 hardware support for kernel zlib_inflate
    - s390/boot: add dfltcc= kernel command line parameter
    - lib/zlib: add zlib_deflate_dfltcc_enabled() function
    - btrfs: use larger zlib buffer for s390 hardware compression
    - [Config] Introducing s390x specific kernel config option CONFIG_ZLIB_DFLTCC

  * [UBUNTU 20.04] s390x/pci: increase CONFIG_PCI_NR_FUNCTIONS to 512 in kernel
    config (LP: #1866056)
    - [Config] Increase CONFIG_PCI_NR_FUNCTIONS from 64 to 512 starting with focal
      on s390x

  * CONFIG_IP_MROUTE_MULTIPLE_TABLES is not set (LP: #1865332)
    - [Config] CONFIG_IP_MROUTE_MULTIPLE_TABLES=y

  * Dell XPS 13 9300 Intel 1650S wifi [34f0:1651] fails to load firmware
    (LP: #1865962)
    - iwlwifi: remove IWL_DEVICE_22560/IWL_DEVICE_FAMILY_22560
    - iwlwifi: 22000: fix some indentation
    - iwlwifi: pcie: rx: use rxq queue_size instead of constant
    - iwlwifi: allocate more receive buffers for HE devices
    - iwlwifi: remove some outdated iwl22000 configurations
    - iwlwifi: assume the driver_data is a trans_cfg, but allow full cfg

  * [FOCAL][REGRESSION] Intel Gen 9 brightness cannot be controlled
    (LP: #1861521)
    - Revert "USUNTU: SAUCE: drm/i915: Force DPCD backlight mode on Dell Precision
      4K sku"
    - Revert "UBUNTU: SAUCE: drm/i915: Force DPCD backlight mode on X1 Extreme 2nd
      Gen 4K AMOLED panel"
    - SAUCE: drm/dp: Introduce EDID-based quirks
    - SAUCE: drm/i915: Force DPCD backlight mode on X1 Extreme 2nd Gen 4K AMOLED
      panel
    - SAUCE: drm/i915: Force DPCD backlight mode for some Dell CML 2020 panels

  * [20.04 FEAT] Enable proper kprobes on ftrace support (LP: #1865858)
    - s390/ftrace: save traced function caller
    - s390: support KPROBES_ON_FTRACE

  * alsa/sof: load different firmware on different platforms (LP: #1857409)
    - ASoC: SOF: Intel: hda: use fallback for firmware name
    - ASoC: Intel: acpi-match: split CNL tables in three
    - ASoC: SOF: Intel: Fix CFL and CML FW nocodec binary names.

  * [UBUNTU 20.04] Enable CONFIG_NET_SWITCHDEV in kernel config for s390x
    starting with focal (LP: #1865452)
    - [Config] Enable CONFIG_NET_SWITCHDEV in kernel config for s390x starting
      with focal

  * Focal update: v5.4.24 upstream stable release (LP: #1866333)
    - io_uring: grab ->fs as part of async offload
    - EDAC: skx_common: downgrade message importance on missing PCI device
    - net: dsa: b53: Ensure the default VID is untagged
    - net: fib_rules: Correctly set table field when table number exceeds 8 bit...

Changed in linux (Ubuntu Focal):
status: Fix Committed → Fix Released
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.