-
Notifications
You must be signed in to change notification settings - Fork 165
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
[Android] Encrypted realms crash when combined with CookieManager (OpenSSL) #757
Comments
Another user is reporting the same error but apparently in a slightly different context that sounds like it is easier to reproduce. I'll try to get a reproducible test case from him: realm/realm-java#1023 |
A user provided a much simpler test case that is single threaded:
Project is here: https://github.com/realm/realm-java/tree/cm-bug-crash-cookiemanager/experimental/webviewCrash |
Some more detailed logs, starting from the with webview: 04-13 17:42:51.630 30922-30922/io.realm.webviewcrash E/TIGHTDB﹕ signal: 0x5a84007c 04-13 17:43:19.017 123-123/? I/DEBUG﹕ *** *** *** *** *** *** *** *** *** *** *** *** *** *** ** *** without webview: 04-13 17:46:10.215 31857-31857/io.realm.webviewcrash E/TIGHTDB﹕ signal: 0x5a84007c The interesting difference starts at "writing size to 0x5a83a000 (0x5a83a000 + 0)" -- with a WebView created, the signal immediately after that gets a blatantly incorrect memory address, while without the WebView it gets the correct memory address. This suggests that the webview is installing a broken signal handler (on a different thread, and the earlier things just happen to work because they run before it?). |
I have created an issue on the Chromium issue tracker with this: https://code.google.com/p/chromium/issues/detail?id=476831 But if there is anything we can do on our end to fix this problem it is probably worth doing. |
I uploaded a minimal repro case that doesn't use Realm at all to the chromium ticket. I'm not sure what we could do to work around this other than reinstalling the signal handler constantly in the hopes of staying the first one when it matters (or reworking everything to not need signals, which I'm increasingly thinking would be worth doing, but definitely wouldn't be a quick fix). |
I'm opening a task on doing encryption without use of signals, and closing this one. |
Hi
We are seeing a really weird crash on Android when combining encrypted realms with the CookieManager on Android.
A user has been able to make a reproducible case, and I have so far failed to reproduce it outside a Android setting. Branch is here: https://github.com/realm/realm-java/tree/cm-bug-crash-cookiemanager
Our findings so far is here: https://github.com/realm/realm-java/blob/cm-bug-crash-cookiemanager/experimental/cookieManager/debugging.txt
Current thesis is that CookieManager uses the Chromium CookieManager shipped with Android 5+ which calls some native code that uses OpenSSL and that somehow conflicts with our usage of OpenSSL, but really we have no idea.
I assume @tgoyne is the goto guy on this?
Issue is also tracked on the realm-java here: realm/realm-java#1008
The text was updated successfully, but these errors were encountered: