-
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
podman run: gives error while loading shared libraries: libc.so.6: cannot change memory protections #3234
Comments
Alright, we're probably getting an AVC. Can you retrieve it? If you run the failing |
Is this using an arm image? Or did it pull an X86 image? |
@rhatdan aarch64 image, seen the same thing there. Also for the record I have done relabel there. |
Well it could be SELinux, @jcajka Does it work if you do a |
yes, it works with |
Then can you get the AVC messages either by executing ausearch -m avc -ts recent Or |
Did you change the location of container/storage? |
output after immediate run
|
Don't think so. Is there a way to check that? I already removed contents from /var/lib/containers and /home/root/containers/ but no luck |
What does podman info state? |
Basically this AVC incidates that /usr/lib64/libtinfo.so.6.1 is labeled as if it was in a users home directory. |
podman info output is in #3234 (comment) |
|
Ok I missed this up front. If you are going to move the container storage to another location, then you will need to fix the labels. /home/root/containers/storage
Also you should not move RunRoot, just leave it on /run. RunRoot: /home/root/containers/storage This should be available to root users. You want the runroot stored on a tmpfs, so a reboot cleans it out. RunRoot: /var/run/containers/storage |
This is not a bug, but a configuration issue. |
Hi, I didn't change anything in my config. The |
...I have the same issue, on Fedora 33 also. Same paths as tremes above; same error "/bin/sh: error while loading shared libraries: libc.so.6: cannot change memory protections" on running
AVC avc: denied { read } for pid=16198 comm="httpd-foregroun" path="/lib/x86_64-linux-gnu/libc-2.28.so" dev="dm-0" ino=5068683 scontext=system_u:system_r:container_t:s0:c12,c883 tcontext=unconfined_u:object_r:data_home_t:s0 tclass=file permissive=0 |
Looks like container-selinux-2.163.0-2.fc33 never built for f33, you will need this with the latest kernel. https://koji.fedoraproject.org/koji/taskinfo?taskID=71960590 |
can we get that in a bodhi update? |
Way ahead of you. |
Nice. Thank you @rhatdan. |
@rhatdan, I am experiencing the same on fedora 33(kernel 5.13.4) running rootless podman v3.1.2 in combination with container-selinux-2.160.2-1.fc33.noarch. I also get the following when trying to build with rootless podman: Are we obliged to download container-selinux-2.163.0-2.fc33 through bodhi/koji to fix this in fedora33 or is a newer version of that package going to be released soon in the official repos? |
You should be able to get it via updates-testing, and it should be available soon in release. |
Looks like it will be pushed to stable in 5 days. |
Super, thanks! |
I still have this on fedora-silverblue rawhide
|
Could you run restorecon -R -v $HOME/.local/share/containers This might be a problem in silverblue or any rpmostree based OS. Since rpm post install scripts do not run. |
Sorry . No switched to ubuntu yesterday. |
I am as well running fedora 33. I had the same issue after doing a "dnf update" yesterday. Just did another dnf update today. Everything back to normal now. I can confirm the container-selinux did a restorecon on almost the whole system. Though I have to admit that I can feel the pain @stbischof has. Almost forgot to thank you @rhatdan for quickly fixing the issue! |
This was caused by a kernel update allowing for a new feature. We saw this coming, and fixed it in F34 and Rawhide, before it hit, or as soon as it hit. We had a fix for this in F33, but the package was not building, and no one noticed it until people started complaining. |
Based on the discussion in bugzilla 1868590 executing the following fixed this issue on Fedora 35 for me: # Note: This will reset your podman configuration to the default
$ podman system reset |
That fixed the issue for me, thanks a ton ^^ |
I'm just starting out with podman, and I got this message on fedora 35, upgraded to 36, and am still seeing it: [peter@fedora local-projects]$ podman system reset |
@rhatdan PTAL |
This usually means container-selinux is not properly installed $ sudo yum reinstall container-selinux Should fix the problem. |
This did indeed fix things for me, thanks! |
Hi, I have moved the storage path for rootless podman by setting I have tried running Is it even possible to have the storage location for rootless podman changed when using SELinux? |
What does What AVCs are you seeing? |
Everything in /shared/ol9-arm/podman-storage is labeled The AVC I get when running
|
Never mind, I was just stupid when setting fcontext Equivalance. Turns out I set This meant that when running Changing this to |
I'm using RHEL 8.7 and get this issue. I tried this:
Unfortunately it still fails:
Is there anything else to try? I haven't changed any configurations at all except adding myself to |
Ah the workaround listed here worked. Basically disable SELinux.
Not ideal but it'll do for now. |
Please don't jump onto an issue that is years old. Guaranteed the homedir is mislabled. I would figue Is your homedir? What is it's label? |
Open a new discussion, and I will help you fix the labels. |
I was facing the same issue. Just applying the correct SELinux labels does not help. Background$ lsb_release
LSB Version: :core-4.1-amd64:core-4.1-noarch
Distributor ID: Fedora
Description: Fedora release 37 (Thirty Seven)
Release: 37
Codename: ThirtySeven
$ ls -lZ .local/share/containers
drwx------. 1 user user system_u:object_r:container_var_lib_t:s0 50 Mar 21 11:29 cache
drwx------. 1 user user system_u:object_r:container_var_lib_t:s0 222 Mar 21 11:29 storage
$ ls -lZ /var/lib/containers
drwxr-xr-x. 1 root root system_u:object_r:container_var_lib_t:s0 0 Feb 14 14:42 sigstore
drwxr-xr-x. 1 root root system_u:object_r:container_var_lib_t:s0 6 Mar 12 22:06 storage Even the containers folder has the same permissions
Error$ podman run -p 5000:5000 -it centos bash
bash: error while loading shared libraries: libtinfo.so.6: cannot change memory protections journalCTL
SolutionAfter correctly applying the SELinux labels, please run podman system reset |
Please open a new discussion. |
Is this a BUG REPORT or FEATURE REQUEST? (leave only one on its own line)
kind bug
Description
podman run gives error while trying to run a container
Describe the results you expected:
podman should run container and give bash prompt inside container
Additional information you deem important (e.g. issue happens only occasionally):
Tried few things but dind't get fixed:
restorecon -R -v /var/lib/containers
restorecon -R -v /var/lib/containers
/var/lib/containers
and/home/root/containers/
Note:
podman run
works with selinux set toPermissive
Output of
podman version
: podman-1.2.0-2.git3bd528e.fc29.aarch64Output of
podman info --debug
:Additional environment details (AWS, VirtualBox, physical, etc.):
The text was updated successfully, but these errors were encountered: