Bug 254112 - Linuxulator: glibc's 2.33 with glibc-hwcaps distros breaks compat
Summary: Linuxulator: glibc's 2.33 with glibc-hwcaps distros breaks compat
Status: In Progress
Alias: None
Product: Base System
Classification: Unclassified
Component: kern (show other bugs)
Version: Unspecified
Hardware: Any Any
: --- Affects Only Me
Assignee: Edward Tomasz Napierala
URL:
Keywords:
Depends on:
Blocks: 247219
  Show dependency treegraph
 
Reported: 2021-03-07 20:01 UTC by JavaShin
Modified: 2021-04-19 11:11 UTC (History)
2 users (show)

See Also:


Attachments
ktrace (28.39 KB, text/plain)
2021-03-07 20:01 UTC, JavaShin
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description JavaShin 2021-03-07 20:01:34 UTC
Created attachment 223072 [details]
ktrace

[root@hellbox /compat/suse]# chroot . /bin/bash
/bin/bash: error while loading shared libraries: libreadline.so.8: cannot stat shared object: Invalid argument


Freebsd Verison : 
FreeBSD hellbox 13.0-RC1 FreeBSD 13.0-RC1 #0 releng/13.0-n244639-60e8939aa85: Fri Mar  5 05:01:01 UTC 2021     root@releng1.nyi.freebsd.org:/usr/obj/usr/src/amd64.amd64/sys/GENERIC  amd64

Steps to reproduce download a linux container of
Comment 1 JavaShin 2021-03-07 20:11:27 UTC
https://us.images.linuxcontainers.org/images/

Opensuse Tumbleweed And ArchLinux Tested Happens The Same Glibc Version 2.33

On Debian Sid Works Fine Like CentOS C7.

(*) Continue

- mkdir /compat/distro (suse)
- download the rootfs of the distro.
- move to /compat/distro and unpack.

- set fstab with 

devfs           /compat/suse/dev      devfs           rw,late                      0       0
tmpfs           /compat/suse/dev/shm  tmpfs           rw,late,size=1g,mode=1777    0       0
fdescfs         /compat/suse/dev/fd   fdescfs         rw,late,linrdlnk             0       0
linprocfs       /compat/suse/proc     linprocfs       rw,late                      0       0
linsysfs        /compat/suse/sys      linsysfs        rw,late                      0       0

mount /compat/suse/dev ; mount /compat/suse/dev/shm ; mount /compat/suse/dev/fd ; mount /compat/suse/proc ; mount /compat/suse/sys ; cp /etc/resolv.conf etc/resolv.conf ; chroot /compat/suse/ /bin/bash

Error.
/bin/bash: error while loading shared libraries: libreadline.so.8: cannot stat shared object: Invalid argument

Glibc 2.33 incompatibility hwcaps  .

Success. with any distro without glibc 2.33
Comment 2 Edward Tomasz Napierala freebsd_committer 2021-03-11 12:50:29 UTC
Looks like it's caused by the lack of AT_EMPTY_PATH support for Linux fstatat(2).  The quick and dirty fix is at https://reviews.freebsd.org/D28192.  This also seems to require bumping the kernel version to 4.4.
Comment 3 commit-hook freebsd_committer 2021-04-16 07:57:22 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/src/commit/?id=4b45c2bb83a1d7aded0c424d65595cc576760dc7

commit 4b45c2bb83a1d7aded0c424d65595cc576760dc7
Author:     Edward Tomasz Napierala <trasz@FreeBSD.org>
AuthorDate: 2021-04-16 07:52:59 +0000
Commit:     Edward Tomasz Napierala <trasz@FreeBSD.org>
CommitDate: 2021-04-16 07:56:19 +0000

    linux: make fstatat(2) handle AT_EMPTY_PATH

    Without it, Qt5 apps from Focal fail to start, being unable to load
    their plugins.  It's also necessary for glibc 2.33, as found in recent
    Arch snapshots.

    PR:             254112
    Reviewed By:    kib
    Sponsored by:   The FreeBSD Foundation, EPSRC
    Differential Revision:  https://reviews.freebsd.org/D28192

 sys/compat/linux/linux_stats.c | 13 +++++++++++--
 1 file changed, 11 insertions(+), 2 deletions(-)
Comment 4 commit-hook freebsd_committer 2021-04-19 11:10:40 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/src/commit/?id=156da725d3ef6bbafdb0389aada57cf268f44b1e

commit 156da725d3ef6bbafdb0389aada57cf268f44b1e
Author:     Edward Tomasz Napierala <trasz@FreeBSD.org>
AuthorDate: 2021-04-19 10:37:47 +0000
Commit:     Edward Tomasz Napierala <trasz@FreeBSD.org>
CommitDate: 2021-04-19 10:37:58 +0000

    linux(4): bump osrelease to 4.4.0.

    This is required for the current Arch Linux binaries to work.

    PR:             254112
    Reviewed By:    emaste
    Sponsored By:   EPSRC
    Differential Revision:  https://reviews.freebsd.org/D29218

 sys/compat/linux/linux_mib.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)