-
Notifications
You must be signed in to change notification settings - Fork 2.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
bash: error while loading shared libraries: libc.so.6: cannot change memory protections #10817
Comments
It was suggested that this is a known issue due to a necessary SELinux policy update. with a documented workaround: Temporarily run in permissive mode ( |
I'm told there is a package update in the works that will resolve this issue. We can close this once it goes GA. |
I might be wrong, but I wonder if this is affecting #10829 (comment) and #10829 (comment) I'm on PTO next week, so I'll check back in on this when I return. |
Almost always memory protection errors are caused by SELinux. |
I'm back now, started fresh build of VM images for CI, will also update my laptop's F33 and try to reproduce... |
sigh...this appears to still be a problem in F33 😿 |
Chris what errors are you seeing? /dev/heap? Or issues with containers not able to use libc.s0.6? If the later, I think the issue is the labeling of the underlying content for rootless containers? |
Yes the later. I swore I remember from an IRC convo. a few weeks ago that a package update was coming in a week or so. I'm fully updated and just rebooted this morning:
Everything under |
The dma_heap stuff was fixed. I think the problem we are having is the newer kernel supports rootless overlay. Before we were relying on fuse_overlay to set the labels correctly on the underlying directories. Now the labels are coming through and SELinux does not like them. Rootless SELinux expects the labels to match /var/lib/containers/storage. system_u:object_r:container_var_lib_t:s0 |
Oooooooohhh, that makes sense, I bet you're right. Trying now... |
No love 😭
I think you're onto something though (and it explains why we don't catch this in CI):
Works fine. |
Was there an issue open on that? I'm seeing it reproduce on F33 in CI with fresh images. |
Answer to my own question: the dma_heap problem is fixed by Still, I think the problem originally reported in this issue still stands. I'll confirm after updating and rebooting... |
Tried again after fully updating, including
|
Seeing this exact issue with:
|
Have you checked SELinux? |
Update: This problem has been observed recently in F35 as well. Though the ultimate cause is unknown at this time, the trouble comes from the same mechanism: Wrong SELinux type labels set on You can use As for the root-cause, certainly things like tarball or backup restores from earlier Fedora versions, could easily be blamed. |
This seems to be happening when containers-selinux package is updating, something is failing. Container-selinux is supposed to fix the labels in the homedir. |
IIRC from a BZ, the update scriptlet ignores errors. There are also cases not covered (like a post-upgrade tar/backup resotre) or non-standard home directory locations. In other words, the scriptlet probably helps, but the underlying environment is still not fully defined (or definable), so it's still possible to encounter this 😢 |
The |
What AVCs are you seeing? |
Oh, good recommendation on checking, it's not in my home directory.
Here is the sample containerfile:
And just running:
|
Dan will have a for-sure answer for you, but |
Try restorecon -R -F $HOME/.local/share/containers It looks like you relabeled the homedir ( $HOME/.local/share/containers) content while in a container. |
|
For some (unknown) reason /home/zuul-worker/.local/share/containers selinux permissions are wrong and podman will not run properly. Creating the same dir before running podman with the right permissions made the trick. Ref. containers/podman#10817
For some (unknown) reason /home/zuul-worker/.local/share/containers selinux permissions are wrong and podman will not run properly. Creating the same dir before running podman with the right permissions made the trick. Ref. containers/podman#10817 Co-authored-by: Hunor Csomortáni <[email protected]>
Fix CI in zuul For some (unknown) reason /home/zuul-worker/.local/share/containers selinux permissions are wrong and podman does not run properly. Creating the directory before running podman with the right permissions made the trick. Ref. containers/podman#10817 Fix packit/packit-service#1456 Reviewed-by: Hunor Csomortáni <[email protected]> Reviewed-by: Maja Massarini <None> Reviewed-by: Matej Focko <None> Reviewed-by: Jiri Popelka <None>
I still get this error with Fedora 36, Running the same command as root on the machine does work. Not sure what is broken but is broken even with 4.2.1. |
@ssbarnea what I did was:
|
I got a similar error when attempting to run a container from a brand new system user account on Fedora IoT 37. |
Guess this can be closed. |
err, maybe I closed too soon. @ssbarnea do you still see this with the latest podman v4.5.0 on fedora 37/38 ? |
I'm on Fedora 38, Podman 4.5.0 and I no longer see this issue 🥳 |
I'm on Fedora 38, podman 4.5.0: But |
Weird did container-selinux blow up during an install? |
Is this a BUG REPORT or FEATURE REQUEST? (leave only one on its own line)
/kind bug
Description
After updating Fedora 33 to podman 3.1.2 I started getting this error whenever trying to run a container
Steps to reproduce the issue:
On a Fedora 33 system, update to podman 3.1.2
As a regular user, run
podman system reset
to ensure a clean stateAs the same user, run
podman run -it --rm fedora:33
(or alpine or basically any container that uses bash)Describe the results you received:
bash: error while loading shared libraries: libc.so.6: cannot change memory protections
In
/var/log/audit/audit.log
:Describe the results you expected:
A bash prompt
Additional information you deem important (e.g. issue happens only occasionally):
Output of
podman version
:Output of
podman info --debug
:Package info (e.g. output of
rpm -q podman
orapt list podman
):Have you tested with the latest version of Podman and have you checked the Podman Troubleshooting Guide? (https://github.com/containers/podman/blob/master/troubleshooting.md)
No
Additional environment details (AWS, VirtualBox, physical, etc.):
Attempting to run the
alpine
container gives a different error message, but similar SELinux errors.The text was updated successfully, but these errors were encountered: