Skip to content

Native Crashs on Android 5.1.1 #319

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

Closed
zhuforce opened this issue Mar 21, 2017 · 11 comments
Closed

Native Crashs on Android 5.1.1 #319

zhuforce opened this issue Mar 21, 2017 · 11 comments

Comments

@zhuforce
Copy link

No description provided.

@zhuforce zhuforce changed the title Hello Awesome Hello! Mar 21, 2017
@zhuforce zhuforce changed the title Hello! Native Crashs on Android 5.1.1 Mar 21, 2017
@zhuforce
Copy link
Author

Dear Contributors:
Sqlcipher occur Native Crashs when I using the Sqlcipher by lastest version 3.5.6.
The Crashs like these:
03-21 10:17:26.152 372-372/? I/DEBUG: signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0x84c9eb68
03-21 10:17:26.172 372-372/? I/DEBUG: r0 84e95f80 r1 00000000 r2 0000003e r3 84e95ffd
03-21 10:17:26.172 372-372/? I/DEBUG: r4 84c9eb68 r5 0000007e r6 84e95f80 r7 0010ef78
03-21 10:17:26.172 372-372/? I/DEBUG: r8 abcc1ae8 r9 00000000 sl 00000003 fp 00000000
03-21 10:17:26.172 372-372/? I/DEBUG: ip 00000000 sp 844aeba0 lr 8069b9e1 pc 8069b9e0 cpsr 600e0030
03-21 10:17:26.172 372-372/? I/DEBUG: backtrace:
03-21 10:17:26.172 372-372/? I/DEBUG: #00 pc 000ad9e0 /data/app/com.xxx.xx-2/lib/arm/libsqlcipher.so (sqlcipher::CursorWindow::allocRow()+57)
03-21 10:17:26.172 372-372/? I/DEBUG: #1 pc 000ac76b /data/app/com.xxx.xx-2/lib/arm/libsqlcipher.so (sqlcipher::native_fill_window(_JNIEnv*, _jobject*, _jobject*, int, int, int, int)+278)
03-21 10:17:26.172 372-372/? I/DEBUG: #2 pc 0001ed2b /data/data/com.xxx.xx/cache/slice-net.zetetic-android-database-sqlcipher-3.5.6_2fde7e9eeccad7d6a038ff0d2a70148560bced25-classes.dex

@developernotes
Copy link
Member

Hello @zhuforce

Are you able to isolate the query that causes the crash into a test case within the SQLCipher for Android test suite? Does the crash occur on both Android 5.1.1 emulators, devices, or both?

@zhuforce
Copy link
Author

Hello @developernotes
The sqlcipher-android-tests can run on emulators and devices normally.The crash occur on Android 5.1.1 devices but emulators.On the 5.1.1 devices,I found that only when I query the data more than 8000 will occur Crashs.It occurs in the getCount () function of SqliteCursor.

@developernotes
Copy link
Member

Hello @zhuforce

Are you able to add a test case to the SQLCipher for Android test suite and send a pull request for further review? Thanks!

@zhuforce
Copy link
Author

Hello @developernotes
On the 5.1.1 devices,I add a test case to the SQLCIpher for Android test suite on four steps:
1.create db
2.create table user
3.insert 10000 row data
4.select * from user
The first time is normal, but when I perform the fourth step again when the exception occurred, the exception is as follows:
Fatal signal 11 (SIGSEGV), code 1, fault addr 0x70befa38 in tid 23095 (AsyncTask #3).

I have another question as follows:
I used sqlcipher to query 10,000 lines of data with 5 seconds instead of sqlcipher only 300 milliseconds. I was in accordance with the official demo to operate, is this what is the cause of this?Can u help me?Thanks.

@developernotes
Copy link
Member

Hello @zhuforce

We will look to replicate the issue within the test suite and report back. Thanks!

@developernotes
Copy link
Member

Hello @zhuforce

I added a test to the test suite which initially created 10,000 rows, but then upped it to 100,000 rows of data, which is then queried. We were able to successfully run this on a Nexus 9 device running Android 5.1.1. I adjusted the test to insert 100MB and was able to generate a crash due to an OOM exception, however it occurs at different location than yours. What device are you executing the test suite on where your test case fails? Would you be able to provide your test case for further analysis? Thanks!

@zhuforce
Copy link
Author

Hello @developernotes
I added a test which named QueryTenThousandDataTest into Test.Would you be able to clone and check it?Thanks!

@developernotes
Copy link
Member

Hello @zhuforce

While we have a Samsung Note 5 device, we haven't been able to reset the firmware to 5.1.1 yet. We have a beta build of SQLCipher for Android that we feel might resolve the issue you are experiencing. Would you be willing to try it out? If so, would you contact us directly at [email protected]? Thanks!

@arudnev
Copy link

arudnev commented Mar 29, 2017

We experience similar crash on LG-D850 / Android 4.4.2, not sure if HW / SW matters there that much, mostly likely subject to data / load that we have on particular test accounts or timing of operations.
Following https://discuss.zetetic.net/t/sqlcipher-for-android-3-5-6-performance-and-stability-issues/2005 we downgraded from 3.5.6 to 3.5.4 and it addressed this particular issue for us.
We have not been able to isolate it to particular queries yet, will try to do and report it when time permits.

@developernotes
Copy link
Member

Hello @zhuforce, @arudnev

I wanted to let you know that we have released a new version of SQLCipher for Android 3.5.7 which may address the issue you reported. You can find out more information regarding the release here. Would you give that a try and let us know your results? Thanks!

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

No branches or pull requests

3 participants