{"action":"created","issue":{"url":"https://api.github.com/repos/realm/realm-java/issues/1882","labels_url":"https://api.github.com/repos/realm/realm-java/issues/1882/labels{/name}","comments_url":"https://api.github.com/repos/realm/realm-java/issues/1882/comments","events_url":"https://api.github.com/repos/realm/realm-java/issues/1882/events","html_url":"https://github.com/realm/realm-java/issues/1882","id":120307708,"number":1882,"title":"signal 11 (SIGSEGV) on Realm 0.86.0","user":{"login":"Flydiverny","id":326929,"avatar_url":"https://avatars.githubusercontent.com/u/326929?v=3","gravatar_id":"","url":"https://api.github.com/users/Flydiverny","html_url":"https://github.com/Flydiverny","followers_url":"https://api.github.com/users/Flydiverny/followers","following_url":"https://api.github.com/users/Flydiverny/following{/other_user}","gists_url":"https://api.github.com/users/Flydiverny/gists{/gist_id}","starred_url":"https://api.github.com/users/Flydiverny/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Flydiverny/subscriptions","organizations_url":"https://api.github.com/users/Flydiverny/orgs","repos_url":"https://api.github.com/users/Flydiverny/repos","events_url":"https://api.github.com/users/Flydiverny/events{/privacy}","received_events_url":"https://api.github.com/users/Flydiverny/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2015-12-04T00:51:49Z","updated_at":"2015-12-04T08:42:49Z","closed_at":null,"body":"Getting SIGSEGV on emulators (VS Emulator) and devices repeatedly at the same place.\r\nWe clear out pretty much all our tables when logging out in one big cozy transaction, all other parts of the app and realm usage seems fine after updating to 0.86.0 and the api changes.\r\n```\r\n12-04 01:38:36.042 9370-9370/our.package.name.here A/libc: Fatal signal 11 (SIGSEGV) at 0x0000024c (code=1), thread 9370 (ll.package.name)\r\n12-04 01:38:36.146 136-136/? I/DEBUG: *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***\r\n12-04 01:38:36.146 136-136/? I/DEBUG: Build fingerprint: 'Android/full_donatello/donatello:4.4.4/KTU84P/eng.vsemu.20151113.122923:userdebug/test-keys'\r\n12-04 01:38:36.146 136-136/? I/DEBUG: Revision: '0'\r\n12-04 01:38:36.146 136-136/? I/DEBUG: pid: 9370, tid: 9370, name: ll.package.name  >>> our.package.name.here <<<\r\n12-04 01:38:36.146 136-136/? I/DEBUG: signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0000024c\r\n12-04 01:38:36.274 136-136/? I/DEBUG:     eax 00000000  ebx 9af28e34  ecx 00000006  edx 00000006\r\n12-04 01:38:36.274 136-136/? I/DEBUG:     esi b86d6e40  edi b86d6e40\r\n12-04 01:38:36.274 136-136/? I/DEBUG:     xcs 00000073  xds 0000007b  xes 0000007b  xfs 00000000  xss 0000007b\r\n12-04 01:38:36.274 136-136/? I/DEBUG:     eip 9ade1780  ebp bf84f6d8  esp bf84f6d0  flags 00210282\r\n12-04 01:38:36.274 136-136/? E/Corkscrew: unrecognized dwarf higher part encoding: 0x73\r\n12-04 01:38:36.274 136-136/? I/DEBUG:     #00  pc 00068780  /data/app-lib/our.package.name.here-2/librealm-jni.so\r\n12-04 01:38:36.274 136-136/? I/DEBUG:     #01  pc 000687a5  /data/app-lib/our.package.name.here-2/librealm-jni.so\r\n12-04 01:38:36.274 136-136/? I/DEBUG:          bf84f690  00000000  \r\n12-04 01:38:36.274 136-136/? I/DEBUG:          bf84f694  00000000  \r\n12-04 01:38:36.274 136-136/? I/DEBUG:          bf84f698  b848b3d0  [heap]\r\n12-04 01:38:36.274 136-136/? I/DEBUG:          bf84f69c  b86ed880  [heap]\r\n12-04 01:38:36.274 136-136/? I/DEBUG:          bf84f6a0  00000006  \r\n12-04 01:38:36.274 136-136/? I/DEBUG:          bf84f6a4  00000000  \r\n12-04 01:38:36.274 136-136/? I/DEBUG:          bf84f6a8  00000006  \r\n12-04 01:38:36.274 136-136/? I/DEBUG:          bf84f6ac  00000010  \r\n12-04 01:38:36.274 136-136/? I/DEBUG:          bf84f6b0  b86d6e40  [heap]\r\n12-04 01:38:36.274 136-136/? I/DEBUG:          bf84f6b4  b86d6e40  [heap]\r\n12-04 01:38:36.274 136-136/? I/DEBUG:          bf84f6b8  bf84f6d8  [stack]\r\n12-04 01:38:36.274 136-136/? I/DEBUG:          bf84f6bc  9ade176a  /data/app-lib/our.package.name.here-2/librealm-jni.so\r\n12-04 01:38:36.274 136-136/? I/DEBUG:          bf84f6c0  b86ed880  [heap]\r\n12-04 01:38:36.274 136-136/? I/DEBUG:          bf84f6c4  9af2740c  /data/app-lib/our.package.name.here-2/librealm-jni.so\r\n12-04 01:38:36.278 136-136/? I/DEBUG:          bf84f6c8  9af27400  /data/app-lib/our.package.name.here-2/librealm-jni.so\r\n12-04 01:38:36.278 136-136/? I/DEBUG:          bf84f6cc  00000000  \r\n12-04 01:38:36.278 136-136/? I/DEBUG:     #00  bf84f6d0  9af28e34  /data/app-lib/our.package.name.here-2/librealm-jni.so\r\n12-04 01:38:36.278 136-136/? I/DEBUG:          bf84f6d4  b86d6e40  [heap]\r\n12-04 01:38:36.278 136-136/? I/DEBUG:          bf84f6d8  bf84f6f8  [stack]\r\n12-04 01:38:36.278 136-136/? I/DEBUG:          bf84f6dc  9ade17a6  /data/app-lib/our.package.name.here-2/librealm-jni.so\r\n12-04 01:38:36.278 136-136/? I/DEBUG:          bf84f6e0  00000000  \r\n12-04 01:38:36.278 136-136/? I/DEBUG:          bf84f6e4  00000023  \r\n12-04 01:38:36.278 136-136/? I/DEBUG:          bf84f6e8  9ae73b65  /data/app-lib/our.package.name.here-2/librealm-jni.so\r\n12-04 01:38:36.278 136-136/? I/DEBUG:          bf84f6ec  9af28e34  /data/app-lib/our.package.name.here-2/librealm-jni.so\r\n12-04 01:38:36.278 136-136/? I/DEBUG:          bf84f6f0  a44d6b44  \r\n12-04 01:38:36.278 136-136/? I/DEBUG:          bf84f6f4  a44d6b44  \r\n12-04 01:38:36.278 136-136/? I/DEBUG:          bf84f6f8  bf84f758  [stack]\r\n12-04 01:38:36.278 136-136/? I/DEBUG:          bf84f6fc  9ae3e38e  /data/app-lib/our.package.name.here-2/librealm-jni.so\r\n12-04 01:38:36.278 136-136/? I/DEBUG:          bf84f700  b86d6e40  [heap]\r\n12-04 01:38:36.278 136-136/? I/DEBUG:          bf84f704  a44d6b44  \r\n12-04 01:38:36.278 136-136/? I/DEBUG:          bf84f708  bf84f758  [stack]\r\n12-04 01:38:36.278 136-136/? I/DEBUG:          bf84f70c  b4d46909  /system/lib/libdvm.so (mspace_malloc+25)\r\n```\r\n\r\nPhysical device (Samsung Note 3), first run after updating to Realm 0.86.0 in our login procedure, when creating a new Realm (or opening existing in this case) we open it directly in the background just to trigger migration.\r\n```\r\n12-04 01:44:05.134 21499-21499/our.package.name.here W/RealmFactory: Checking if realm session-3e7cc37f-a93a-46c6-8bc0-f23a9ae6b207.realm needs migration!\r\n12-04 01:44:05.322 21499-21499/our.package.name.here A/libc: Fatal signal 11 (SIGSEGV), code 1, fault addr 0x290 in tid 21499 (ll.package.name)\r\n12-04 01:44:05.323 299-299/? I/DEBUG: property debug.db.uid not set; NOT waiting for gdb.\r\n12-04 01:44:05.323 299-299/? I/DEBUG: HINT: adb shell setprop debug.db.uid 100000\r\n12-04 01:44:05.323 299-299/? I/DEBUG: HINT: adb forward tcp:5039 tcp:5039\r\n12-04 01:44:05.445 299-299/? I/DEBUG: *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***\r\n12-04 01:44:05.445 299-299/? I/DEBUG: Build fingerprint: 'samsung/hltexx/hlte:4.4.2/KOT49H/N9005XXUENC2:user/release-keys'\r\n12-04 01:44:05.445 299-299/? I/DEBUG: Revision: '8'\r\n12-04 01:44:05.445 299-299/? I/DEBUG: ABI: 'arm'\r\n12-04 01:44:05.445 299-299/? I/DEBUG: pid: 21499, tid: 21499, name: ll.package.name  >>> our.package.name.here <<<\r\n12-04 01:44:05.445 299-299/? I/DEBUG: signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0x290\r\n12-04 01:44:05.461 299-299/? I/DEBUG:     r0 67a5bbe0  r1 77f18c74  r2 00000006  r3 00000290\r\n12-04 01:44:05.461 299-299/? I/DEBUG:     r4 68e54580  r5 00000000  r6 68e54580  r7 12d4e700\r\n12-04 01:44:05.461 299-299/? I/DEBUG:     r8 74f40f28  r9 b5184400  sl 00000001  fp 133e7740\r\n12-04 01:44:05.461 299-299/? I/DEBUG:     ip bed5ecd4  sp bed5ed08  lr 77ed5ae1  pc 77e558f8  cpsr 60000030\r\n12-04 01:44:05.462 299-299/? I/DEBUG:     #00 pc 000498f8  /data/app/our.package.name.here-1/lib/arm/librealm-jni.so\r\n```\r\n\r\nSimilar / same crash when logging out (Samsung Note 3);\r\n```\r\n12-04 01:44:57.081 22335-22335/our.package.name.here A/libc: Fatal signal 11 (SIGSEGV), code 1, fault addr 0x290 in tid 22335 (ll.package.name)\r\n12-04 01:44:57.081 299-299/? I/DEBUG: property debug.db.uid not set; NOT waiting for gdb.\r\n12-04 01:44:57.081 299-299/? I/DEBUG: HINT: adb shell setprop debug.db.uid 100000\r\n12-04 01:44:57.081 299-299/? I/DEBUG: HINT: adb forward tcp:5039 tcp:5039\r\n12-04 01:44:57.163 299-299/? I/DEBUG: *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***\r\n12-04 01:44:57.163 299-299/? I/DEBUG: Build fingerprint: 'samsung/hltexx/hlte:4.4.2/KOT49H/N9005XXUENC2:user/release-keys'\r\n12-04 01:44:57.163 299-299/? I/DEBUG: Revision: '8'\r\n12-04 01:44:57.163 299-299/? I/DEBUG: ABI: 'arm'\r\n12-04 01:44:57.163 299-299/? I/DEBUG: pid: 22335, tid: 22335, name: ll.package.name  >>> our.package.name.here <<<\r\n12-04 01:44:57.163 299-299/? I/DEBUG: signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0x290\r\n12-04 01:44:57.175 299-299/? I/DEBUG:     r0 63f67800  r1 68e75c74  r2 00000006  r3 00000290\r\n12-04 01:44:57.176 299-299/? I/DEBUG:     r4 668481c0  r5 00000000  r6 668481c0  r7 133d5f80\r\n12-04 01:44:57.176 299-299/? I/DEBUG:     r8 74f16e98  r9 b5184400  sl 00000001  fp 12c71740\r\n12-04 01:44:57.176 299-299/? I/DEBUG:     ip bed5eb14  sp bed5eb48  lr 68e32ae1  pc 68db28f8  cpsr 600f0030\r\n12-04 01:44:57.176 299-299/? I/DEBUG:     #00 pc 000498f8  /data/app/our.package.name.here-1/lib/arm/librealm-jni.so\r\n```\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/realm/realm-java/issues/comments/161909531","html_url":"https://github.com/realm/realm-java/issues/1882#issuecomment-161909531","issue_url":"https://api.github.com/repos/realm/realm-java/issues/1882","id":161909531,"user":{"login":"Flydiverny","id":326929,"avatar_url":"https://avatars.githubusercontent.com/u/326929?v=3","gravatar_id":"","url":"https://api.github.com/users/Flydiverny","html_url":"https://github.com/Flydiverny","followers_url":"https://api.github.com/users/Flydiverny/followers","following_url":"https://api.github.com/users/Flydiverny/following{/other_user}","gists_url":"https://api.github.com/users/Flydiverny/gists{/gist_id}","starred_url":"https://api.github.com/users/Flydiverny/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Flydiverny/subscriptions","organizations_url":"https://api.github.com/users/Flydiverny/orgs","repos_url":"https://api.github.com/users/Flydiverny/repos","events_url":"https://api.github.com/users/Flydiverny/events{/privacy}","received_events_url":"https://api.github.com/users/Flydiverny/received_events","type":"User","site_admin":false},"created_at":"2015-12-04T08:42:49Z","updated_at":"2015-12-04T08:42:49Z","body":"@beeender I upgraded from Realm 0.85.1.\r\n\r\nWe remove quiet a few objects from the database and most of the deleting is filtered by string checks. Basically we are doing a clean up of all data from our session that is not needed for showing the user an activity history if they log back in on the same device. So we check a lot of relations.\r\n\r\nWe also use encryption again since the changes in 0.85 :)\r\n\r\n[DataCleaner.txt (rename to .java)](https://github.com/realm/realm-java/files/51797/DataCleaner.txt)\r\n\r\nthis is called from;\r\n```\r\n    public void exerciseCleanup(int timeToStore) {\r\n        if (mRealm != null) {\r\n            mRealm.removeAllChangeListeners();\r\n\r\n            Date dateLimit = CalendarUtil.addSeconds(new Date(), -timeToStore);\r\n            new DataCleaner(mRealm, dateLimit).performCleanup();\r\n        }\r\n    }\r\n```"}}