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

msync() failed: Interrupted system call in ... io_realm_internal_OsSharedRealm.cpp line 101 #3352

Closed
BlueCobold opened this issue Aug 16, 2019 · 3 comments · Fixed by #3357
Closed
Assignees

Comments

@BlueCobold
Copy link

Goal

Opening a realm without having another shared instance open already.

Actual Results

io.realm.exceptions.RealmError: Unrecoverable error. msync() failed: Interrupted system call in /Users/cm/Realm/realm-java/realm/realm-library/src/main/cpp/io_realm_internal_OsSharedRealm.cpp line 101
at io.realm.internal.OsSharedRealm.nativeGetSharedRealm(Native Method)
at io.realm.internal.OsSharedRealm.(OsSharedRealm.java:171)
at io.realm.internal.OsSharedRealm.getInstance(OsSharedRealm.java:241)
at io.realm.BaseRealm.(BaseRealm.java:136)
at io.realm.BaseRealm.(BaseRealm.java:103)
at io.realm.Realm.(Realm.java:163)
at io.realm.Realm.createInstance(Realm.java:499)
at io.realm.RealmCache.doCreateRealmOrGetFromCache(RealmCache.java:355)
at io.realm.RealmCache.createRealmOrGetFromCache(RealmCache.java:285)
at io.realm.Realm.getDefaultInstance(Realm.java:407)

Steps & Code to Reproduce

Seems to happen randomly and rarely.

Version of Realm and tooling

Realm version(s): 5.0.0 - 5.13.1

Realm Sync feature enabled: Yes/No

Android Studio version: 3.4.1

Android Build Tools version: 28.0.3

Gradle version: 5.1.1

Which Android version and device(s):
Android: 5.1, 6.0, 6.0.1, 7.1
Devices: Nexus 5, BLU R1 HD, Sony Xperia Z2, MTC SMART Sprint 4G, Xiaomi MI MAX 2

@finnschiermer
Copy link
Contributor

This seems to imply that msync() has returned EINTR. This could be caused by having a signal handler somewhere in the application, which has not been installed with the SA_RESTART flag.

@BlueCobold
Copy link
Author

I'm not sure what that means. Is it something that should be within my level of influence?

@finnschiermer
Copy link
Contributor

I looked more into it. It should not be possible on a fast (builtin) file system, but perhaps on a networking file system, SD card or something similar. Anyhow, We'll fix it by retrying the system call a few times.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants