FS#71024 - [glibc] Use uname instead of DSO to detect kernel version

Attached to Project: Arch Linux
Opened by Makoto Mizukami (makotom) - Wednesday, 26 May 2021, 04:18 GMT
Last edited by Allan McRae (Allan) - Wednesday, 26 May 2021, 05:05 GMT
Task Type Feature Request
Category Packages: Core
Status Closed
Assigned To Giancarlo Razzolini (grazzolini)
Architecture All
Severity Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

Description:

Due to a buggy vDSO implementation of some virtual Linux implementations, notably WSL1 [1], the Arch-based binaries and Docker images no longer work due to the recent change in compiler options [2].

This feature request introduces a patch to circumvent the issue.
For instance, the patch modifies the behaviour of glibc, so that it trusts only the data from `uname`.

Additional info:
* package version(s): glibc-2.33-5
* link to upstream bug report, if any: https://github.com/microsoft/WSL/issues/3023#issuecomment-452339739

Steps to reproduce:

Seemingly, the easiest repro steps is to run `chroot` of Arch's installation bootstrap [3] on WSL.

Expected behaviour:

chroot environment works without major issues.

Actual behaviour:

`FATAL: kernel too old` error happens.

Patches:

https://github.com/makotom/glibc-wsl/blob/main/force-uname.patch

Coincidently a change in PKGBUILD will be needed as well.

https://github.com/makotom/glibc-wsl/blob/main/PKGBUILD-force-uname.patch

References:

[1] https://github.com/microsoft/WSL/issues/3023#issuecomment-452339739
[2] https://github.com/archlinux/svntogit-packages/blame/packages/glibc/trunk/PKGBUILD#L69
[3] https://wiki.archlinux.org/title/Install_Arch_Linux_from_existing_Linux#Creating_a_chroot

Relates to:
https://bugs.archlinux.org/task/69684
https://bugs.archlinux.org/task/69663
This task depends upon

Closed by  Allan McRae (Allan)
Wednesday, 26 May 2021, 05:05 GMT
Reason for closing:  Not a bug
Additional comments about closing:  Not an Arch Linux issue.
Comment by Makoto Mizukami (makotom) - Wednesday, 26 May 2021, 04:32 GMT
P.S. The patch does not void the original intension to support Linux >= 4.4 only. The restriction will be applied correctly, as long as the underlying implementation of syscalls behaves in an expected manner.
Comment by Doug Newgard (Scimmia) - Wednesday, 26 May 2021, 04:39 GMT
Patching to support WSL. This was categorically rejected by the previous glibc maintainer, we'll see if the current maintainer feels the same way.

Personally, patching to get around MS doing stupid things doesn't sound like a good idea.
Comment by Allan McRae (Allan) - Wednesday, 26 May 2021, 05:04 GMT
Given there is no way this will be accepted by glibc upstream, the same will apply to the glibc package in Arch.

Loading...