Skip to content
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

Invalid entry point for Ubuntu 20.04 #42

Closed
nsmlzl opened this issue Oct 19, 2022 · 17 comments
Closed

Invalid entry point for Ubuntu 20.04 #42

nsmlzl opened this issue Oct 19, 2022 · 17 comments
Labels
bug Something isn't working need-info Further information is requested

Comments

@nsmlzl
Copy link

nsmlzl commented Oct 19, 2022

The image of Ubuntu 20.04 does not work for me. Ubuntu 22.04 works fine.

$ toolbox create --image quay.io/toolbx-images/ubuntu-toolbox:20.04
Image required to create toolbox container.
Download quay.io/toolbx-images/ubuntu-toolbox:20.04 (500MB)? [y/N]: y
Created container: ubuntu-toolbox-20.04
Enter with: toolbox enter ubuntu-toolbox-20.04

$ toolbox --verbose enter ubuntu-toolbox-20.04 
DEBU Running as real user ID 1000                 
DEBU Resolved absolute path to the executable as /usr/bin/toolbox 
DEBU Running on a cgroups v2 host                 
DEBU Checking if /etc/subgid and /etc/subuid have entries for user niklas 
DEBU Validating sub-ID file /etc/subuid           
DEBU Validating sub-ID file /etc/subgid           
DEBU TOOLBOX_PATH is /usr/bin/toolbox             
DEBU Migrating to newer Podman                    
DEBU Toolbox config directory is /home/niklas/.config/toolbox 
DEBU Current Podman version is 3.4.4              
DEBU Creating runtime directory /run/user/1000/toolbox 
DEBU Old Podman version is 3.4.4                  
DEBU Migration not needed: Podman version 3.4.4 is unchanged 
DEBU Resolving container and image names          
DEBU Container: 'ubuntu-toolbox-20.04'            
DEBU Distribution: ''                             
DEBU Image: ''                                    
DEBU Release: ''                                  
DEBU Resolved container and image names           
DEBU Container: 'ubuntu-toolbox-20.04'            
DEBU Image: 'fedora-toolbox:33'                   
DEBU Release: '33'                                
DEBU Checking if container ubuntu-toolbox-20.04 exists 
DEBU Inspecting mounts of container ubuntu-toolbox-20.04 
DEBU Starting container ubuntu-toolbox-20.04      
DEBU Inspecting entry point of container ubuntu-toolbox-20.04 
DEBU Entry point PID is a float64                 
DEBU Entry point of container ubuntu-toolbox-20.04 is toolbox (PID=0) 
Error: invalid entry point PID of container ubuntu-toolbox-20.04
@travier travier added bug Something isn't working need-info Further information is requested labels Oct 19, 2022
@travier
Copy link
Member

travier commented Oct 19, 2022

I've just tried that and it worked for me on Fedora 36. What's your host toolbox version and host distribution?

@nsmlzl
Copy link
Author

nsmlzl commented Oct 19, 2022

I am running Ubuntu 22.04 and installed toolbox v0.0.99.2 from the Ubuntu package registry.

@travier
Copy link
Member

travier commented Oct 20, 2022

Can you try in a fresh virtual machine to rule out anything in your local setup?

@nsmlzl
Copy link
Author

nsmlzl commented Oct 20, 2022

I was able to reproduce this in a vm (freshly created with ubuntu-22.04.1 iso). I updated all packages before installing / running toolbox.

$ sudo apt update
$ sudo apt upgrade
$ sudo apt install podman-toolbox
$ toolbox create --image quay.io/toolbx-images/ubuntu-toolbox:20.04
Image required to create toolbox container.
Download quay.io/toolbx-images/ubuntu-toolbox:20.04 (500MB)? [y/N]: y
Created container: ubuntu-toolbox-20.04
Enter with: toolbox enter ubuntu-toolbox-20.04
$ toolbox --verbose enter ubuntu-toolbox-20.04
DEBU Running as real user ID 1000                 
DEBU Resolved absolute path to the executable as /usr/bin/toolbox 
DEBU Running on a cgroups v2 host                 
DEBU Checking if /etc/subgid and /etc/subuid have entries for user user 
DEBU Validating sub-ID file /etc/subuid           
DEBU Validating sub-ID file /etc/subgid           
DEBU TOOLBOX_PATH is /usr/bin/toolbox             
DEBU Migrating to newer Podman                    
DEBU Toolbox config directory is /home/user/.config/toolbox 
DEBU Current Podman version is 3.4.4              
DEBU Creating runtime directory /run/user/1000/toolbox 
DEBU Old Podman version is 3.4.4                  
DEBU Migration not needed: Podman version 3.4.4 is unchanged 
DEBU Resolving container and image names          
DEBU Container: 'ubuntu-toolbox-20.04'            
DEBU Distribution: ''                             
DEBU Image: ''                                    
DEBU Release: ''                                  
DEBU Resolved container and image names           
DEBU Container: 'ubuntu-toolbox-20.04'            
DEBU Image: 'fedora-toolbox:33'                   
DEBU Release: '33'                                
DEBU Checking if container ubuntu-toolbox-20.04 exists 
DEBU Inspecting mounts of container ubuntu-toolbox-20.04 
DEBU Starting container ubuntu-toolbox-20.04      
DEBU Inspecting entry point of container ubuntu-toolbox-20.04 
DEBU Entry point PID is a float64                 
DEBU Entry point of container ubuntu-toolbox-20.04 is toolbox (PID=0) 
Error: invalid entry point PID of container ubuntu-toolbox-20.04

@travier
Copy link
Member

travier commented Oct 20, 2022

Can you give us the output of podman start --attach --interactive ubnutu-toolbox-20.04 ?

@nsmlzl
Copy link
Author

nsmlzl commented Oct 20, 2022

I ran this on the vm:

$ podman start --attach --interactive ubuntu-toolbox-20.04
toolbox: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.34' not found (required by toolbox)

@travier
Copy link
Member

travier commented Oct 20, 2022

This is likely containers/toolbox#871 and should be fixed by containers/toolbox#897 which is in 0.99.3. Please ask your distribution to ship that.

@travier travier closed this as not planned Won't fix, can't repro, duplicate, stale Oct 20, 2022
@jaques-sam
Copy link

It seems it's not solved on 20.04 and also not on 22.04 :-(

@travier
Copy link
Member

travier commented Feb 8, 2023

Please open a new issue with more details

@debarshiray
Copy link
Contributor

Duplicate of containers/toolbox#821

@debarshiray
Copy link
Contributor

@andrewshadura @Jmennius could these two commits be added to the Ubuntu packages:

@andrewshadura
Copy link
Contributor

I will upload a new toolbox version to Debian unstable and will try to backport those patches to stable too, but I don’t have direct upload access to Ubuntu, so that will require a lot more of effort.

@andrewshadura
Copy link
Contributor

Oh, in fact, Debian’s not affected.

@andrewshadura
Copy link
Contributor

Prepared an update for Jammy: https://salsa.debian.org/debian/podman-toolbox/-/commits/ubuntu/jammy
It FTBFS in GitLab CI as it builds against Debian unstable. It built fine in actual jammy.

@andrewshadura
Copy link
Contributor

@debarshiray, as @panlinux points out in https://bugs.launchpad.net/ubuntu/+source/golang-github-containers-toolbox/+bug/1993888/comments/5, these two commits do not appear to be enough. Could you please double check if there’s anything else that might be missing?

@debarshiray
Copy link
Contributor

Thanks for working on https://bugs.launchpad.net/ubuntu/+source/golang-github-containers-toolbox/+bug/1993888 @andrewshadura ! I was away on vacation from the 14th of July until today, and I will be away for GUADEC starting from tomorrow till the 31st of July.

Do you know the exact error? Otherwise I will debug it myself using a bunch of Ubuntu virtual machines once I am back.

The root problem is described in containers/toolbox@6063eb2 , and if you follow the references you will find containers/toolbox@6ad9c63 as a previous attempt at fixing the same problem. I also wrote a blog post describing the issue.

In short, we are using the same toolbox(1) binary from the host inside the container. This can run into ABI compatibility issues if the host's toolbox(1) was built against a newer runtime than what's available inside the container, because the runtimes are only backwards, not forward, compatible. Very often it's caused by a newer glibc on the host compared to the container. So, we ensure that the host's runtime is also present inside the container and force the toolbox(1) binary to always use it.

This is done through /run/host. On the host, it's a relative symbolic link to ../ created by systemd-tmpfiles(8) and inside the container it's a bind mount created through podman create --volume /:/run/host:rslave ....

That's the overall idea.

This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working need-info Further information is requested
Development

No branches or pull requests

5 participants