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

on upgrade, ruby 3.3.6 is tossing memory errors, when 3.3.5 didn't. #2908

Open
stickbear2015 opened this issue Nov 26, 2024 · 7 comments
Open
Labels

Comments

@stickbear2015
Copy link

stickbear2015 commented Nov 26, 2024

Steps to reproduce the problem

I have a script that executes all the necessary commands to upgrade glitch-sock.
I've attached it, note I had to put a .txt extension on it to make it upload.
upgrade-glitch.sh.txt

Expected behaviour

Everything should run just fine, and no errors should be generated.

Actual behaviour

When the bundle command runs from the script, I get a pile of memory errors.

Detailed description

I did attempt to reinstall all the jems forcefully as well as the yarn stuff, corepack and yarn are both up to date. I did force ruby to reinstall as well. This didn't change anything, 3.3.6 still failed to run. See technical details below.

Mastodon instance

http://mastodon.stickbear.me

Mastodon version

4.4.0-alpha.1+glitch

Environment

operating system: Devian 12
ruby version that breaks: ruby 3.3.6 (2024-11-05 revision 75015d4c1f) [x86_64-linux]
ruby version that works just fine: ruby 3.3.5 (2024-09-03 revision ef084cc8f4) [x86_64-linux]
node JS version: 18.19.0

Technical details

Due to being blind, for some reason I couldn't get a complete log output, but here's what I get from the last screen. If you have a better way to get output to spit out, let me know and I'll generate something more complete. Note: these issues don't happen with ruby 3.3.5 as shown above.
from /home/mastodon/.rbenv/versions/3.3.6/lib/ruby/3.3.0/bundler/setup.rb:32:in block in <top (required)>' from /home/mastodon/.rbenv/versions/3.3.6/lib/ruby/3.3.0/bundler/ui/shell.rb:173:in with_level'
from /home/mastodon/.rbenv/versions/3.3.6/lib/ruby/3.3.0/bundler/ui/shell.rb:119:in silence' from /home/mastodon/.rbenv/versions/3.3.6/lib/ruby/3.3.0/bundler/setup.rb:32:in <top (required)>'
from /home/mastodon/.rbenv/versions/3.3.6/lib/ruby/3.3.0/bundler/cli/exec.rb:56:in require_relative' from /home/mastodon/.rbenv/versions/3.3.6/lib/ruby/3.3.0/bundler/cli/exec.rb:56:in kernel_load'
from /home/mastodon/.rbenv/versions/3.3.6/lib/ruby/3.3.0/bundler/cli/exec.rb:23:in run' from /home/mastodon/.rbenv/versions/3.3.6/lib/ruby/3.3.0/bundler/cli.rb:455:in exec'
from /home/mastodon/.rbenv/versions/3.3.6/lib/ruby/3.3.0/bundler/vendor/thor/lib/thor/command.rb:28:in run' from /home/mastodon/.rbenv/versions/3.3.6/lib/ruby/3.3.0/bundler/vendor/thor/lib/thor/invocation.rb:127:in invo
ke_command'
from /home/mastodon/.rbenv/versions/3.3.6/lib/ruby/3.3.0/bundler/vendor/thor/lib/thor.rb:527:in dispatch' from /home/mastodon/.rbenv/versions/3.3.6/lib/ruby/3.3.0/bundler/cli.rb:35:in dispatch'
from /home/mastodon/.rbenv/versions/3.3.6/lib/ruby/3.3.0/bundler/vendor/thor/lib/thor/base.rb:584:in start' from /home/mastodon/.rbenv/versions/3.3.6/lib/ruby/3.3.0/bundler/cli.rb:29:in start'
from /home/mastodon/.rbenv/versions/3.3.6/lib/ruby/gems/3.3.0/gems/bundler-2.5.22/exe/bundle:28:in block in <to p (required)>' from /home/mastodon/.rbenv/versions/3.3.6/lib/ruby/3.3.0/bundler/friendly_errors.rb:117:in with_friendly_errors
'
from /home/mastodon/.rbenv/versions/3.3.6/lib/ruby/gems/3.3.0/gems/bundler-2.5.22/exe/bundle:20:in <top (requir ed)>' from /home/mastodon/.rbenv/versions/3.3.6/bin/bundle:25:in load'
from /home/mastodon/.rbenv/versions/3.3.6/bin/bundle:25:in `

'

@stickbear2015
Copy link
Author

I was able to generate output from a working upgrade series as well as a busted one. I'm sorry for the added comment, but I thought this would give you better logs for compareson
output-ruby-3.3.5.txt
To compare, here's what happens if I set the version to 3.3.6 in /home/mastodon/live/.ruby-version.
output-ruby-3.3.6.txt
I hope those logs help, note: I put the instance back to 3.3.5 until we can find a solution to this.
It's not a memory issue as the server has 16GB of memory, we've tried force reinstalling jems, etc. including force reinstalling ruby, with no change.
Any advice would be appreciated.

@ClearlyClaire
Copy link

It seems like you may be running jemalloc-less Ruby with jemalloc gems.

Try rebuilding Ruby using RUBY_CONFIGURE_OPTS=--with-jemalloc rbenv install

@arinoch
Copy link

arinoch commented Nov 26, 2024

I'm curious if you wouldn't mind explaining (or if you know) @ClearlyClaire why that would happen with 3.3.6 and not an earlier version? It compiles with 3.3.5 without a problem and the same rbenv install command was used for both.

@arinoch
Copy link

arinoch commented Nov 26, 2024

@ClearlyClaire - That command worked, thanks! Would appreciate an explanation re: my above comment if you have one.

@stickbear2015
Copy link
Author

stickbear2015 commented Nov 27, 2024

I also would appreciate an answer to @arinoch's question, if you have one, @ClearlyClaire.
Thank you.

@ClearlyClaire
Copy link

I do not have an explanation. Is it possible that you correctly set RUBY_CONFIGURE_OPTS when building the previous Ruby version?

@arinoch
Copy link

arinoch commented Dec 1, 2024

We used the same command without your configuration variable for both 3.3.5 and 3.3.6. 3.3.5 results in a stable Mastodon/Glitch, 3.3.6 did not without your config variable. This is only the case on Debian 12. I did not have this problem on an instance running Ubuntu 22.

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

No branches or pull requests

3 participants