-
Notifications
You must be signed in to change notification settings - Fork 171
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
terminating with uncaught exception of type realm::NoSuchTable #3701
Comments
Reproducible on an arm64 device (OnePlus 5T), but not on the x86_64 bit Android emulator. The crash happens here: https://github.com/realm/realm-object-store/blob/yg/ng-sync/src/sync/impl/sync_metadata.cpp#L342 |
Observations:
It indicates that an invalid table-key is being used to lookup a table accessor. This happens in the flow of updating accessors after a commit_and_continue_as_read(). It should not be possible to have an invalid reference at that point. |
Fun fact. Nabil tested this on his Nexus6P which is also an Arm64 bit device, where this bug does not manifest. |
➤ Finn Andersen commented: Fun fact. Cannot be reproduced if built without sync support. |
This might just have been me not porting everything correctly. Because the Sync setup is rather complicated. |
I ran into this in Core-6 when running some tests:
So the problem is not isolated to Core 10 it seems This was triggered on our CI device, which is a Nexus 5 |
➤ Kenneth Geisshirt commented: Same error message is observed when I try the following script using JS v10.0.0-alpha.5 (core v10.0.0-alpha.8; sync v10.0.0-alpha.12): const Realm = require("realm"); let realm = new Realm({ path: "demo.realm" }); // Try adding a new class realm.close(); The file can be downloaded as curl [https://static.realm.io/downloads/realm-studio/demo.realm] -O |
➤ Kenneth Geisshirt commented: I have performed a couple of small experiments. The minimal example to trigger the exception is:
If I use JS v6.0.0 (based on core v6.0.4) in step 2, I don't observe the exception. Another important observation is following:
|
The fact that the commit goes through despite the error is just correct behavior. All file changes during commit are complete when the bug happens. It happens when references in table accessors are updated to reflect the movement of data in the file done as part of the commit. |
➤ Finn Andersen commented: Note: The report earlier about it being seen on Core-6 should be viewed with some reservation. There are many ways to hit a nosuchtable exception. Without the stack trace we cannot be confident it's the same bug |
Fair enough. The stacktrace I had directly in Core-6 was also different than the other ones we seen 👍 |
@cmelchior In your original bug report, is it possible that a realm database generated by Core-5 was present at the point where you ran your test (and thus a file format upgrade took place), while no such realm file was present at @nhachicha 's phone when he did it? |
@finnschiermer No, it ran from a clean state. |
Using OS + Core + JS, I can only reproduce the JS-variant of this bug with v10, not with v6, so it may be in v10 only (or the bug reported for JS may be different from the one reported for Java) |
Tentative fix in #3749. |
The understanding of this bug is still insufficient. The tentative fix cannot explain why we observe different behavior on different phones. |
Fix in progress #3749. The bug is in both v6 and v10. |
➤ Brian Munkholm commented: While this seems fixed in JS we should confirm this also fixes related issues in Java. |
I think I have another instance of this bug in js using core/sync 10.0.0-beta.1 (it happened in CI I have not seen it locally)
The test is here:
|
The last report is a different error, so putting it in a new issue #3761 |
Current analysis is that the bug reported for JS by @kneth has now been solved, but the original bug in the top of this issue, reported by @cmelchior may be different and not fixed yet. |
Using a release with the fix seems to make the bug go away on Android as well 👍 |
I'll close this issue for now. If we get new sightings I'll reopen. |
Partial backtrace data:
The text was updated successfully, but these errors were encountered: