Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The WSL1 kernel dso reports the kernel version as 3.13.11 instead of 4.4 #6557

Closed
Marc-Aldorasi-Imprivata opened this issue Feb 16, 2021 · 2 comments

Comments

@Marc-Aldorasi-Imprivata

Environment

Windows build number: [run `cmd.exe /c ver`]
Microsoft Windows [Version 10.0.19041.804]
Your Distribution version: [On Debian or Ubuntu run `lsb_release -r` in WSL]
Release:        18.04
Whether the issue is on WSL 2 and/or WSL 1: [run `cat /proc/version` in WSL]
Linux version 4.4.0-19041-Microsoft (Microsoft@Microsoft.com) (gcc version 5.4.0 (GCC) ) #488-Microsoft Mon Sep 01 13:43:00 PST 2020

Steps to reproduce

$ gdb /bin/true
GNU gdb (Ubuntu 8.1-0ubuntu3) 8.1.0.20180409-git
Copyright (C) 2018 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
<http://www.gnu.org/software/gdb/documentation/>.
For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from /bin/true...(no debugging symbols found)...done.
(gdb) break _dl_discover_osversion
Function "_dl_discover_osversion" not defined.
Make breakpoint pending on future shared library load? (y or [n]) y
Breakpoint 1 (_dl_discover_osversion) pending.
(gdb) r
Starting program: /bin/true

Breakpoint 1, _dl_discover_osversion () at ../sysdeps/unix/sysv/linux/dl-sysdep.c:45
45      ../sysdeps/unix/sysv/linux/dl-sysdep.c: No such file or directory.
(gdb) finish
Run till exit from #0  _dl_discover_osversion () at ../sysdeps/unix/sysv/linux/dl-sysdep.c:45
0x00007fffff403782 in dl_main (phdr=<optimized out>, phnum=<optimized out>, user_entry=<optimized out>,
    auxv=<optimized out>) at rtld.c:1318
1318    rtld.c: No such file or directory.
Value returned is $1 = 199947
(gdb) p/x 199947
$2 = 0x30d0b

The _dl_discover_osversion function (from glibc) is used to get the kernel version from the kernel dso. If glibc is built with a minimum kernel version (like it is on Arch), it will compare the kernel version to that minimum and exit the program if the kernel is too old.

This causes issues if Arch is installed in a chroot, since then none of the binaries in the chroot will run.

Expected behavior

glibc thinks the kernel version is 4.4.0

Actual behavior

glibc thinks the kernel version is 3.13.11

@therealkenc
Copy link
Collaborator

Variation /dupe #3023 (message) which has some good discussion. Better in WSL2.

@ghost
Copy link

ghost commented Feb 16, 2021

Hi! We've identified this issue as a duplicate of another one that already exists in this repository. This specific instance is being closed in favor of tracking the concern over on the referenced thread.

Thanks for your report!

@ghost ghost closed this as completed Feb 16, 2021
@ghost ghost added the duplicate label Feb 16, 2021
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants