-
Notifications
You must be signed in to change notification settings - Fork 221
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
libc-wrappers: Ensure binaries built on Fedora 35 run on older Fedoras #829
Conversation
b678d1f
to
27605eb
Compare
Build failed.
|
Build failed.
|
recheck |
Build failed.
|
recheck |
This successfully works on my Fedora Silverblue Rawhide machine with |
Build succeeded.
|
Please, rebase without the test because it has been separated into #831 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The wrapping seems to do the job, so let's ship it! Just make sure to rebase without the test.
Seems I used a different branch and put the test there by accident. Rebasing. |
f77b68a
to
27605eb
Compare
Build succeeded.
|
anything preventing this from merging rn ? |
We are working on reviewing it and checking alternative approaches to fix this. |
A subsequent commit will add more wrappers to cover new symbol versions introduced in glibc-2.34. This will make it easier to read because it won't disrupt the rest of the build parameters. containers#821
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for working on this, @olivergs !
It would be good to mention the user-visible problem in the commit message, because the names of the wrapped functions is somewhat obvious from just looking at the commit. eg., the version of Fedora or glibc that triggered this issue.
27605eb
to
95c1239
Compare
Build succeeded.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It will be good to have at least some references to the glibc changes in our commit message. Otherwise, it's difficult for the uninitiated to validate the changes.
95c1239
to
17e2ab7
Compare
Build succeeded.
|
A subsequent commit will add more wrappers to cover new symbol versions introduced in glibc-2.34. This will make it easier to read by clearly segregating the file into separate sections for each wrapper. containers#821
Recently, glibc-2.34, which is used by Fedora 35 onwards, added new versions of the pthread_attr_getstacksize [1], pthread_create [2] and pthread_detach [3] symbols as part of the libpthread removal project [4]: $ objdump -T /usr/bin/toolbox | grep GLIBC_2.34 ... 0000000000000000 DF *UND* 0000000000000000 GLIBC_2.34 pthread_detach 0000000000000000 DF *UND* 0000000000000000 GLIBC_2.34 pthread_create 0000000000000000 DF *UND* 0000000000000000 GLIBC_2.34 pthread_attr_getstacksize This means that /usr/bin/toolbox binaries built against glibc-2.34 on newer Fedoras pick up the latest version of the symbols and fail to run against older glibcs in older Fedoras. [1] glibc commit ee092efed40d667b https://sourceware.org/git/?p=glibc.git;a=commit;h=ee092efed40d667b [2] glibc commit f47f1d91af985a90 https://sourceware.org/git/?p=glibc.git;a=commit;h=f47f1d91af985a90 [3] glibc commit df65f897e9501aa5 https://sourceware.org/git/?p=glibc.git;a=commit;h=df65f897e9501aa5 [4] https://sourceware.org/ml/libc-alpha/2019-10/msg00080.html containers#821
17e2ab7
to
216314d
Compare
Build succeeded.
|
This fix is not complete. Trying to launch a toolbox container with this patch applied generates the following error message in the container entry-point:
Either we try to fine-tune this patch or we'll have to use a different approach to fix this issue. |
recheck |
Build failed.
|
This approach of restricting the versions of the glibc symbols that are linked against isn't actually supported by glibc, and breaks if the early process start-up code changes. That's why it doesn't work with glibc-2.34, which is used by Fedora 35 onwards, because a new version of the |
Let's try #897 |
#821