RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 1924665 - Unexpected shifting elfdepargs --filter-private
Summary: Unexpected shifting elfdepargs --filter-private
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 8
Classification: Red Hat
Component: rpm-mpi-hooks
Version: 8.2
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: rc
: 8.5
Assignee: Honggang LI
QA Contact: zguo
URL:
Whiteboard:
Depends On:
Blocks: 1930096
TreeView+ depends on / blocked
 
Reported: 2021-02-03 12:12 UTC by Xiaofeng
Modified: 2021-11-10 08:19 UTC (History)
5 users (show)

Fixed In Version: rpm-mpi-hooks-8-2.el8
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
: 1930096 (view as bug list)
Environment:
Last Closed: 2021-11-09 19:41:27 UTC
Type: Bug
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2021:4412 0 None None None 2021-11-09 19:41:43 UTC

Description Xiaofeng 2021-02-03 12:12:50 UTC
Description of problem:

``GLIBC_PRIVATE`` has not been filtered after defining ``%global __filter_GLIBC_PRIVATE 1``. 

Version-Release number of selected component (if applicable):

rpm-mpi-hooks-5-4.el8.noarch

How reproducible:

The spec can be found here at https://github.com/apache/incubator-brpc/blob/master/package/rpm/brpc.spec.

The output of ``rpmbuild`` show that it using ``mpi.req`` to generate requires info. And I find that ``--filter-private`` as the first argument has been shifted.


```
D: /home/xxx/BUILDROOT/brpc-0.9.8-3.el8.x86_64/usr/lib/.build-id: directory
D: /home/xxx/BUILDROOT/brpc-0.9.8-3.el8.x86_64/usr/lib/.build-id/a1: directory
D: /home/xxx/BUILDROOT/brpc-0.9.8-3.el8.x86_64/usr/lib/.build-id/a1/c5ff47fbd927a009e0279540aeb057a0903bc0: symbolic link to ../../../../usr/lib64/libbrpc.so
D: /home/xxx/BUILDROOT/brpc-0.9.8-3.el8.x86_64/usr/lib64/libbrpc.so: ELF 64-bit LSB shared object, x86-64, version 1 (GNU/Linux), dynamically linked, BuildID[sha1]=a1c5ff47fbd927a009e0279540aeb057a0903bc0, stripped
D: Executing /usr/lib/rpm/mpi.prov --filter-private on /home/xxx/BUILDROOT/brpc-0.9.8-3.el8.x86_64/usr/lib64/libbrpc.so

D: 	execv(/usr/lib/rpm/mpi.prov) pid 188809
D: 	waitpid(188809) rc 188809 status 0
D: Executing /usr/lib/rpm/mpi.req --filter-private on /home/xxx/BUILDROOT/brpc-0.9.8-3.el8.x86_64/usr/lib64/libbrpc.so

D: 	execv(/usr/lib/rpm/mpi.req) pid 188860
args to mpi.req: --filter-private
D: 	waitpid(188860) rc 188860 status 0
===================================== final: files 4 cdict[3] 75% ddictx[42]
  0 /home/xxx/BUILDROOT/brpc-0.9.8-3.el8.x86_64/usr/lib/.build-id	directory [none]
  1 /home/xxx/BUILDROOT/brpc-0.9.8-3.el8.x86_64/usr/lib/.build-id/a1	directory [none]
  2 /home/xxx/BUILDROOT/brpc-0.9.8-3.el8.x86_64/usr/lib/.build-id/a1/c5ff47fbd927a009e0279540aeb057a0903bc0	 [none]
  3 /home/xxx/BUILDROOT/brpc-0.9.8-3.el8.x86_64/usr/lib64/libbrpc.so	0x2 [mpi]
	P libbrpc.so()(64bit)
	R libdl.so.2(GLIBC_2.2.5)(64bit)
	R libgcc_s.so.1(GCC_3.0)(64bit)
	R libm.so.6(GLIBC_2.2.5)(64bit)
	R ld-linux-x86-64.so.2(GLIBC_2.3)(64bit)
	R libpthread.so.0(GLIBC_2.3.2)(64bit)
	R libpthread.so.0(GLIBC_2.2.5)(64bit)
	R libcrypto.so.1.1(OPENSSL_1_1_0)(64bit)
	R libc.so.6(GLIBC_PRIVATE)(64bit)
	R libc.so.6(GLIBC_2.3)(64bit)
	R libc.so.6(GLIBC_2.17)(64bit)
	R libc.so.6(GLIBC_2.6)(64bit)
	R libc.so.6(GLIBC_2.14)(64bit)
	R libc.so.6(GLIBC_2.3.2)(64bit)
	R libc.so.6(GLIBC_2.2.5)(64bit)
	R libssl.so.1.1(OPENSSL_1_1_0)(64bit)
	R libstdc++.so.6(GLIBCXX_3.4.18)(64bit)
	R libstdc++.so.6(CXXABI_1.3.8)(64bit)
	R libstdc++.so.6(CXXABI_1.3.5)(64bit)
	R libstdc++.so.6(GLIBCXX_3.4.9)(64bit)
	R libstdc++.so.6(GLIBCXX_3.4.15)(64bit)
	R libstdc++.so.6(GLIBCXX_3.4.11)(64bit)
	R libstdc++.so.6(CXXABI_1.3)(64bit)
	R libstdc++.so.6(GLIBCXX_3.4.20)(64bit)
	R libstdc++.so.6(GLIBCXX_3.4)(64bit)
	R libstdc++.so.6(GLIBCXX_3.4.21)(64bit)
	R libgflags.so.2.1()(64bit)
	R libprotobuf.so.15()(64bit)
	R libpthread.so.0()(64bit)
	R libleveldb.so.1()(64bit)
	R libprotoc.so.15()(64bit)
	R libcrypto.so.1.1()(64bit)
	R libdl.so.2()(64bit)
	R libz.so.1()(64bit)
	R libssl.so.1.1()(64bit)
	R librt.so.1()(64bit)
	R libstdc++.so.6()(64bit)
	R libm.so.6()(64bit)
	R libgcc_s.so.1()(64bit)
	R libc.so.6()(64bit)
	R ld-linux-x86-64.so.2()(64bit)
	R rtld(GNU_HASH)
```


Steps to Reproduce:
1. 
2. 
3.

Actual results:


Expected results:


Additional info:

Comment 1 Honggang LI 2021-02-18 00:21:29 UTC
I can't trigger the error. Please provide a reproducer for me. Thanks

[root@ incubator-brpc (master)]$ cat /etc/redhat-release 
Red Hat Enterprise Linux release 8.4 Beta (Ootpa)

[root@ incubator-brpc (master)]$ rpm -qa | grep mpi
openmpi-devel-4.0.5-3.el8.x86_64
protobuf-compiler-3.5.0-13.el8.x86_64
compiler-rt-11.0.0-1.module+el8.4.0+8598+a071fcd5.x86_64
rpm-mpi-hooks-5-4.el8.noarch
openmpi-4.0.5-3.el8.x86_64

$ git clone https://github.com/apache/incubator-brpc.git
$ git archive --format=tar --prefix=incubator-brpc-0.9.7/ HEAD | gzip > /root/rpmbuild/SOURCES/incubator-brpc-0.9.7.tar.gz
$ rpmbuild  -ba package/rpm/brpc.spec  2>&1 | tee log
......
Recommends: brpc-debugsource(x86-64) = 0.9.7-1.el8
Checking for unpackaged file(s): /usr/lib/rpm/check-files /root/rpmbuild/BUILDROOT/brpc-0.9.7-1.el8.x86_64
Wrote: /root/rpmbuild/SRPMS/brpc-0.9.7-1.el8.src.rpm
Wrote: /root/rpmbuild/RPMS/x86_64/brpc-0.9.7-1.el8.x86_64.rpm
Wrote: /root/rpmbuild/RPMS/x86_64/brpc-devel-0.9.7-1.el8.x86_64.rpm
Wrote: /root/rpmbuild/RPMS/x86_64/brpc-static-0.9.7-1.el8.x86_64.rpm
Wrote: /root/rpmbuild/RPMS/x86_64/brpc-debugsource-0.9.7-1.el8.x86_64.rpm
Wrote: /root/rpmbuild/RPMS/x86_64/brpc-debuginfo-0.9.7-1.el8.x86_64.rpm

