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**
* 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
```
## 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: COMPAT_ 32BIT_TIME= n, unlike the vanilla Ubuntu 24.04 kernel images.
This kernel image is compiled with CONFIG_
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: /sourceware. org/git/ ?p=glibc. git;a=blob; f=nptl/ futex-internal. c;h=0bb1dd51f66 802521afd71b924 6222ed0ea0d862; hb=refs/ heads/release/ 2.39/master# l90 message_ impl.cold (libc_fatal.c:132) internal. h:87) abstimed_ wait_common (futex- internal. c:119) /sourceware. org/git/ ?p=glibc. git;a=blob; f=sysdeps/ nptl/futex- internal. h;h=0e87e92d15a b92f5069463719a 494e97d9800431; hb=refs/ heads/release/ 2.39/master# l87
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:/
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_
__libc_fatal (libc_fatal.c:141)
futex_fatal_error (futex-
__futex_
```
after printing "The futex facility returned an unexpected error code.\n":
https:/
## Expected behavior:
* No crashes for 32bit applications with this kernel COMPAT_ 32BIT_TIME= y
* This kernel image built with CONFIG_
## Aditional info:
For reference, this is the current vanilla Ubuntu 24.04 kernel for x86_64 and this config: COMPAT_ 32BIT_TIME /boot/config- $(uname -r) COMPAT_ 32BIT_TIME= y
```
$ 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_
CONFIG_
```
On the other hand this is the kernel config for this kernel image: COMPAT_ 32BIT_TIME is not set
```
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_
```
Related github issue (the issue was found in github ubuntu 24.04 runners) /github. com/actions/ runner- images/ issues/ 9977
https:/