-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
Crash under glibc 2.41 due to libopenlibm having an executable stack #57250
Comments
JuliaMath/openlibm#307 need to make sure 1.10 and 1.11 also have an openLibm with this PR |
This effectively breaks Julia on Arch Linux. Workaround: use
|
Thank you so, so much @maleadt for providing this workaround! That made it really easy to go back to work instead of trying to fix my system for half a day. |
Don't update glibc to 2.21. Issue with Julia, see JuliaLang/julia#57250. Also, inside arch news: https: //archlinux.org/news/glibc-241-corrupting-discord-installation/.
The Archlinux-packaged julia starts successfully, presumably because of the newer openlibm. |
Should v1.9 also get a fix for this, even though it's not supported any more? To prevent breaking CI. |
Probably not. 1.9 is not supported anymore so no reason to bother. |
It looks like Ubuntu 25.04 Plucky Puffin plans to include glibc-2.41 with a scheduled release near the end of April 2025, so this issue is going to impact distros beyond Arch and other rolling releases relatively soon. I agree Julia has no obligation to backport this fix further back than 1.10, but, in my opinion, backporting further would significantly help those community members trying to maintain backwards compatibility further back than supported by the language. For example, some packages like StaticArrays.jl still test on 1.6. Of course, it's the Julia maintainers' call since you're doing the work to make these changes. |
New builds of openlibm 0.8.1 (JuliaPackaging/Yggdrasil#10447) which include the fix (JuliaMath/openlibm#307) have been added to #57182 (julia v1.10.9) and #57183 (julia v1.11.4) |
Same issue on Gentoo, after glibc upgraded as part of regular system updates. execstack is not in the standard repo, but patchelf is, and the following command fixed it:
Just thought this might be helpful to anyone else who doesn't have the execstack utility. |
I do wonder if there might be a path towards no longer dynamically linking to glibc in the future, to never have to deal with issues like this again. |
You mean like statically linking a libc in julia and all shared libraries that interact with it? That'd be quite a lot of embedding. |
I don't think that's feasible since this change was IIUC in |
I don't think that's viable. Statically linking glibc is strongly discouraged, because some functionality depends on dynamic linking. Furthermore, it's not in general possible to completely avoid libc, because some systems, unlike Linux, don't have a stable syscall interface. EDIT: I think the Golang folks had similar ambitions in the beginning, but had to reverse track. |
I was thinking of the viability of a statically compiled
Thanks for the context 👍 |
With glibc-2.41,
I get the following error trying to run Julia 1.9.4, 1.10.8, and 1.11.3.
Nightly (1.12.0-DEV.1971) starts without an error.
Downgrading to glibc-2.40 and lib32-glibc-2.40 fixes the error on all versions.
I assume it's the same issue as ValveSoftware/portal2#451 which as the author points out, likely results from this change in glibc-2.41:
https://lists.gnu.org/archive/html/info-gnu/2025-01/msg00014.html
library requires it, either implicitly because of a missing GNU_STACK
ELF header (and default ABI permission having the executable bit set)
or explicitly because of the executable bit in GNU_STACK, and the
stack is not already executable. Instead, loading such objects will
fail.
The text was updated successfully, but these errors were encountered: