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

singularity build --fakeroot fails with free(): invalid pointer while spawning RPC server #2904

Closed
haferman opened this issue May 10, 2024 · 3 comments
Labels
bug Something isn't working

Comments

@haferman
Copy link

haferman commented May 10, 2024

I only experience this problem when building from the tarball. The RPM works fine. I also randomly decided to build 3.8.4 and get the same error. I suspect something in my build environment, but I can't pin it down.

Version of Singularity

singularity-ce version 4.1.2

Describe the bug
ANY singularity build --fakeroot fails with:

free(): invalid pointer

but only from my local build. The RPM install works as expected. If I remove --fakeroot things work as expected. I have done singularity config fakeroot --add <user>.

To Reproduce

singularity build --fakeroot lolcow.sif docker://sylabsio/lolcow

Expected behavior
I expect the SIF to build.

OS / Linux Distribution
Which Linux distribution are you using?

Red Hat Enterprise Linux release 8.9 (Ootpa)

Installation Method
source, via:

./mconfig --prefix=/usr/local/singularity-ce-4.1.2

Note: using Go 1.22.2
No errors or warnings during build

Additional context

singularity -ddd build --fakeroot lolcow.sif docker://sylabsio/lolcow

relevant output:

DEBUG   [U=0,P=2]          apply_privileges()            Set user ID to 0
DEBUG   [U=0,P=2]          set_parent_death_signal()     Set parent death signal to 9
VERBOSE [U=0,P=2]          init()                        Spawn RPC server
free(): invalid pointer
VERBOSE [U=0,P=1]          wait_child()                  rpc server interrupted by signal number 6
DEBUG   [U=502,P=816682]   startup()                     fakeroot runtime engine selected
VERBOSE [U=502,P=816682]   startup()                     Execute master process
DEBUG   [U=502,P=816682]   func1()                       Waiting for container process 816697
DEBUG   [U=502,P=816682]   func1()                       Wait for process 816697 complete with status 34304, error <nil>
DEBUG   [U=502,P=816682]   Master()                      Child exited with exit status 134
@haferman haferman added the bug Something isn't working label May 10, 2024
@dtrudg
Copy link
Member

dtrudg commented May 10, 2024

This is potentially related to a known issue with an interaction between Go 1.22, older glibc versions, and the approach that Singularity and other container runtimes use.

The RPM packages are built with Go 1.21 for this reason, and there is a note on the 4.1.3 release...

Note - compilation with Go 1.22 currently causes an issue when using the PID namespace on distributions using older versions of glibc. We recommend using Go 1.21 at this time.

If possible, could you provide any output in dmesg that is associated with the error?

@haferman
Copy link
Author

Nothing at all in dmesg associated with this error. But, I will rebuild with Go 1.21 and report back, thanks for the tip.

@haferman
Copy link
Author

Go 1.21 build works as expected! Thank you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants