Skip to content
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

Destroyed mutex: Realm #544

Closed
bmarty opened this issue Sep 3, 2019 · 3 comments
Closed

Destroyed mutex: Realm #544

bmarty opened this issue Sep 3, 2019 · 3 comments

Comments

@bmarty
Copy link
Member

bmarty commented Sep 3, 2019

RiotX crashes sometimes and we suspect Realm to be the cause.

This has been observed by developer, and has been reported by RS:

Extract of the logs:

--------- beginning of crash
09-02 20:00:18.288 17402 17437 F libc    : FORTIFY: pthread_mutex_destroy called on a destroyed mutex (0x7e60427b08)
09-02 20:00:18.300 17402 17437 F libc    : Fatal signal 6 (SIGABRT), code -6 (SI_TKILL) in tid 17437 (RealmFinalizing), pid 17402 (tor.riotx.debug)
09-02 20:00:18.377 17402 22297 I chatty  : uid=10281(im.vector.riotx.debug) expire 6 lines
09-02 20:00:18.381 17402 17428 I chatty  : uid=10281(im.vector.riotx.debug) expire 12 lines
09-02 20:00:18.392 22301 22301 I chatty  : uid=10281(im.vector.riotx.debug) expire 5 lines
09-02 20:00:18.480 22301 22301 F DEBUG   : *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
09-02 20:00:18.480 22301 22301 F DEBUG   : Build fingerprint: 'HUAWEI/CLT-L29/HWCLT:9/HUAWEICLT-L29/311C432:user/release-keys'
09-02 20:00:18.480 22301 22301 F DEBUG   : Revision: '0'
09-02 20:00:18.480 22301 22301 F DEBUG   : ABI: 'arm64'
09-02 20:00:18.481 22301 22301 F DEBUG   : Happend: 'Mon Sep  2 20:00:18 2019
09-02 20:00:18.481 22301 22301 F DEBUG   : '
09-02 20:00:18.481 22301 22301 F DEBUG   : SYSVMTYPE: Art
09-02 20:00:18.481 22301 22301 F DEBUG   : APPVMTYPE: Art
09-02 20:00:18.481 22301 22301 F DEBUG   : pid: 17402, tid: 17437, name: RealmFinalizing  >>> im.vector.riotx.debug <<<
09-02 20:00:18.481 22301 22301 F DEBUG   : signal 6 (SIGABRT), code -6 (SI_TKILL), fault addr --------
09-02 20:00:18.481 22301 22301 F DEBUG   : Abort message: 'FORTIFY: pthread_mutex_destroy called on a destroyed mutex (0x7e60427b08)'
09-02 20:00:18.481 22301 22301 F DEBUG   :     x0  0000000000000000  x1  000000000000441d  x2  0000000000000006  x3  0000000000000008
09-02 20:00:18.481 22301 22301 F DEBUG   :     x4  0000000000000000  x5  0000000000000000  x6  0000000000000000  x7  0000000000000010
09-02 20:00:18.481 22301 22301 F DEBUG   :     x8  0000000000000083  x9  f8cf0d4baa9a290f  x10 0000000000000000  x11 fffffffc7ffffbdf
09-02 20:00:18.481 22301 22301 F DEBUG   :     x12 0000000000000001  x13 000000005d6d4aa2  x14 000438ddd5f35080  x15 000012bc5895490e
09-02 20:00:18.481 22301 22301 F DEBUG   :     x16 0000007f4fef12c0  x17 0000007f4fe2fe34  x18 0000000000000008  x19 00000000000043fa
09-02 20:00:18.481 22301 22301 F DEBUG   :     x20 000000000000441d  x21 0000007e60427ae0  x22 0000007e60427b08  x23 0000007e60427b30
09-02 20:00:18.481 22301 22301 F DEBUG   :     x24 0000007eabf6fa54  x25 0000007e5f938f40  x26 0000007eaa3f1a40  x27 0000007eaa3f1b70
09-02 20:00:18.481 22301 22301 F DEBUG   :     x28 0000000012cc1530  x29 0000007eaa3f13b0
09-02 20:00:18.481 22301 22301 F DEBUG   :     sp  0000007eaa3f1370  lr  0000007f4fe24960  pc  0000007f4fe24988

We may find a way to avoid those crash, even if we need to perform an initial sync, to replace a corrupted DB. It is more critical for the DB handling the crypto keys or the user's session data.

The last resort will be to replace Realm by another DB library (Room?)

@bmarty bmarty added this to the Stabilization1 milestone Sep 3, 2019
@bmarty bmarty modified the milestones: Stabilization1, Stabilization2 Oct 9, 2019
@Ruben2112
Copy link

We're having the same issue in our app, this is definitely a Realm issue. See here. It should be fixed once they release core6. If you happen to find a fix before core6 is released, please let me know.

@bmarty
Copy link
Member Author

bmarty commented Jan 13, 2020

Should be fixed in Realm 7.0 thanks to realm/realm-core#3460

@bmarty
Copy link
Member Author

bmarty commented Aug 21, 2020

The issue is now fixed (in Realm) and not observed anymore on Element Android

@bmarty bmarty closed this as completed Aug 21, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants