-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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
Deadlock after receiving a "N5realm10LogicErrorE: Bad version number " #4768
Comments
More input: it seems that I'm able to reproduce it only when I have a few dozens of objects in Realm, and only if I'm doing live updates on realm objects (meaning for example synchronising a full catalog of song, so the object state will changed every few seconds). If don't have a large database, and doing these real time changes, I can't reproduce it. So, it's probably a different case than #4428 since it was reproductible without these both conditions. |
More input: I can also reproduce it by firing manual realm transaction (by clicking on buttons in the app), it seems to freeze when two transactions are starting / ending at the same time, race condition? I started a sample app beside, but no luck for now. So, I'm able to tell you how to reproduce it, but I can tell you if a fix is working or no 😬 |
Hi @tbaranes! Thanks for the info! Sorry to hear you're having some trouble here. There's probably not a lot we can do without a sample app to let us properly examine what's going on here. Would you even be able to post some sample code of the actual write transaction that's causing this failure? You can email it to Thanks! |
Sorry for the delay @TimOliver, I just sent an email with more information and a few lines of code, hope that helps. Also, I tried v4.5.0, but the bug is still here (no miracle here 😬 ) |
Hanging forever in The stack trace when the exception is thrown might be somewhat informative, if you can enable exception breakpoints in Xcode and then trigger the problem. |
@tgoyne Here the stack trace when he exception is thrown (and caught by exception breakpoints):
|
realm/realm-swift#4768 realm/realm-java#4369 When m_notifiers is empty, m_notifier_sg will be advanced to the latest. But the skip_version might be behind. In this case, bad_version will be throw when calling advance_to_final().
* Fix bad_version when m_notifiers is empty realm/realm-swift#4768 realm/realm-java#4369 When m_notifiers is empty, m_notifier_sg will be advanced to the latest. But the skip_version might be behind. In this case, bad_version will be throw when calling advance_to_final(). * Add a test which reproduces the problem
This should be fixed by realm/realm-object-store#424. |
Good to know! Let me know when it will be available in realm-cocoa, I will test it again. Also, is |
Since #4813 has been merged, I tested the master version, seems to be fixed! Thanks 🤘 |
Glad to hear it! |
May be a duplicate / follow up of #4428 and #4649
Goals
Just using Realm.
Expected Results
No bugs, no freeze, no warnings.
Actual Results
I'm getting this using Realm v2.4.4, but I got a customer getting that same freeze using v2.0.4, so I was wrong when I was saying that issue was introduced after 2.0.4 (cf the previous issue).
The app is freezing after logging "N5realm10LogicErrorE: Bad version number".
Looks like a deadlock (since the audio is still playing, just the interface won't respond anymore)
Here the full stack trace from Xcode when the app has entered in the deadlock:
I replaced the app symbols by
****
because I can't post it in public. However, I can share the full stack by email if that help.Steps to Reproduce
Once again, I don't have an easy way to reproduce it. It's a global environment issue: having a few realm transactions running at the same time, after a few more, it will freeze.
In this context, my realm is storing around 50k objects, not sure if that can change something.
Code Sample
Sadly, don't have one... but I will try right now to make a sample project reproducing that issue since I have a better idea of the context.
Version of Realm and Tooling
Realm version: 2.4.4
Xcode version: 8.2.1
iOS/OSX version: iOS 10.2.1
Dependency manager + version: Carthage 0.20.1
The text was updated successfully, but these errors were encountered: