realm / realm-java

Realm is a mobile database: a replacement for SQLite & ORMs
http://realm.io
Apache License 2.0
11.46k stars 1.75k forks source link

Blackberry Z10: Function not implemented in io_realm_internal_SharedGroup.cpp line 113 #3178

Closed Qubitium closed 8 years ago

Qubitium commented 8 years ago

We got a lone wolf crash. Did not encounter any repeating or similar crashes before.

Maybe related to https://github.com/realm/realm-java/issues/1380 and recent core/jni changes in master.

Blackberry Z10 Android Version: 4.3 Realm Version: 1.1.1-SNAPSHOT (end of July 8th)

Non-fatal Exception: io.realm.exceptions.RealmError: Unrecoverable error. Function not implemented in io_realm_internal_SharedGroup.cpp line 113 at io.realm.internal.SharedGroup.createNativeWithImplicitTransactions(Unknown Source) at io.realm.internal.SharedGroup.openSharedGroupOrFail(Unknown Source:95) at io.realm.internal.SharedGroup.(Unknown Source:74) at io.realm.internal.SharedGroupManager.(Unknown Source:3126)

Zhuinden commented 8 years ago

That one was fixed in 0.84.0, but this is new.

beeender commented 8 years ago

I was trying to figure out what is wrong with BB z10 but the adb stops working with it :(

My guess is the newly add call to mkfifo in our underlying engine caused the problem ...

@diegomontoya Does the log say which function is not implemented?

Qubitium commented 8 years ago

@beeender Unfortunately the func name is not in the log.

Non-fatal Exception: io.realm.exceptions.RealmError: Unrecoverable error. Function not implemented in io_realm_internal_SharedGroup.cpp line 113
       at io.realm.internal.SharedGroup.createNativeWithImplicitTransactions(SharedGroup.java)
       at io.realm.internal.SharedGroup.openSharedGroupOrFail(SharedGroup.java:95)
       at io.realm.internal.SharedGroup.<init>(SharedGroup.java:74)
       at io.realm.internal.SharedGroup.<init>(SharedGroup.java:74)
       at io.realm.RealmConfiguration.getEncryptionKey(RealmConfiguration.java:126)
       at io.realm.internal.SharedGroupManager.<init>(SharedGroupManager.java:49)
       at io.realm.BaseRealm.<init>(BaseRealm.java:81)
       at io.realm.Realm.<init>(Realm.java:140)
       at io.realm.Realm.createAndValidate(Realm.java:240)
       at io.realm.Realm.createInstance(Realm.java:220)
       at io.realm.RealmCache.createRealmOrGetFromCache(RealmCache.java:126)
       at io.realm.Realm.getInstance(Realm.java:184)
Zhuinden commented 8 years ago

Is there any chance of this being a very high priority? I'd like to upgrade a project to 1.1.0 (or above, in this case) but it needs to support pure Blackberry phones like the Z10 or the RIM Passport as well... and the project lifecycle is out of my hands, and I don't really want to keep it on 1.0.0. (although I will if need be)

beeender commented 8 years ago

@Zhuinden I will take a look at this issue next Monday.

Zhuinden commented 8 years ago

@beeender thank you! :+1:

Qubitium commented 8 years ago

@beeender Any update on this? Thanks.

beeender commented 8 years ago

@diegomontoya Sorry for the late response. I spent a day for debugging on the z10, but it is really difficult (for me) to figure out which native function it cannot find. (Last time the function name comes with the exception message. No native backlog/I didn't find a way to connect gdb/very slow apk installation).

What I can confirm is it works up to v1.0.1.

I am sorry but we need to put this issue to a relative low priority right now. I think it will still take some time to get this fixed.

Zhuinden commented 8 years ago

That kinda makes me wish you had released 1.0.2 with the optional transformer disabled and otherwise being 1.0.1, but oh well.

beeender commented 8 years ago

Note for me: After wasting a few more hours: https://github.com/realm/realm-core/pull/1834 triggered issue and mkfifo works with my testing project on z10.

@Zhuinden Yeah, it is doable. We will make a 1.0.2 release soon.

Zhuinden commented 8 years ago

So that means the core issue has actually been identified?

That's pretty cool! A v1.0.2 is awesome too; a stable branch for the 1.0.x versions just in case.

beeender commented 8 years ago

Some updates:

  1. BB 10's mkfifo() has a bug. When the fifo file exists, from the document, errno EEXIST should be set. But instead, it set errno to ENOSYS. And that has been translated to exception message "Function not implemented". However, this is not the critical one. It can be worked around by using stat() to check the st_mode.
  2. BB 10's flock() with LOCK_EX doesn't work at all. It doesn't block. BB 10 doc for flock() .
pwiniars commented 8 years ago

I can confirm this also on BB Z30 and Passport. Any chance of bugfix?

beeender commented 8 years ago

@pwiniars Yes, fix is being reviewed right now :)

Zhuinden commented 8 years ago

Is this handled by 1.1.1, or only 1.2.0?

EDIT: silly question, I should just read the changelog - it's fixed :)

beeender commented 8 years ago

1.1.1 :tada:

Anthonyeef commented 7 years ago

Happened again here: https://github.com/realm/realm-java/issues/3735 But this time it's Blackberry Passport.