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 1778236 - Problems linking to zlib corrected if zlib is linked with -Bsymbolic-functions
Summary: Problems linking to zlib corrected if zlib is linked with -Bsymbolic-functions
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: zlib
Version: 7.4
Hardware: All
OS: Linux
unspecified
medium
Target Milestone: rc
: ---
Assignee: Ondrej Dubaj
QA Contact: RHEL CS Apps Subsystem QE
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2019-11-29 14:43 UTC by Paulo Andrade
Modified: 2023-09-07 21:08 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2020-01-29 13:15:49 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Bugzilla 1778234 0 unspecified CLOSED Request For Comments: -Bsymbolic-functions in LDFLAGS by default 2021-02-22 00:41:40 UTC

Description Paulo Andrade 2019-11-29 14:43:27 UTC
User has a not so common use case where legacy code causes problem
when there are multiple zlib versions linked to a final binary.
  There should be very few, if any, risks of regressions if zlib is
linked with -Bsymbolic-functions. As an example, Ubuntu has it as
default for several releases already, and not just for zlib, but for
most packages.

Comment 2 Ondrej Dubaj 2019-12-02 10:33:21 UTC
Hello,

sending build of of zlib with -Bsymbolic-functions flag added to LDFLAGS

https://brewweb.engineering.redhat.com/brew/taskinfo?taskID=25070902

Can you please point to a version of debian package of zlib, where this flag is used?
Thank you!

Comment 3 Ondrej Dubaj 2019-12-02 11:05:41 UTC
Can you please install and test these new RPMs and tell, if it solves your issues?

Thank you.

Comment 4 Paulo Andrade 2019-12-02 12:15:54 UTC
  Hi,

  At least Ubuntu 18.0.4 and newer have this default:

$ dpkg-buildflags --get LDFLAGS
-Wl,-Bsymbolic-functions -Wl,-z,relro

  Still uncertain if it is also default on Debian. Googleing for this and
it appears to be the default also to Debian for some time.

Comment 5 Ondrej Dubaj 2019-12-04 11:09:56 UTC
I came to the same conclusion. Are the newly-built RPMs resolving your issue? Can you test them? From my point of view it should work, but I do not have a reproducer to test them.

Comment 7 Paulo Andrade 2019-12-05 12:01:02 UTC
On initial tests, the user confirms everything appears to work as expected.
Still waiting for extra feedback when they test their entire workflow.

Comment 8 Ondrej Dubaj 2019-12-13 06:30:15 UTC
Good to hear that, we are considering adding this feature to rhel-8, as rhel-7.9 won't get any updates, which do not appear as critical. Is it a solution for you issue?
Thanks for your reply.

Comment 10 Paulo Andrade 2020-01-23 13:38:59 UTC
(In reply to Ondrej Dubaj from comment #8)
> Good to hear that, we are considering adding this feature to rhel-8, as
> rhel-7.9 won't get any updates, which do not appear as critical. Is it a
> solution for you issue?
> Thanks for your reply.

  The user is expecting this for rhel7, as they now have the test package
installed, and if there is an update, the problem will happen again.

Comment 11 Ondrej Dubaj 2020-01-27 12:27:36 UTC
I understand, can you please provide a concrete use-case or a reproducer, where we can test this issue? As you said, it is really a corner case and we are not aiming such things for rhel-7.9, as it should contain only high priority and critical issues. Is it a solution for you to resolve this issue in rhel-8 ?

Comment 12 Paulo Andrade 2020-01-27 12:43:12 UTC
It is third party software. It works on recent Ubuntu  (and I believe Debian)
that now have this default:

$ dpkg-buildflags --get LDFLAGS
-Wl,-Bsymbolic-functions -Wl,-z,relro

There is an example of the problem at
https://github.com/madler/zlib/issues/454 that somewhat mimic what the user
is experiencing.

The issue should be either, the user has software with 2 versions of zlib,
or a symbol somewhere that have a name clashing with a zlib symbol. Zlib, at
least as of version 1.2.7 has broken symbol versioning, at least of the
deflateReset symbol, that is what the github issue shows.

I suspect Ubuntu is using -Bsymbolic-functions to solve issues with third
party software, but mainly due to its side effect of less relocations:

Ubuntu:
$ readelf -r libz.so.1.2.11
Relocation section '.rela.plt' at offset 0x1d88 contains 17 entries:
...

RHEL7:
$ readelf -r libz.so.1.2.7
Relocation section '.rela.plt' at offset 0x1a10 contains 46 entries:
...

Comment 13 Ondrej Dubaj 2020-01-28 11:59:38 UTC
Can you please explain, how it is possible to have 2 versions of zlib installed? Are both those versions shipped by RedHat?
Or if there are only 2 versions of symbol installed on a system. Can you please say, which symbols are causing the problem?

Thank you.

Comment 14 Paulo Andrade 2020-01-28 13:07:55 UTC
This specific case is a proprietary binary, that from my understanding
is very complex, apparently some shared objects are linked to one version
of zlib and shared objects that use the system zlib trigger the problem
with the deflateReset symbol.

Comment 16 Ondrej Dubaj 2020-01-29 07:43:48 UTC
I may understand the issue. But from my point of view it is really a corner case, which does not seem to be a candidate for rhel-7.9 fix. Are those shared objects which are linked to final binary shipped by RedHat, or is it some kind of third party software?

Comment 17 Ondrej Dubaj 2020-01-29 08:06:22 UTC
From the discussion, I understand that you already have a workaround for this problem. Can you confirm that?

Comment 18 Paulo Andrade 2020-01-29 11:58:50 UTC
These are a large set of binaries from different vendors. The problematic ones
are not shipped by Red Hat from what I understood.

The workaround so far was the test build from comment #2.

Comment 19 Ondrej Dubaj 2020-01-29 13:15:49 UTC
If the shared objects are not shipped by RedHat, this is not a case which we want to support. If there is an existing workaround for rhel-7, we will consider this enhancement for rhel-8.3, but not for rhel-7. Closing this bug as CLOSED:WONTFIX. If there is another business reason to resolve this issue, please feel free to reopen this bug and we will consider fixing it.


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