Comment 2 Xiaofeng 2021-02-18 03:13:57 UTC
Hi Honggang,

Thanks for the attention.

The problem is not cannot generate the RPMs, but the GLIBC_PRIVATE cannot be filtered out, does your building show the GLIBC_PRIVATE Requires like below?

Requires: ... libc.so.6(GLIBC_PRIVATE)(64bit) ...

If no, I will try to reproduce it in a mock or fresh environment. Thanks.


And I have upgraded the os to 8.3, the same problem.

$ cat /etc/redhat-release 
Red Hat Enterprise Linux release 8.3 (Ootpa)

Comment 3 Xiaofeng 2021-02-18 03:56:03 UTC
Hi,

Here are the steps to reproduce the problem:
1. git clone https://github.com/apache/incubator-brpc.git && cd incubator-brpc
2. git archive --format=tar --prefix=incubator-brpc-0.9.7/ HEAD | gzip > /root/rpmbuild/SOURCES/incubator-brpc-0.9.7.tar.gz
3. add BuildRequires cmake and rpm-mpi-hooks(to reproduce problem only) to the spec file package/rpm/brpc.spec;
   ```
   BuildRequires:  cmake
   BuildRequires:  rpm-mpi-hooks
   ```
4. rpmbuild -bs package/rpm/brpc.spec
5. mock -r rhelepel-8-x86_64 /root/rpmbuild/SRPMS/brpc-0.9.7-1.el8.src.rpm


And here are parts of the outputs:
```
......
Processing files: brpc-0.9.7-1.el8.x86_64
Provides: brpc = 0.9.7-1.el8 brpc(x86-64) = 0.9.7-1.el8 libbrpc.so()(64bit)
Requires(rpmlib): rpmlib(CompressedFileNames) <= 3.0.4-1 rpmlib(FileDigests) <= 4.6.0-1 rpmlib(PayloadFilesHavePrefix) <= 4.0-1
Requires: ld-linux-x86-64.so.2()(64bit) ld-linux-x86-64.so.2(GLIBC_2.3)(64bit) libc.so.6()(64bit) libc.so.6(GLIBC_2.14)(64bit) libc.so.6(GLIBC_2.17)(64bit) libc.so.6(GLIBC_2.2.5)(64bit) libc.so.6(GLIBC_2.3)(64bit) libc.so.6(GLIBC_2.3.2)(64bit) libc.so.6(GLIBC_2.6)(64bit) libc.so.6(GLIBC_PRIVATE)(64bit) libcrypto.so.1.1()(64bit) libcrypto.so.1.1(OPENSSL_1_1_0)(64bit) libdl.so.2()(64bit) libdl.so.2(GLIBC_2.2.5)(64bit) libgcc_s.so.1()(64bit) libgcc_s.so.1(GCC_3.0)(64bit) libgflags.so.2.1()(64bit) libleveldb.so.1()(64bit) libm.so.6()(64bit) libm.so.6(GLIBC_2.2.5)(64bit) libprotobuf.so.15()(64bit) libprotoc.so.15()(64bit) libpthread.so.0()(64bit) libpthread.so.0(GLIBC_2.2.5)(64bit) libpthread.so.0(GLIBC_2.3.2)(64bit) librt.so.1()(64bit) libssl.so.1.1()(64bit) libssl.so.1.1(OPENSSL_1_1_0)(64bit) libstdc++.so.6()(64bit) libstdc++.so.6(CXXABI_1.3)(64bit) libstdc++.so.6(CXXABI_1.3.5)(64bit) libstdc++.so.6(CXXABI_1.3.8)(64bit) libstdc++.so.6(GLIBCXX_3.4)(64bit) libstdc++.so.6(GLIBCXX_3.4.11)(64bit) libstdc++.so.6(GLIBCXX_3.4.15)(64bit) libstdc++.so.6(GLIBCXX_3.4.18)(64bit) libstdc++.so.6(GLIBCXX_3.4.20)(64bit) libstdc++.so.6(GLIBCXX_3.4.21)(64bit) libstdc++.so.6(GLIBCXX_3.4.9)(64bit) libz.so.1()(64bit) rtld(GNU_HASH)
Processing files: brpc-devel-0.9.7-1.el8.x86_64
Provides: brpc-devel = 0.9.7-1.el8 brpc-devel(x86-64) = 0.9.7-1.el8 pkgconfig(brpc) = 0.9.0
Requires(rpmlib): rpmlib(CompressedFileNames) <= 3.0.4-1 rpmlib(FileDigests) <= 4.6.0-1 rpmlib(PayloadFilesHavePrefix) <= 4.0-1
Requires: /usr/bin/pkg-config
Processing files: brpc-static-0.9.7-1.el8.x86_64
Provides: brpc-static = 0.9.7-1.el8 brpc-static(x86-64) = 0.9.7-1.el8
Requires(rpmlib): rpmlib(CompressedFileNames) <= 3.0.4-1 rpmlib(FileDigests) <= 4.6.0-1 rpmlib(PayloadFilesHavePrefix) <= 4.0-1
Processing files: brpc-debugsource-0.9.7-1.el8.x86_64
Provides: brpc-debugsource = 0.9.7-1.el8 brpc-debugsource(x86-64) = 0.9.7-1.el8
Requires(rpmlib): rpmlib(CompressedFileNames) <= 3.0.4-1 rpmlib(FileDigests) <= 4.6.0-1 rpmlib(PayloadFilesHavePrefix) <= 4.0-1
Processing files: brpc-debuginfo-0.9.7-1.el8.x86_64
Provides: brpc-debuginfo = 0.9.7-1.el8 brpc-debuginfo(x86-64) = 0.9.7-1.el8 debuginfo(build-id) = 57ad6b8b7e90f007528be01fbae9e8d096090fcb
Requires(rpmlib): rpmlib(CompressedFileNames) <= 3.0.4-1 rpmlib(FileDigests) <= 4.6.0-1 rpmlib(PayloadFilesHavePrefix) <= 4.0-1
Recommends: brpc-debugsource(x86-64) = 0.9.7-1.el8
Checking for unpackaged file(s): /usr/lib/rpm/check-files /builddir/build/BUILDROOT/brpc-0.9.7-1.el8.x86_64
Wrote: /builddir/build/RPMS/brpc-0.9.7-1.el8.x86_64.rpm
Wrote: /builddir/build/RPMS/brpc-devel-0.9.7-1.el8.x86_64.rpm
Wrote: /builddir/build/RPMS/brpc-static-0.9.7-1.el8.x86_64.rpm
Wrote: /builddir/build/RPMS/brpc-debugsource-0.9.7-1.el8.x86_64.rpm
Wrote: /builddir/build/RPMS/brpc-debuginfo-0.9.7-1.el8.x86_64.rpm
......
```

libc.so.6(GLIBC_PRIVATE)(64bit) is not filter out as expected.

Thanks.

Comment 4 Honggang LI 2021-02-18 11:08:54 UTC
This issue can be reproduced with latest fedora  rpm-mpi-hooks build. So, I clone it for Fedora rawhide.

Comment 5 Honggang LI 2021-02-18 11:14:43 UTC
If the patch is right, I will backport it for RHEL once it merged into Fedora.

https://bugzilla.redhat.com/show_bug.cgi?id=1930096#c1

Comment 14 errata-xmlrpc 2021-11-09 19:41:27 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory (RDMA stack bug fix and enhancement update), and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2021:4412


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