-
Notifications
You must be signed in to change notification settings - Fork 68
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
>4.4.0 <=4.13.0 causing RuntimeError: can't add a new key into hash during iteration #545
Comments
This sounds like a thread safety issue to me. One possible place which may cause this is our I am not sure how exactly this could trigger the issue but the fact is that the error you see is related to hashes and we did make a change regarding hashes. airbrake-ruby v4.13.0 is the first airbrake-ruby that is on rbtree3 v0.6.0. Could you please try to test again with For example:
|
@kyrylo thanks for taking a look. yes threading + rbtree may do it. I'll try with 4.12.0 and feedback |
@kyrylo aiming to schedule a slot on one of the environments where we can reproduce the issue in the next week. Thanks for the tip about v4.13.1, can try that also |
does |
@vitalinfo it does sound related. Have you tried downgrading rbtree? |
Just did downgrade today, will keep on eye on it.
|
@kyrylo
it helped Also I've tried downgrade only |
Possibly fixes #545 (>4.4.0 <=4.13.0 causing RuntimeError: can't add a new key into hash during iteration)
Thanks for checking & backtraces. That was useful for me. I published #560 as a possible fix. Could you please give it a try? Don't worry, it won't cause any harm to your app and it's basically airbrake-ruby v4.13.2 with that change (there are no new changes on If you can reproduce that reliably, I would appreciate if you could tell me the steps. |
Possibly fixes #545 (>4.4.0 <=4.13.0 causing RuntimeError: can't add a new key into hash during iteration)
@kyrylo I'm worry about update to the version more than 4.11
definitely has a memory leaks |
Well, I wasn't aware of memory leaks you mentioned. That sounds like a separate issue to me. Would you mind filing a new issue? |
Possibly fixes #545 (>4.4.0 <=4.13.0 causing RuntimeError: can't add a new key into hash during iteration)
upgrading airbrake in a Rails 3.2.21 (old, yes I know) app caused frequent "RuntimeError: can't add a new key into hash during iteration" errors, usually pinpointing active_record modules e.g. connection_pool.rb:102 or abstract_adapter.rb:71 . Ruby processes also spinning very high CPU
prior to upgrade, app was using these versions without issue:
initial upgrade that started causing problems updated to these versions:
downgraded airbrake, but didn't force airbrake-ruby down. Problem persisted:
after pegging both gem versions back to the original versions (9.2.2, 4.4.0), problem resolved.
I tried to examine the diff, but can't see a smoking gun - but new sql grouping and threading draw my attention: v4.4.0...v4.13.0
The text was updated successfully, but these errors were encountered: