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

Version 0.1.9 "No such file or directory" #54

Open
MattKitmanLabs opened this issue Nov 21, 2024 · 5 comments
Open

Version 0.1.9 "No such file or directory" #54

MattKitmanLabs opened this issue Nov 21, 2024 · 5 comments

Comments

@MattKitmanLabs
Copy link

MattKitmanLabs commented Nov 21, 2024

Since updating to 0.1.9 we seem to be getting an issue on boot:

The Docker image is an Alpine Linux Ruby 3.1.6

bundler: failed to load command: thrust (/usr/local/bundle/ruby/3.1.0/bin/thrust)
/usr/local/bundle/ruby/3.1.0/gems/thruster-0.1.9-x86_64-linux/exe/thrust:7:in `exec': No such file or directory - /usr/local/bundle/ruby/3.1.0/gems/thruster-0.1.9-x86_64-linux/exe/x86_64-linux/thrust (Errno::ENOENT)
	from /usr/local/bundle/ruby/3.1.0/gems/thruster-0.1.9-x86_64-linux/exe/thrust:7:in `<top (required)>'
	from /usr/local/bundle/ruby/3.1.0/bin/thrust:25:in `load'
	from /usr/local/bundle/ruby/3.1.0/bin/thrust:25:in `<top (required)>'
	from /usr/local/bundle/ruby/3.1.0/gems/bundler-2.5.21/lib/bundler/cli/exec.rb:58:in `load'
	from /usr/local/bundle/ruby/3.1.0/gems/bundler-2.5.21/lib/bundler/cli/exec.rb:58:in `kernel_load'
	from /usr/local/bundle/ruby/3.1.0/gems/bundler-2.5.21/lib/bundler/cli/exec.rb:23:in `run'
	from /usr/local/bundle/ruby/3.1.0/gems/bundler-2.5.21/lib/bundler/cli.rb:455:in `exec'
	from /usr/local/bundle/ruby/3.1.0/gems/bundler-2.5.21/lib/bundler/vendor/thor/lib/thor/command.rb:28:in `run'
	from /usr/local/bundle/ruby/3.1.0/gems/bundler-2.5.21/lib/bundler/vendor/thor/lib/thor/invocation.rb:127:in `invoke_command'
	from /usr/local/bundle/ruby/3.1.0/gems/bundler-2.5.21/lib/bundler/vendor/thor/lib/thor.rb:527:in `dispatch'
	from /usr/local/bundle/ruby/3.1.0/gems/bundler-2.5.21/lib/bundler/cli.rb:35:in `dispatch'
	from /usr/local/bundle/ruby/3.1.0/gems/bundler-2.5.21/lib/bundler/vendor/thor/lib/thor/base.rb:584:in `start'
	from /usr/local/bundle/ruby/3.1.0/gems/bundler-2.5.21/lib/bundler/cli.rb:29:in `start'
	from /usr/local/bundle/ruby/3.1.0/gems/bundler-2.5.21/exe/bundle:28:in `block in <top (required)>'
	from /usr/local/bundle/ruby/3.1.0/gems/bundler-2.5.21/lib/bundler/friendly_errors.rb:117:in `with_friendly_errors'
	from /usr/local/bundle/ruby/3.1.0/gems/bundler-2.5.21/exe/bundle:20:in `<top (required)>'
	from /usr/local/bundle/bin/bundle:25:in `load'
	from /usr/local/bundle/bin/bundle:25:in `<main>'

If I access the container I can see the following:

/usr/local/bundle/ruby/3.1.0/gems/thruster-0.1.9-x86_64-linux/exe/x86_64-linux $ ls
thrust
@jm379
Copy link

jm379 commented Nov 23, 2024

I had the same problem when using thrust with Ruby 3.3.6 and Alpine 3.20 docker image.

It seems to be related to musl, as ldd reports that __vfprintf_chk and __fprintf_chk symbols weren't found.

I added the gcompat package to my Dockerfile to fix this problem, as it provides a compatibility layer between glibc and musl.

Another way to resolve this problem is to use the Bookworm image instead of Alpine.

@MatthewKennedy
Copy link

@jm379 Thanks for the tip, I'll fix my issue now. 🙌

aidewoode added a commit to blackcandy-org/blackcandy that referenced this issue Nov 27, 2024
@thedanbob
Copy link

thedanbob commented Dec 9, 2024

Alternatively, you can just build the thruster binary against musl and then you don't need gcompat or even the thruster gem:

apk add go make
mkdir /thruster
wget -q -O- https://github.com/basecamp/thruster/archive/refs/heads/main.tar.gz | tar -xz --strip-components 1 -C /thruster
cd /thruster
make build
cp bin/thrust /rails/bin/ # Run `bin/thrust` as usual

@pdfrod
Copy link

pdfrod commented Dec 10, 2024

Yeah, the packaging task does not include x86_64-linux-musl:

NATIVE_PLATFORMS = {
  "arm64-darwin" => "dist/thrust-darwin-arm64",
  "x86_64-darwin" => "dist/thrust-darwin-amd64",
  "x86_64-linux" => "dist/thrust-linux-amd64",
  "aarch64-linux" => "dist/thrust-linux-arm64",
}

It would be nice if Alpine was supported. I think it's popular enough to justify its inclusion.

@MatthewKennedy
Copy link

MatthewKennedy commented Dec 10, 2024

We work in the government sector, we can’t launch anything with a CVE, alpine images are clean, the rest are riddled with CVE’s.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants