Fix crashes on OTP 27 by disabling ETS table compression #796
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fixes #788.
We've had mysterious OTP 27 crashes for quite some time now, but I was finally able to track it down to what I believe is a bug in
:ets
. When the:compressed
table option is used, the system either segfaults or crashes with a memory-related error on any call that traverses the entire table. In our case, it was a call to:ets.foldl/3
, but other full traversals like:ets.tab2list/1
or:ets.tab2file/2
also crash.The temporary fix to get things working is to just not use
:compressed
on OTP 27. Unfortunately, this has a very sizeable impact on memory:We may want to add user-level configuration to disable indexing for those who have to run OTP 27 on very large projects, but I think that should go in another PR.
One final note: I haven't reported this upstream yet because I was trying to create a more minimal reproduction, but I've unfortunately not been able to. I'm going to spend a bit more time this morning trying to reproduce, but I'll likely submit a bug report later regardless; perhaps someone more familiar with ETS will have suggestions for how to minimally recreate the environment that's causing the crash.