Ubuntu 24.04 for Azure unable to run 32bit binaries

Bug #2071445 reported by Alberto
26
This bug affects 5 people
Affects Status Importance Assigned to Milestone
linux-azure (Ubuntu)
Triaged
Undecided
Unassigned
Noble
Fix Released
Undecided
Vinicius Peixoto
linux-signed-azure (Ubuntu)
Invalid
Undecided
Unassigned
linux-signed-azure-6.8 (Ubuntu)
Invalid
Undecided
Unassigned

Bug Description

[Impact]

## Issue details

The configuration of the kernel in linux-image-6.8.0-1008-azure is incompatible with the way libc6:i386 is built.
This leads to the error "The futex facility returned an unexpected error code." and application crash when trying to execute many 32bit applications in x86-64 machines.

In very short the issue is the following:
This kernel image is compiled with CONFIG_COMPAT_32BIT_TIME=n, unlike the vanilla Ubuntu 24.04 kernel images.
But, the glibc / libc6:i386 distributed with Ubuntu24.04 is compiled needing the syscalls enabled with that option.
i.e. **This kernel configuration is just incompatible with the provided glibc**

In detail:
glibc when built for 32bit, if not told which kernel is built for, will decide if the time_t value fits or not in a 32bit time_t, and do either the 32 or 64bit syscall:
https://sourceware.org/git/?p=glibc.git;a=blob;f=nptl/futex-internal.c;h=0bb1dd51f66802521afd71b9246222ed0ea0d862;hb=refs/heads/release/2.39/master#l90
calls with no deadline fit in the 32bit version, but as the kernel does not provide this syscall, glibc will just get a ENOSYS, and glibc will error out aborting the program
```
abort (abort.c:79)
__libc_message_impl.cold (libc_fatal.c:132)
__libc_fatal (libc_fatal.c:141)
futex_fatal_error (futex-internal.h:87)
__futex_abstimed_wait_common (futex-internal.c:119)
```
after printing "The futex facility returned an unexpected error code.\n":
https://sourceware.org/git/?p=glibc.git;a=blob;f=sysdeps/nptl/futex-internal.h;h=0e87e92d15ab92f5069463719a494e97d9800431;hb=refs/heads/release/2.39/master#l87

## Expected behavior:

* No crashes for 32bit applications with this kernel
* This kernel image built with CONFIG_COMPAT_32BIT_TIME=y

## Aditional info:

For reference, this is the current vanilla Ubuntu 24.04 kernel for x86_64 and this config:
```
$ uname -a
Linux <redacted> 6.8.0-35-generic #35-Ubuntu SMP PREEMPT_DYNAMIC Mon May 20 15:51:52 UTC 2024 x86_64 x86_64 x86_64 GNU/Linux
$ grep CONFIG_COMPAT_32BIT_TIME /boot/config-$(uname -r)
CONFIG_COMPAT_32BIT_TIME=y
```

On the other hand this is the kernel config for this kernel image:
```
Linux <> 6.8.0-1008-azure #8-Ubuntu SMP Fri May 17 10:44:55 UTC 2024 x86_64 x86_64 x86_64 GNU/Linux
# CONFIG_COMPAT_32BIT_TIME is not set
```

Related github issue (the issue was found in github ubuntu 24.04 runners)
https://github.com/actions/runner-images/issues/9977

[Fix]

Reenable COMPAT_32BIT_TIME

[Test Case]

See above.

[Where Problems Could Occur]

Disabling COMPAT_32BIT_TIME in Noble azure introduced a regression when running x86 binaries, so the fix is not expected to break anything (new).

Revision history for this message
Alberto (aescolar) wrote :

lsb_release -a:

Distributor ID: Ubuntu
Description: Ubuntu 24.04 LTS
Release: 24.04
Codename: noble

apt-cache policy linux-image-azure:

linux-image-azure:
  Installed: 6.8.0-1008.8
  Candidate: 6.8.0-1009.9
  Version table:
     6.8.0-1009.9 500
        500 http://azure.archive.ubuntu.com/ubuntu noble-updates/main amd64 Packages
        500 http://azure.archive.ubuntu.com/ubuntu noble-security/main amd64 Packages
 *** 6.8.0-1008.8 100
        100 /var/lib/dpkg/status
     6.8.0-1007.7 500
        500 http://azure.archive.ubuntu.com/ubuntu noble/main amd64 Packages

Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in linux-signed-azure (Ubuntu):
status: New → Confirmed
Crati (cratiport)
information type: Public → Public Security
information type: Public Security → Public
Juerg Haefliger (juergh)
Changed in linux-azure (Ubuntu):
status: New → Confirmed
Changed in linux-signed-azure (Ubuntu):
status: Confirmed → Invalid
Changed in linux-signed-azure-6.8 (Ubuntu):
status: New → Invalid
Changed in linux-raspi (Ubuntu):
status: New → Confirmed
Revision history for this message
M.Mücahid Benlioğlu (mbenlioglu) wrote :

linux-raspi version 6.8.0-1007.7 enables CONFIG_COMPAT_32BIT_TIME=y, which fixes this issue

Changed in linux-raspi (Ubuntu):
status: Confirmed → Fix Released
Revision history for this message
Alberto (aescolar) wrote :

Thanks for your help so far triaging this issue, juergh

Is there anything else we can do to motivate the issue to this kernel image maintainers or help understand the issue?

Thanks in advance

Juerg Haefliger (juergh)
description: updated
Revision history for this message
Juerg Haefliger (juergh) wrote :
Crati (cratiport)
description: updated
Juerg Haefliger (juergh)
Changed in linux-azure (Ubuntu):
status: Confirmed → Triaged
Changed in linux-azure (Ubuntu Noble):
status: New → Confirmed
Changed in linux-raspi (Ubuntu Noble):
status: New → Fix Released
Changed in linux-signed-azure (Ubuntu Noble):
status: New → Invalid
Changed in linux-signed-azure-6.8 (Ubuntu Noble):
status: New → Invalid
no longer affects: linux-raspi (Ubuntu)
no longer affects: linux-raspi (Ubuntu Noble)
no longer affects: linux-signed-azure (Ubuntu Noble)
no longer affects: linux-signed-azure-6.8 (Ubuntu Noble)
John Cabaj (john-cabaj)
Changed in linux-azure (Ubuntu Noble):
assignee: nobody → Vinicius Peixoto (vpeixoto)
John Cabaj (john-cabaj)
Changed in linux-azure (Ubuntu Noble):
status: Confirmed → Fix Committed
Revision history for this message
Ubuntu Kernel Bot (ubuntu-kernel-bot) wrote :

This bug is awaiting verification that the linux-azure/6.8.0-1012.14 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-noble-linux-azure' to 'verification-done-noble-linux-azure'. If the problem still exists, change the tag 'verification-needed-noble-linux-azure' to 'verification-failed-noble-linux-azure'.

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: kernel-spammed-noble-linux-azure-v2 verification-needed-noble-linux-azure
Revision history for this message
Alberto (aescolar) wrote (last edit ):

I just verified with linux-azure/6.8.0-1012.14 from proposed that the issue is corrected.
Both by inspecting the kconfig of the built kernel and by building and running a 32bit application with which the issue was triggered in 6.8.0-1010.

The application ran fine with 6.8.0-1012.14.

Thank you

tags: added: verification-done-noble-linux-azure
removed: verification-needed-noble-linux-azure
Revision history for this message
Launchpad Janitor (janitor) wrote :
Download full text (72.5 KiB)

This bug was fixed in the package linux-azure - 6.8.0-1012.14

---------------
linux-azure (6.8.0-1012.14) noble; urgency=medium

  * noble/linux-azure: 6.8.0-1012.14 -proposed tracker (LP: #2072175)

  * Packaging resync (LP: #1786013)
    - [Packaging] debian.azure/dkms-versions -- update from kernel-versions
      (main/2024.07.08)

  * Noble update: v6.8.9 upstream stable release (LP: #2070337)
    - [Config] azure: updateconfigs to drop CONSTRUCTORS for rust

  * Ubuntu 24.04 for Azure unable to run 32bit binaries (LP: #2071445)
    - [Config] azure: Revert "UBUNTU: [Config] azure: Disable
      CONFIG_COMPAT_32BIT_TIME"

  [ Ubuntu: 6.8.0-40.40 ]

  * noble/linux: 6.8.0-40.40 -proposed tracker (LP: #2072201)
  * FPS of glxgear with fullscreen is too low on MTL platform (LP: #2069380)
    - drm/i915: Bypass LMEMBAR/GTTMMADR for MTL stolen memory access
  * a critical typo in the code managing the ASPM settings for PCI Express
    devices (LP: #2071889)
    - PCI/ASPM: Restore parent state to parent, child state to child
  * [UBUNTU 24.04] IOMMU DMA mode changed in kernel config causes massive
    throughput degradation for PCI-related network workloads (LP: #2071471)
    - [Config] Set IOMMU_DEFAULT_DMA_STRICT=n and IOMMU_DEFAULT_DMA_LAZY=yes for
      s390x
  * UBSAN: array-index-out-of-bounds in
    /build/linux-D15vQj/linux-6.5.0/drivers/md/bcache/bset.c:1098:3
    (LP: #2039368)
    - bcache: fix variable length array abuse in btree_iter
  * Mute/mic LEDs and speaker no function on EliteBook 645/665 G11
    (LP: #2071296)
    - ALSA: hda/realtek: fix mute/micmute LEDs don't work for EliteBook 645/665
      G11.
  * failed to enable IPU6 camera sensor on kernel >= 6.8: ivsc_ace
    intel_vsc-5db76cf6-0a68-4ed6-9b78-0361635e2447: switch camera to host
    failed: -110 (LP: #2067364)
    - mei: vsc: Don't stop/restart mei device during system suspend/resume
    - SAUCE: media: ivsc: csi: don't count privacy on as error
    - SAUCE: media: ivsc: csi: add separate lock for v4l2 control handler
    - SAUCE: media: ivsc: csi: remove privacy status in struct mei_csi
    - SAUCE: mei: vsc: Enhance IVSC chipset stability during warm reboot
    - SAUCE: mei: vsc: Enhance SPI transfer of IVSC rom
    - SAUCE: mei: vsc: Utilize the appropriate byte order swap function
    - SAUCE: mei: vsc: Prevent timeout error with added delay post-firmware
      download
  * failed to probe camera sensor on Dell XPS 9315: ov01a10 i2c-OVTI01A0:00:
    failed to check hwcfg: -22 (LP: #2070251)
    - ACPI: utils: Make acpi_handle_path() not static
    - ACPI: property: Ignore bad graph port nodes on Dell XPS 9315
    - ACPI: property: Polish ignoring bad data nodes
    - ACPI: scan: Ignore camera graph port nodes on all Dell Tiger, Alder and
      Raptor Lake models
  * Update amd_sfh for AMD strix series (LP: #2058331)
    - HID: amd_sfh: Increase sensor command timeout
    - HID: amd_sfh: Improve boot time when SFH is available
    - HID: amd_sfh: Extend MP2 register access to SFH
    - HID: amd_sfh: Set the AMD SFH driver to depend on x86
  * RFIM and SAGV Linux Support for G10 models (LP: #2070158)
    - drm/i915/display: Add meaningful traces for QGV point ...

Changed in linux-azure (Ubuntu Noble):
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.