-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
Fatal signal 11 (SIGSEGV) from Java_io_realm_internal_UncheckedRow_nativeGetString #6152
Comments
I have an absolutely similar problem.
I was able to get a corrupted database: My configuration:
Version of Realm and tooling Realm version(s): 5.4.2 w/encryption enabled Realm sync feature enabled: no Android Studio version: 3.1.4 Which Android version and device: Xiaomi Redmi 5 |
Sometimes stack is slightly different: Realm version: 5.5.0 w/encryption enabled Android Studio version: 3.1.4 Which Android version and device: Emulator x86 API 28 |
This is happening on Samsung Galaxy S7 edge (hero2lte), Android 8.0 |
Any updates on this? We have many reports on 5.7.1 with encryption enabled, but can't reproduce it locally. |
Realm version: 5.9.1 with encryption enabled Android Studio version: 3.3.2 Which Android version and device: Xiaomi Redmi 5 (Android 7.1.2), Honor 10 (Android 9) First crash: Reproducible locally. It seems that some data blocks are corrupted, because crash is happening on the items list screen. When I've change filtering crash not happened. |
@mussa-ibragimov @ggajews It would be useful to provide more information - e.g. a stacktrace so we can see if it's really the same issue. |
@Zey-Uzh While it's very useful to get the database that appears corrupt, we need the encryption key to actually open it :-) |
@bmunkholm I would love to provide more info, but all I have is the play store reports
We have trouble with reproducing it locally. We received 820 reports last week affecting 105 users |
@bmunkholm Where to send corrupted DB with key? |
@vladimirfx You can send it to [email protected] But having a DB that throws this error would be a massive help (and a pointer to which object actually throws the error). |
Corrupted DB emailed to [email protected] |
I assume this is the crash we should look for?
Unrolled stacktrace:
|
Yes, this is one of many similar stacktraces where one of text property of Debt or Debtor entity are accessed. It can happened on different threads. |
I'll checked assuption that crash depends on string encoding: |
That would be great. Thank you 👏 |
@vladimirfx Thank you for the file I can reproduce a crash when looping over all Debt objects reading out all String fields. The first crash I encounter is here:
At first glance, it appears to be a bug in Javas |
I was sent another corrupted db from Android 9 device. It's crashes on database opening. |
@cmelchior any progress in debugging this issue? |
another report this time user reports app just crashed repeatedly but I couldn't get more info besides native stack trace.
|
That's awesome @vladimirfx!
|
@vladimirfx I created a special release with more assertions enabled. It is called You will need to add the following to your list of maven repos:
As described here: https://github.com/realm/realm-java#using-snapshots |
Don't be surprised that this will run very slowly... :-) |
(but does 6.0 introduce file format changes?) |
No, 6.0 only breaks some Sync API's: https://github.com/realm/realm-java/blob/master/CHANGELOG.md#6002019-10-01 7.0 will contain the Core 6 upgrade which will change the file format. |
@vladimirfx Did you have a chance to test out the SNAPSHOT? |
Logcat output attached. Do you need something else? |
@vladimirfx Could you reply to my questions above - thanks! |
@vladimirfx With regards to the "crush_report_realm_honor.log" attached above: Are there other threads in action on the device when the crash occurs? If there is, could you provide backtraces for all those other threads? While we only see this when encryption is enabled, it is also the case that encryption slows down reading and especially writing to the database. Such changes in timing can sometimes expose other bugs, which are not really bugs in the encryption layer, but timing dependent in such a way, that they don't surface without encryption. |
Unfortunately no - it is secured proprietary software with a lot of sensitive data.
May be. It's a lot of work: iteratively cut down app to where bug is reproducible but app code is minimal enough. I should approve such activity with our customer.
It's very rarely reproducible on emulator.
|
@fealebenpae it is native crash and thread dump not so easy to collect. But we all try... |
@vladimirfx So, you are saying you do see the same error on emulators (although rarely)? That is the x86 emulator right? |
@cmelchior yes, x86 |
Hutlihut (sorry non-danes: https://www.youtube.com/watch?v=QdFK6VbuIC0) I managed to reproduce in an isolated unit test on an x86 emulator:
Stacktrace:
Also seeing this assertion failure:
This unit test does indeed create a large number of both writer and reader threads. Further observations:
This matches the different kinds we seen so far. |
That's good. But our app make writes in one thread and open few subscriptions (changelistener) depending on active screen.
|
New Stacktrace while trying to reproduce:
This was using the core branch |
We believe we have identified the root cause: realm/realm-core#3427 |
Tentative fix in progress: realm/realm-core#3429 |
Should be fixed in 6.0.1 (not released yet), but |
6.1.0-SNAPSHOT - works! |
“signal 11 (SIGSEGV), code 1 (SEGV_ MAPERR) |
Goal
Expected Results
Actual Results
Steps & Code to Reproduce
So far, only one known user has encountered this issue. This user will encounter the crash every time they launch the app. Fortunately, I have access to the user's device and have hooked it up to the debugger. There seems to be 3
RealmObject
s (all of the sameChildObject
type described below) out of hundreds which have somehow corrupted, and trying to access any of these 3 objects will seg fault. I've tried accessing these objects w/in aDynamicRealm
, but that seg faults as well.Although the stacktrace above happens on a
RxComputation
thread, when I run everything on the main thread, the crash persists.Code Sample
Unfortunately I can't share specific code or realm files, but I'll describe the relevant schema structure and access which is causing the crash.
Version of Realm and tooling
Realm version(s): 5.3.1 w/encryption enabled
Realm sync feature enabled: no
Android Studio version: 3.1.3
Which Android version and device: Samsung Galaxy S8 running Android 8
The text was updated successfully, but these errors were encountered: