Note: This is a public test instance of Red Hat Bugzilla. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback at bugzilla.redhat.com.
Bug 1889862 - FTBFS: Unit tests failed with latest glibc
Summary: FTBFS: Unit tests failed with latest glibc
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: fakeroot
Version: 34
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Sergio Basto
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks: F34FTBFS
TreeView+ depends on / blocked
 
Reported: 2020-10-20 18:03 UTC by Lukas Slebodnik
Modified: 2021-02-23 04:21 UTC (History)
6 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2021-02-22 20:36:02 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Lukas Slebodnik 2020-10-20 18:03:55 UTC
Description of problem:
I was debugging some failures(segfault) in tests with fakeroot related to stat64
It looks like issue are introduced in glibc-2.32.9000-11.fc34 https://koji.fedoraproject.org/koji/buildinfo?buildID=1627018

Its changelog mentioned stat/mknod related changes:

- linux: Use INTERNAL_SYSCALL on fstatat{64}
- statfs: add missing f_flags assignment
- y2038: Remove not used __fstatat_time64 define
- Add missing stat/mknod symbol on libc.abilist some ABIs
- linux: Move xmknod{at} to compat symbols
- linux: Add {f}stat{at} y2038 support
- linux: Move {f}xstat{at} to compat symbols
- linux: Disentangle fstatat from fxstatat
- linux: Implement {l}fstat{at} in terms of fstatat
- linux: Move the struct stat{64} to struct_stat.h
- Remove mknod wrapper functions, move them to symbols
- Remove stat wrapper functions, move them to exported symbols

I tried to rebuild fakeroot with latest glibc but unit tests failed

Version-Release number of selected component (if applicable):
sh$ rpm -q glibc fakeroot
glibc-2.32.9000-11.fc34
fakeroot-1.25.3-1.fc34

How reproducible:
Deterministic

Steps to Reproduce:
1. dnf install -y fedpkg
2. fedpkg clone --anonymous fakeroot
3. cd fakeroot
4. fedpkg build --scratch

Actual results:
Failed scratch build
https://koji.fedoraproject.org/koji/taskinfo?taskID=53849715

Expected results:
It should pass in the same way as in f33
https://koji.fedoraproject.org/koji/taskinfo?taskID=53851079

Additional info:

make  check-TESTS
make[2]: Entering directory '/builddir/build/BUILD/fakeroot-1.25.3/obj-sysv/test'
make[3]: Entering directory '/builddir/build/BUILD/fakeroot-1.25.3/obj-sysv/test'
FAIL: t.chmod_dev
PASS: t.cp-a
PASS: t.echoarg
PASS: t.falsereturn
FAIL: t.mknod
PASS: t.no_ld_preload
PASS: t.no_ld_preload_link
PASS: t.option
FAIL: t.tar
PASS: t.touchinstall
PASS: t.truereturn
PASS: t.xattr
==========================================
   fakeroot 1.25.3: test/test-suite.log
==========================================
# TOTAL: 12
# PASS:  9
# SKIP:  0
# XFAIL: 0
# FAIL:  3
# XPASS: 0
# ERROR: 0
.. contents:: :depth: 2
FAIL: t.chmod_dev
=================
mknod: t.chmod_dev.dir/hda3: Operation not permitted
FAIL t.chmod_dev (exit status: 1)
FAIL: t.mknod
=============
mknod: t.mknod.dir/hda3: Operation not permitted
ls: cannot access 't.mknod.dir/hda3': No such file or directory
FAIL t.mknod (exit status: 1)
FAIL: t.tar
===========
tartest:
compare-tar:
tar files differ:
1,66c1,66
< --------- root/root 0 tar/hello/
< --------- root/root 0 tar/hello/1/
< --------- root/root 0 tar/hello/1289/
< --------- root/root 0 tar/hello/2/
< --------- root/root 0 tar/hello/3/
< --------- root/root 0 tar/hello/4/
< --------- root/root 0 tar/hello/5/
< --------- root/root 0 tar/hello/6/
< --------- root/root 0 tar/hello/fjsdk/
< --------- root/root 0 tar/hello/vn.34.654l./
< rw-r--r-- daemon/root 0 tar/3/3/file
< rw-r--r-- daemon/root 0 tar/4/4/file
< rw-r--r-- root/root 0 tar/1.file
< rw-r--r-- root/root 0 tar/1/1/file
< rw-r--r-- root/root 0 tar/1289.file
< rw-r--r-- root/root 0 tar/1289/1289/file
< rw-r--r-- root/root 0 tar/2.file
< rw-r--r-- root/root 0 tar/3.file
< rw-r--r-- root/root 0 tar/4.file
< rw-r--r-- root/root 0 tar/5.file
< rw-r--r-- root/root 0 tar/5/5/file
< rw-r--r-- root/root 0 tar/6.file
< rw-r--r-- root/root 0 tar/6/6/file
< rw-r--r-- root/root 0 tar/fjsdk.file
< rw-r--r-- root/root 0 tar/fjsdk/fjsdk/file
< rw-r--r-- root/root 0 tar/hello/1/file
< rw-r--r-- root/root 0 tar/hello/1289/file
< rw-r--r-- root/root 0 tar/hello/2/file
< rw-r--r-- root/root 0 tar/hello/3/file
< rw-r--r-- root/root 0 tar/hello/4/file
< rw-r--r-- root/root 0 tar/hello/5/file
< rw-r--r-- root/root 0 tar/hello/6/file
< rw-r--r-- root/root 0 tar/hello/fjsdk/file
< rw-r--r-- root/root 0 tar/hello/vn.34.654l./file
< rw-r--r-- root/root 0 tar/vn.34.654l..file
< rw-r--r-- root/root 0 tar/vn.34.654l./vn.34.654l./file
< rw-r--r-- root/root 14 tar/hello/hello
< rwsr--r-- daemon/sys 0 tar/2/2/file
< rwsr-xr-x daemon/sys 0 tar/2/
< rwsr-xr-x daemon/sys 0 tar/2/2/
< rwsr-xr-x daemon/sys 0 tar/2/2/2.hello/
< rwsr-xr-x root/root 0 tar/5/
< rwxr-xr-x daemon/root 0 tar/3/
< rwxr-xr-x daemon/root 0 tar/3/3/
< rwxr-xr-x daemon/root 0 tar/3/3/3.hello/
< rwxr-xr-x daemon/root 0 tar/4/
< rwxr-xr-x daemon/root 0 tar/4/4/
< rwxr-xr-x daemon/root 0 tar/4/4/4.hello/
< rwxr-xr-x root/root 0 tar/
< rwxr-xr-x root/root 0 tar/1/
< rwxr-xr-x root/root 0 tar/1/1/
< rwxr-xr-x root/root 0 tar/1/1/1.hello/
< rwxr-xr-x root/root 0 tar/1289/
< rwxr-xr-x root/root 0 tar/1289/1289/
< rwxr-xr-x root/root 0 tar/1289/1289/1289.hello/
< rwxr-xr-x root/root 0 tar/5/5/
< rwxr-xr-x root/root 0 tar/5/5/5.hello/
< rwxr-xr-x root/root 0 tar/6/
< rwxr-xr-x root/root 0 tar/6/6/
< rwxr-xr-x root/root 0 tar/6/6/6.hello/
< rwxr-xr-x root/root 0 tar/fjsdk/
< rwxr-xr-x root/root 0 tar/fjsdk/fjsdk/
< rwxr-xr-x root/root 0 tar/fjsdk/fjsdk/fjsdk.hello/
< rwxr-xr-x root/root 0 tar/vn.34.654l./
< rwxr-xr-x root/root 0 tar/vn.34.654l./vn.34.654l./
< rwxr-xr-x root/root 0 tar/vn.34.654l./vn.34.654l./vn.34.654l..hello/
---
> rw-r--r-- mockbuild/mock 0 tar/1.file
> rw-r--r-- mockbuild/mock 0 tar/1/1/file
> rw-r--r-- mockbuild/mock 0 tar/1289.file
> rw-r--r-- mockbuild/mock 0 tar/1289/1289/file
> rw-r--r-- mockbuild/mock 0 tar/2.file
> rw-r--r-- mockbuild/mock 0 tar/3.file
> rw-r--r-- mockbuild/mock 0 tar/3/3/file
> rw-r--r-- mockbuild/mock 0 tar/4.file
> rw-r--r-- mockbuild/mock 0 tar/4/4/file
> rw-r--r-- mockbuild/mock 0 tar/5.file
> rw-r--r-- mockbuild/mock 0 tar/5/5/file
> rw-r--r-- mockbuild/mock 0 tar/6.file
> rw-r--r-- mockbuild/mock 0 tar/6/6/file
> rw-r--r-- mockbuild/mock 0 tar/fjsdk.file
> rw-r--r-- mockbuild/mock 0 tar/fjsdk/fjsdk/file
> rw-r--r-- mockbuild/mock 0 tar/hello/1/file
> rw-r--r-- mockbuild/mock 0 tar/hello/1289/file
> rw-r--r-- mockbuild/mock 0 tar/hello/2/file
> rw-r--r-- mockbuild/mock 0 tar/hello/3/file
> rw-r--r-- mockbuild/mock 0 tar/hello/4/file
> rw-r--r-- mockbuild/mock 0 tar/hello/5/file
> rw-r--r-- mockbuild/mock 0 tar/hello/6/file
> rw-r--r-- mockbuild/mock 0 tar/hello/fjsdk/file
> rw-r--r-- mockbuild/mock 0 tar/hello/vn.34.654l./file
> rw-r--r-- mockbuild/mock 0 tar/vn.34.654l..file
> rw-r--r-- mockbuild/mock 0 tar/vn.34.654l./vn.34.654l./file
> rw-r--r-- mockbuild/mock 14 tar/hello/hello
> rwsr--r-- mockbuild/mock 0 tar/2/2/file
> rwsr-xr-x mockbuild/mock 0 tar/2/
> rwsr-xr-x mockbuild/mock 0 tar/2/2/
> rwsr-xr-x mockbuild/mock 0 tar/2/2/2.hello/
> rwsr-xr-x mockbuild/mock 0 tar/5/
> rwx------ mockbuild/mock 0 tar/hello/
> rwx------ mockbuild/mock 0 tar/hello/1/
> rwx------ mockbuild/mock 0 tar/hello/1289/
> rwx------ mockbuild/mock 0 tar/hello/2/
> rwx------ mockbuild/mock 0 tar/hello/3/
> rwx------ mockbuild/mock 0 tar/hello/4/
> rwx------ mockbuild/mock 0 tar/hello/5/
> rwx------ mockbuild/mock 0 tar/hello/6/
> rwx------ mockbuild/mock 0 tar/hello/fjsdk/
> rwx------ mockbuild/mock 0 tar/hello/vn.34.654l./
> rwxr-xr-x mockbuild/mock 0 tar/
> rwxr-xr-x mockbuild/mock 0 tar/1/
> rwxr-xr-x mockbuild/mock 0 tar/1/1/
> rwxr-xr-x mockbuild/mock 0 tar/1/1/1.hello/
> rwxr-xr-x mockbuild/mock 0 tar/1289/
> rwxr-xr-x mockbuild/mock 0 tar/1289/1289/
> rwxr-xr-x mockbuild/mock 0 tar/1289/1289/1289.hello/
> rwxr-xr-x mockbuild/mock 0 tar/3/
> rwxr-xr-x mockbuild/mock 0 tar/3/3/
> rwxr-xr-x mockbuild/mock 0 tar/3/3/3.hello/
> rwxr-xr-x mockbuild/mock 0 tar/4/
> rwxr-xr-x mockbuild/mock 0 tar/4/4/
> rwxr-xr-x mockbuild/mock 0 tar/4/4/4.hello/
> rwxr-xr-x mockbuild/mock 0 tar/5/5/
> rwxr-xr-x mockbuild/mock 0 tar/5/5/5.hello/
> rwxr-xr-x mockbuild/mock 0 tar/6/
> rwxr-xr-x mockbuild/mock 0 tar/6/6/
> rwxr-xr-x mockbuild/mock 0 tar/6/6/6.hello/
> rwxr-xr-x mockbuild/mock 0 tar/fjsdk/
> rwxr-xr-x mockbuild/mock 0 tar/fjsdk/fjsdk/
> rwxr-xr-x mockbuild/mock 0 tar/fjsdk/fjsdk/fjsdk.hello/
> rwxr-xr-x mockbuild/mock 0 tar/vn.34.654l./
> rwxr-xr-x mockbuild/mock 0 tar/vn.34.654l./vn.34.654l./
> rwxr-xr-x mockbuild/mock 0 tar/vn.34.654l./vn.34.654l./vn.34.654l..hello/
FAIL t.tar (exit status: 1)
============================================================================
Testsuite summary for fakeroot 1.25.3
============================================================================
# TOTAL: 12
# PASS:  9
# SKIP:  0
# XFAIL: 0
# FAIL:  3
# XPASS: 0
# ERROR: 0
============================================================================
See test/test-suite.log
Please report to clint
============================================================================
make[3]: Leaving directory '/builddir/build/BUILD/fakeroot-1.25.3/obj-sysv/test'
make[2]: Leaving directory '/builddir/build/BUILD/fakeroot-1.25.3/obj-sysv/test'
make[1]: Leaving directory '/builddir/build/BUILD/fakeroot-1.25.3/obj-sysv/test'
make: Leaving directory '/builddir/build/BUILD/fakeroot-1.25.3/obj-sysv'
make[3]: *** [Makefile:548: test-suite.log] Error 1
make[2]: *** [Makefile:656: check-TESTS] Error 2
make[1]: *** [Makefile:807: check-am] Error 2
make: *** [Makefile:687: check-recursive] Error 1
error: Bad exit status from /var/tmp/rpm-tmp.hhkhLU (%check)
    Bad exit status from /var/tmp/rpm-tmp.hhkhLU (%check)

Comment 1 Lukas Slebodnik 2020-10-20 18:07:45 UTC
configure on f33 says:
checking for statx... yes
checking for __xstat... yes
checking for __fxstat... yes
checking for __lxstat... yes
checking for __fxstatat... yes
checking for __xstat64... yes
checking for __fxstat64... yes
checking for __lxstat64... yes
checking for __fxstatat64... yes
checking for __xmknod... yes
checking for __xmknodat... yes

configure on rawhide says:
checking for statx... yes
checking for __xstat... no
checking for _xstat... no
checking for __stat13... no
checking for stat... yes
checking for __fxstat... no
checking for _fxstat... no
checking for __fstat13... no
checking for fstat... yes
checking for __lxstat... no
checking for _lxstat... no
checking for __lstat13... no
checking for lstat... yes
checking for __fxstatat... no
checking for _fxstatat... no
checking for __fstatat13... no
checking for fstatat... (cached) yes
checking for __xstat64... no
checking for _xstat64... no
checking for __stat6413... no
checking for stat64... yes
checking for __fxstat64... no
checking for _fxstat64... no
checking for __fstat6413... no
checking for fstat64... yes
checking for __lxstat64... no
checking for _lxstat64... no
checking for __lstat6413... no
checking for lstat64... yes
checking for __fxstatat64... no
checking for _fxstatat64... no
checking for __fstatat6413... no
checking for fstatat64... yes
checking for __xmknod... no
checking for _xmknod... no
checking for __mknod13... no
checking for mknod... yes
checking for __xmknodat... no
checking for _xmknodat... no
checking for __mknodat13... no
checking for mknodat... (cached) yes

Comment 2 Dominik 'Rathann' Mierzejewski 2020-10-21 10:33:08 UTC
FWIW, the last koschei build (https://koji.fedoraproject.org/koji/taskinfo?taskID=53672713) was done with glibc-2.32.9000-10.fc34 and the tests passed. That seems to confirm that revision 11 breaks fakeroot.

Can you provide config.log from the failing build?

Can you bisect the glibc commit that introduced this breakage? From the spec file, we can assume the following:

0f09154c64005e78b61484ae87b5ea2028051ea0 bad
72d36ffd7db55ae599f4c77feb0eae25a0f3714e good

I took a quick look at the commits between the two and there are multiple commits dealing with *stat*. I'm not familiar with the code enough to make a guess which one was the culprit.

Comment 3 Dominik 'Rathann' Mierzejewski 2020-10-21 12:19:11 UTC
According to https://lists.fedoraproject.org/archives/list/devel@lists.fedoraproject.org/message/UHTGT3TQ3I6RHOVC6MARZYNNTN47AO24/ , -12.fc34 build should fix it.

Comment 4 Lukas Slebodnik 2020-10-22 12:30:45 UTC
I tried scratch build with 2.32.9000-12.fc34 and it still fails
but ATM sooner (at compile time) https://koji.fedoraproject.org/koji/taskinfo?taskID=53961483

In file included from /builddir/build/BUILD/fakeroot-1.25.3/obj-sysv/../communicate.h:20,
                 from /builddir/build/BUILD/fakeroot-1.25.3/obj-sysv/../libfakeroot.c:60:
/builddir/build/BUILD/fakeroot-1.25.3/obj-sysv/../libfakeroot.c: In function 'chown':
/builddir/build/BUILD/fakeroot-1.25.3/obj-sysv/../libfakeroot.c:99:40: error: '_STAT_VER' undeclared (first use in this function)
   99 | #define INT_NEXT_STAT(a,b) NEXT_STAT64(_STAT_VER,a,b)
      |                                        ^~~~~~~~~
./fakerootconfig.h:9:43: note: in definition of macro 'NEXT_STAT64'
    9 | #define NEXT_STAT64(a,b,c) next___xstat64(a,b,c)
      |                                           ^
/builddir/build/BUILD/fakeroot-1.25.3/obj-sysv/../libfakeroot.c:811:5: note: in expansion of macro 'INT_NEXT_STAT'
  811 |   r=INT_NEXT_STAT(path, &st);
      |     ^~~~~~~~~~~~~
/builddir/build/BUILD/fakeroot-1.25.3/obj-sysv/../libfakeroot.c:99:40: note: each undeclared identifier is reported only once for each function it appears in
   99 | #define INT_NEXT_STAT(a,b) NEXT_STAT64(_STAT_VER,a,b)
      |                                        ^~~~~~~~~
./fakerootconfig.h:9:43: note: in definition of macro 'NEXT_STAT64'
    9 | #define NEXT_STAT64(a,b,c) next___xstat64(a,b,c)
      |                                           ^
/builddir/build/BUILD/fakeroot-1.25.3/obj-sysv/../libfakeroot.c:811:5: note: in expansion of macro 'INT_NEXT_STAT'
  811 |   r=INT_NEXT_STAT(path, &st);
      |     ^~~~~~~~~~~~~
/builddir/build/BUILD/fakeroot-1.25.3/obj-sysv/../libfakeroot.c: In function 'lchown':
/builddir/build/BUILD/fakeroot-1.25.3/obj-sysv/../libfakeroot.c:100:42: error: '_STAT_VER' undeclared (first use in this function)
  100 | #define INT_NEXT_LSTAT(a,b) NEXT_LSTAT64(_STAT_VER,a,b)
      |                                          ^~~~~~~~~
./fakerootconfig.h:13:45: note: in definition of macro 'NEXT_LSTAT64'
   13 | #define NEXT_LSTAT64(a,b,c) next___lxstat64(a,b,c)
      |                                             ^
/builddir/build/BUILD/fakeroot-1.25.3/obj-sysv/../libfakeroot.c:843:5: note: in expansion of macro 'INT_NEXT_LSTAT'
  843 |   r=INT_NEXT_LSTAT(path, &st);
      |     ^~~~~~~~~~~~~~
/builddir/build/BUILD/fakeroot-1.25.3/obj-sysv/../libfakeroot.c: In function 'fchown':
/builddir/build/BUILD/fakeroot-1.25.3/obj-sysv/../libfakeroot.c:101:42: error: '_STAT_VER' undeclared (first use in this function)
  101 | #define INT_NEXT_FSTAT(a,b) NEXT_FSTAT64(_STAT_VER,a,b)
      |                                          ^~~~~~~~~
./fakerootconfig.h:11:45: note: in definition of macro 'NEXT_FSTAT64'
   11 | #define NEXT_FSTAT64(a,b,c) next___fxstat64(a,b,c)
      |                                             ^
/builddir/build/BUILD/fakeroot-1.25.3/obj-sysv/../libfakeroot.c:864:5: note: in expansion of macro 'INT_NEXT_FSTAT'
  864 |   r=INT_NEXT_FSTAT(fd, &st);
      |     ^~~~~~~~~~~~~~
/builddir/build/BUILD/fakeroot-1.25.3/obj-sysv/../libfakeroot.c: In function 'fchownat':
/builddir/build/BUILD/fakeroot-1.25.3/obj-sysv/../libfakeroot.c:102:50: error: '_STAT_VER' undeclared (first use in this function)
  102 | #define INT_NEXT_FSTATAT(a,b,c,d) NEXT_FSTATAT64(_STAT_VER,a,b,c,d)
      |                                                  ^~~~~~~~~
./fakerootconfig.h:15:53: note: in definition of macro 'NEXT_FSTATAT64'
   15 | #define NEXT_FSTATAT64(a,b,c,d,e) next___fxstatat64(a,b,c,d,e)
      |                                                     ^
/builddir/build/BUILD/fakeroot-1.25.3/obj-sysv/../libfakeroot.c:890:5: note: in expansion of macro 'INT_NEXT_FSTATAT'
  890 |   r=INT_NEXT_FSTATAT(dir_fd, path, &st, (flags & (AT_SYMLINK_NOFOLLOW | AT_EMPTY_PATH | AT_NO_AUTOMOUNT)));
      |     ^~~~~~~~~~~~~~~~

Comment 5 Jan Pazdziora 2020-11-24 11:32:22 UTC
FYI, I now see the _STAT_VER undeclared in fakechroot as well, bug 1901049.

Comment 6 Fedora Release Engineering 2020-12-06 04:22:28 UTC
Dear Maintainer,

your package has an open Fails To Build From Source bug for Fedora 34.
Action is required from you.

If you can fix your package to build, perform a build in koji, and either create
an update in bodhi, or close this bug without creating an update, if updating is
not appropriate [1]. If you are working on a fix, set the status to ASSIGNED to
acknowledge this. If you have already fixed this issue, please close this Bugzilla report.

Following the policy for such packages [2], your package will be orphaned if
this bug remains in NEW state more than 8 weeks (not sooner than 2020-12-15).

A week before the mass branching of Fedora 35 according to the schedule [3],
any packages not successfully rebuilt at least on Fedora 33 will be
retired regardless of the status of this bug.

[1] https://docs.fedoraproject.org/en-US/fesco/Updates_Policy/
[2] https://docs.fedoraproject.org/en-US/fesco/Fails_to_build_from_source_Fails_to_install/
[3] https://fedorapeople.org/groups/schedule/f-35/f-35-key-tasks.html

Comment 7 Dominik 'Rathann' Mierzejewski 2020-12-07 12:52:58 UTC
Patch[1] by Jan Pazdziora makes it build, but the tests still fail. Looks like it won't be easy to fix.

[1] https://lists.fedoraproject.org/archives/list/devel@lists.fedoraproject.org/message/SMQ3RYXEYTVZH6PLQMKNB3NM4XLPMNZO/

Comment 8 Lukas Slebodnik 2021-01-19 13:44:11 UTC
Is there any progress here? Do you need a help from glibc folks? (I can see Florian is already in CC)

Comment 9 Florian Weimer 2021-01-19 13:56:14 UTC
There isn't much assistance we can provide from the glibc side. fakeroot needs to be enhanced to intercept all new glibc interfaces. The build failure merely obscures the larger issues.

Comment 10 Dominik 'Rathann' Mierzejewski 2021-01-19 18:24:50 UTC
No progress, sorry. I've decided to orphan the package as I don't have time to take care of this.

Comment 11 Fedora Admin user for bugzilla script actions 2021-01-20 00:05:40 UTC
This package has changed maintainer in Fedora. Reassigning to the new maintainer of this component.

Comment 12 Lukas Slebodnik 2021-01-21 10:11:17 UTC
Florian,
How can we easily and reliably obtain list of necessary interfaces for intercept?

Comment 13 Florian Weimer 2021-01-21 10:30:47 UTC
(In reply to Lukas Slebodnik from comment #12)
> How can we easily and reliably obtain list of necessary interfaces for
> intercept?

You need to read the glibc sources to figure out the dependencies. To find all the newly added stat symbols, you could look at the *.abilist files and watch out for stat functions with a GLIBC_2.33 symbol version.

Symbol interposition is not the right way to do this. Maybe you can use namespaces, ptrace, seccomp, or FUSE instead. fakeroot might still be salvageable at this point, but fakechroot is much harder because it has to intercept everything that calls open, which is not practical at all.

Comment 14 Fedora Admin user for bugzilla script actions 2021-01-24 12:07:02 UTC
This package has changed maintainer in Fedora. Reassigning to the new maintainer of this component.

Comment 15 Ben Cotton 2021-02-09 15:20:48 UTC
This bug appears to have been reported against 'rawhide' during the Fedora 34 development cycle.
Changing version to 34.

Comment 16 Ilya Lipnitskiy 2021-02-14 05:15:03 UTC
FYI, I spent some time fixing fakeroot with glibc 2.33 and submitted my changes upstream:
https://salsa.debian.org/clint/fakeroot/-/merge_requests/10

Comment 17 Sergio Basto 2021-02-16 21:04:17 UTC
(In reply to Ilya Lipnitskiy from comment #16)
> FYI, I spent some time fixing fakeroot with glibc 2.33 and submitted my
> changes upstream:
> https://salsa.debian.org/clint/fakeroot/-/merge_requests/10

I had applied your patches but still got the same 3 test failed [1] however build in rawhide [2] almost pass except on s390x ...

this kind of operation not permitted seems to me another error.


[1] 
FAIL: t.chmod_dev
=================
mknod: t.chmod_dev.dir/hda3: Operation not permitted
FAIL t.chmod_dev (exit status: 1)
FAIL: t.mknod
=============
mknod: t.mknod.dir/hda3: Operation not permitted
ls: cannot access 't.mknod.dir/hda3': No such file or directory
FAIL t.mknod (exit status: 1)

[2]
https://koji.fedoraproject.org/koji/taskinfo?taskID=62109658

Comment 18 Ilya Lipnitskiy 2021-02-17 04:22:21 UTC
(In reply to Sergio Basto from comment #17)
> I had applied your patches but still got the same 3 test failed [1] 
Be sure to fully clean the repo after applying patches, maybe that's why it didn't work for you?

> however build in rawhide [2] almost pass except on s390x ...
Will take a look at this, but not sure if I can repro easily..

Comment 19 Ilya Lipnitskiy 2021-02-17 04:37:57 UTC
(In reply to Sergio Basto from comment #17)
> build in rawhide [2] almost pass except on s390x ...
Could you try taking out the "OS X portability" patch and see if that's better? There are reports of that patch causing failure on ppc64le [0]

[0]
https://salsa.debian.org/clint/fakeroot/-/merge_requests/11#note_228319

Comment 20 Sergio Basto 2021-02-17 12:14:27 UTC
(In reply to Ilya Lipnitskiy from comment #18)
> (In reply to Sergio Basto from comment #17)
> > I had applied your patches but still got the same 3 test failed [1] 
> Be sure to fully clean the repo after applying patches, maybe that's why it
> didn't work for you?
> 
> > however build in rawhide [2] almost pass except on s390x ...
> Will take a look at this, but not sure if I can repro easily..

no luck , tested without "OS X portability"

Rawhide:
https://koji.fedoraproject.org/koji/taskinfo?taskID=62150839

F34:
https://koji.fedoraproject.org/koji/taskinfo?taskID=62151374

Comment 21 Ilya Lipnitskiy 2021-02-17 18:09:23 UTC
(In reply to Sergio Basto from comment #17)
> build in rawhide [2] almost pass except on s390x ...
You may want to try with new STAT_VER changes for different architectures. https://salsa.debian.org/clint/fakeroot/-/merge_requests/12

 #elif defined (__powerpc__) && __WORDSIZE == 64
  #define _STAT_VER 1
 #elif defined (__riscv) && __riscv_xlen==64
  #define _STAT_VER 0
 #elif defined (__s390x__)
  #define _STAT_VER 1

Comment 22 Sergio Basto 2021-02-18 12:22:17 UTC
(In reply to Ilya Lipnitskiy from comment #21)
> (In reply to Sergio Basto from comment #17)
> > build in rawhide [2] almost pass except on s390x ...
> You may want to try with new STAT_VER changes for different architectures.
> https://salsa.debian.org/clint/fakeroot/-/merge_requests/12
> 
>  #elif defined (__powerpc__) && __WORDSIZE == 64
>   #define _STAT_VER 1
>  #elif defined (__riscv) && __riscv_xlen==64
>   #define _STAT_VER 0
>  #elif defined (__s390x__)
>   #define _STAT_VER 1

thank you , it built on F35 [1] , with glibc  2.33.9000 (2.34 alfa or beta something) but doesn't build on F34 glibc 2.32.9000 (2.33 alfa or beta something) 


https://koji.fedoraproject.org/koji/packageinfo?packageID=1704

Comment 23 Florian Weimer 2021-02-18 12:53:51 UTC
The Fedora 34 build (checked on i686) does not interpose mknod:

# eu-readelf --symbols=.dynsym /bin/mknod ./obj-sysv/.libs/libfakeroot.so | grep mknod
   43: 00000000      0 FUNC    GLOBAL DEFAULT    UNDEF mknod (5)
   77: 0000f340      4 OBJECT  GLOBAL DEFAULT       23 next___xmknodat
   86: 0000f344      4 OBJECT  GLOBAL DEFAULT       23 next___xmknod
  173: 00007ee0    244 FUNC    GLOBAL DEFAULT       13 __xmknodat
  193: 00004f00     84 FUNC    GLOBAL DEFAULT       13 tmp___xmknod
  219: 00004f60    116 FUNC    GLOBAL DEFAULT       13 tmp___xmknodat
  248: 00007df0    228 FUNC    GLOBAL DEFAULT       13 __xmknod

coreutils-8.32-18.fc34.i686 uses mknod:

# eu-readelf --symbols=.dynsym /bin/mknod | grep mknod
/bin/mknod:
   43: 00000000      0 FUNC    GLOBAL DEFAULT    UNDEF mknod (5)

So the call goes straight to glibc and the kernel, without interception.

I haven't checked what happens on rawhide. It could be that coreutils is built differently there, or that mknod is permitted in the build chroot there.

Comment 24 Sergio Basto 2021-02-18 14:26:52 UTC
Coreutils is the same on F34 and F35 


DEBUG util.py:446:   coreutils                     x86_64 8.32-18.fc34                  build 1.1 M

DEBUG util.py:446:   bash                          x86_64 5.1.4-1.fc35                  build 1.7 M
DEBUG util.py:446:   bzip2                         x86_64 1.0.8-6.fc34                  build  53 k
DEBUG util.py:446:   coreutils                     x86_64 8.32-18.fc34                  build 1.1 M

Comment 25 Ilya Lipnitskiy 2021-02-22 19:37:04 UTC
fakeroot only intercepts new symbols (like mknod) when the following is true:
   #if defined(__GLIBC__) && __GLIBC_PREREQ(2,33)

If it's false, only __xmknod will be intercepted.

It is surprising to see F34 (which is pre 2.33 glibc, right?) using mknod and not __xmknod.

Comment 26 Sergio Basto 2021-02-22 20:36:02 UTC
(In reply to Ilya Lipnitskiy from comment #25)
> fakeroot only intercepts new symbols (like mknod) when the following is true:
>    #if defined(__GLIBC__) && __GLIBC_PREREQ(2,33)
> 
> If it's false, only __xmknod will be intercepted.
> 
> It is surprising to see F34 (which is pre 2.33 glibc, right?) using mknod
> and not __xmknod.


That its , only on 2021-02-19, fweimer updated to glibc 2.33 upstream release.

Fixed, now I got the same problem with fakechroot , bug #1901049 , if you help me , I will be grateful. 

Thank you.

Comment 27 Florian Weimer 2021-02-22 20:59:34 UTC
(In reply to Sergio Basto from comment #26)
> (In reply to Ilya Lipnitskiy from comment #25)
> > fakeroot only intercepts new symbols (like mknod) when the following is true:
> >    #if defined(__GLIBC__) && __GLIBC_PREREQ(2,33)
> > 
> > If it's false, only __xmknod will be intercepted.
> > 
> > It is surprising to see F34 (which is pre 2.33 glibc, right?) using mknod
> > and not __xmknod.
> 
> That its , only on 2021-02-19, fweimer updated to glibc 2.33 upstream
> release.

That was basically a version number change only. If I read the records correctly, the mknod change landed in glibc-2.32.9000-11.fc34 back in October.

However, programs need to be rebuilt before they pick up mknod. Before that, they keep using __xmknod, so there is a delay until the change becomes visible at the symbol level.

Comment 28 Ilya Lipnitskiy 2021-02-23 04:21:18 UTC
(In reply to Florian Weimer from comment #27)
> However, programs need to be rebuilt before they pick up mknod.

Latest fakeroot intercepts both mknod and __xmknod with glibc 2.33, so no rebuild should be required to make it work with fakeroot.

Maybe the macro check needs to be more elaborate, but since Fedora is okay now it seems we are done here (for fakeroot at least)


Note You need to log in before you can comment on or make changes to this bug.