-
Notifications
You must be signed in to change notification settings - Fork 170
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
Segmentation Fault on ruby 2.7 #199
Comments
We are seeing this exact issue as well with Ruby 2.7.2 and Ubuntu 20.04. We will be trying to remove the yajl/json_gem also. :( |
This is caused by a missing RB_GC_GUARD combined with some more aggressive gcc optimizations. At the very least, this return statement needs to be split up, to insert Lines 32 to 39 in e8de283
But there could be other spots too. The whole situation feels like a mess. Maybe the real lesson is to just avoid native extensions. |
With yajl-ruby-1.4.1
Over the last week we have been experiencing a, for lack of a better word, massive issue with ruby applications just crashing intermittently
The backtrace ultimately points to the Hash#to_json, created from requiring yajl/json_gem
Removing all instances of the yajl/json_gem in favor of the json library fixed the issue, but not until today did I come up with a somewhat simple script to reproduce the same crash report
For Ubuntu 20.04, The following works on ruby2.6, but fails on 2.7.0, 2.7.2, and sometimes on 2.7.1
No issues at all with any of the above on Ubuntu 20.10, which is an indicator its a libyaml or libjson library
Its worth noting the following does not fail ( or at least immediate enough for me to notice )
And a version that does not assign a variable but loops 10000 times does not fail either
The crash report is below, and immediately what stands out to me is the backtrace appears to suggest an on_progress_callback is provided to the to_json method, which obviously its not
Let me know and I'll try to provide the differences in the installed libs on 20.10 and 20.04
https://pastebin.com/fZq0iKMQ
The text was updated successfully, but these errors were encountered: