-
Notifications
You must be signed in to change notification settings - Fork 50
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
Segfault when starting rubyfmt #200
Comments
Strangely enough I found a potential clue in an HN comment thread. I'm having the issues with OSX Catalina but the other machine that I successfully ran was Mojave. https://news.ycombinator.com/item?id=23062435 Following that a bit further led me to this issue filed against jemallocator: gnzlbg/jemallocator#136 |
you may need to reinstall your rust toolchain for catalina and rebuild rubyfmt |
I actually installed rust/cargo specifically (using these instructions) to build this last night, so I don't think that's it. No previous experience with rust though, so might be doing something wrong. |
did you run `make` in the repo before running `ruby rubyfmt.rb`?
…On Wed, 3 Jun 2020 at 10:32, Wade Tandy ***@***.***> wrote:
I actually installed rust/cargo specifically to build this last night, so
I don't think that's it. No previous experience with rust though, so might
be doing something wrong.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#200 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAAXTFQVP5REEHZKH4NQMMLRUZNIHANCNFSM4NRI46FQ>
.
|
Yeah. Steps taken: $ git clone https://github.com/penelopezone/rubyfmt
$ curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
$ cd rubyfmt
$ rvm use 2.6.3
$ make all
$ /Users/wadetandy/.rvm/rubies/ruby-2.6.3/bin/ruby --disable=all rubyfmt.rb
<explode> |
Your crash is occuring when rubyfmt tries to enable Jemalloc, are you using jemalloc otherwise on your sysetm? |
If by using it you mean "have I written code against jemalloc?", then no, as I mostly work in ruby and js. But I don't know whether other installed software might use jemalloc if that's your question. |
It's worth noting that the Rust crate compiles jemalloc and statically links it, so jemalloc being on the system wouldn't affect it |
It seems updating OSX from Catalina 10.15.4 to 10.15.5 fixed the issue on the debug build, but the problem persists on the release build. Neat. |
I'm on OSX 10.15.3 and also using rvm for ruby (2.7.1) and receive the same strange behavior that the debug build works, and the release build crashes. (log attached).
|
hi @wadetandy I've just spent a few days completely rewriting Rubyfmt's binary compilation. Could you pull and rebuild (noting that you now do not run 'rubyfmt.rb' to run rubyfmt) and let me know if it works for you now? |
Seems I'm getting a similar result still after pulling latest trunk and running
Let me know if you need me to attach any build output files. |
Input file
Breaks on any input file (or just running rubyfmt.rb with no arguments)
Issue
Breaks when loading up the native shared object build (debug or release) at the top of rubyfmt.rb. I have successfully built and run this same sha on the same version of ruby on a different machine. Rubyfmt was built after freshly installing rust/cargo and clean installing ruby (via rvm).
I will keep investigating this on my end, as I'm sure there's something weird going on with my machine, but wanted to capture this in case A) you'd seen it before and have any tips, or B) anyone else stumbles across this issue in the future, by which time I will hopefully have found the problem.
Rubyfmt's output
OSX Crash Report
The text was updated successfully, but these errors were encountered: