Skip to content
This repository has been archived by the owner on Aug 8, 2023. It is now read-only.

[android] mapbox::sqlite::Exception: database is locked #7851

Closed
ivovandongen opened this issue Jan 25, 2017 · 4 comments
Closed

[android] mapbox::sqlite::Exception: database is locked #7851

ivovandongen opened this issue Jan 25, 2017 · 4 comments
Labels
Android Mapbox Maps SDK for Android bug

Comments

@ivovandongen
Copy link
Contributor

Currently, unit tests on master (varying: run all under com.mapbox.mapboxsdk) fail with the following exception:

01-25 15:59:33.054 22312-24064/com.mapbox.mapboxsdk.testapp A/libc: /Volumes/Android/buildbot/src/android/ndk-r13-release/external/libcxx/../../external/libcxxabi/src/abort_message.cpp:74: void abort_message(const char *, ...): assertion "terminating with uncaught exception of type mapbox::sqlite::Exception: database is locked" failed
01-25 15:59:33.054 22312-24064/com.mapbox.mapboxsdk.testapp A/libc: Fatal signal 6 (SIGABRT), code -6 in tid 24064 (DefaultFileSour)

Stack trace:

********** Crash dump: **********
Build fingerprint: 'google/sailfish/sailfish:7.1.1/NMF26O/3514931:user/release-keys'
pid: 22312, tid: 24064, name: DefaultFileSour  >>> com.mapbox.mapboxsdk.testapp <<<
signal 6 (SIGABRT), code -6 (SI_TKILL), fault addr --------
Stack frame #00 pc 00049da0  /system/lib/libc.so (tgkill+12)
Stack frame #01 pc 00047533  /system/lib/libc.so (pthread_kill+34)
Stack frame #02 pc 0001d635  /system/lib/libc.so (raise+10)
Stack frame #03 pc 00019181  /system/lib/libc.so (__libc_android_abort+34)
Stack frame #04 pc 00017048  /system/lib/libc.so (abort+4)
Stack frame #05 pc 0001b633  /system/lib/libc.so (__libc_fatal+22)
Stack frame #06 pc 0001937b  /system/lib/libc.so (__assert2+18)
Stack frame #07 pc 00365cf3  /data/app/com.mapbox.mapboxsdk.testapp-2/lib/arm/libmapbox-gl.so: Routine abort_message at /Volumes/Android/buildbot/src/android/ndk-r13-release/external/libcxx/../../external/libcxxabi/src/abort_message.cpp:74
Stack frame #08 pc 00365dbb  /data/app/com.mapbox.mapboxsdk.testapp-2/lib/arm/libmapbox-gl.so: Routine default_terminate_handler() at /Volumes/Android/buildbot/src/android/ndk-r13-release/external/libcxx/../../external/libcxxabi/src/cxa_default_handlers.cpp:63
Stack frame #09 pc 00364131  /data/app/com.mapbox.mapboxsdk.testapp-2/lib/arm/libmapbox-gl.so: Routine std::__terminate(void (*)()) at /Volumes/Android/buildbot/src/android/ndk-r13-release/external/libcxx/../../external/libcxxabi/src/cxa_handlers.cpp:68
Stack frame #10 pc 00363a3b  /data/app/com.mapbox.mapboxsdk.testapp-2/lib/arm/libmapbox-gl.so (__cxa_throw+122): Routine __cxxabiv1::failed_throw(__cxxabiv1::__cxa_exception*) at /Volumes/Android/buildbot/src/android/ndk-r13-release/external/libcxx/../../external/libcxxabi/src/cxa_exception.cpp:149
Stack frame #11 pc 000ba75b  /data/app/com.mapbox.mapboxsdk.testapp-2/lib/arm/libmapbox-gl.so: Routine mapbox::sqlite::Statement::run() at /Users/ivo/git/mapbox-gl-native/platform/default/sqlite3.cpp:300 (discriminator 3)
Stack frame #12 pc 000b5391  /data/app/com.mapbox.mapboxsdk.testapp-2/lib/arm/libmapbox-gl.so: Routine mbgl::OfflineDatabase::evict(unsigned long long) at /Users/ivo/git/mapbox-gl-native/platform/default/mbgl/storage/offline_database.cpp:831 (discriminator 1)
Stack frame #13 pc 000b51f5  /data/app/com.mapbox.mapboxsdk.testapp-2/lib/arm/libmapbox-gl.so: Routine mbgl::OfflineDatabase::putInternal(mbgl::Resource const&, mbgl::Response const&, bool) at /Users/ivo/git/mapbox-gl-native/platform/default/mbgl/storage/offline_database.cpp:181 (discriminator 1)
Stack frame #14 pc 000b5117  /data/app/com.mapbox.mapboxsdk.testapp-2/lib/arm/libmapbox-gl.so: Routine mbgl::OfflineDatabase::put(mbgl::Resource const&, mbgl::Response const&) at /Users/ivo/git/mapbox-gl-native/platform/default/mbgl/storage/offline_database.cpp:163
Stack frame #15 pc 000ac48d  /data/app/com.mapbox.mapboxsdk.testapp-2/lib/arm/libmapbox-gl.so: Routine operator() at /Users/ivo/git/mapbox-gl-native/platform/default/default_file_source.cpp:129 (discriminator 1)
Stack frame #16 pc 000ac3cf  /data/app/com.mapbox.mapboxsdk.testapp-2/lib/arm/libmapbox-gl.so: Routine _ZNSt6__ndk18__invokeIRZN4mbgl17DefaultFileSource4Impl7requestEPNS1_12AsyncRequestENS1_8ResourceENS_8functionIFvNS1_8ResponseEEEEEUlS8_E_JS8_EEEDTclclsr3std6__ndk1E7forwardIT_Efp_Espclsr3std6__ndk1E7forwardIT0_Efp0_EEEOSD_DpOSE_ at /Users/ivo/git/mapbox-gl-native/mason_packages/osx-x86_64/android-ndk/arm-9-r13b/bin/../lib/gcc/arm-linux-androideabi/4.9.x/../../../../include/c++/4.9.x/type_traits:4287
Stack frame #17 pc 000b0ca5  /data/app/com.mapbox.mapboxsdk.testapp-2/lib/arm/libmapbox-gl.so: Routine mbgl::OnlineFileRequest::completed(mbgl::Response) at /Users/ivo/git/mapbox-gl-native/platform/default/online_file_source.cpp:327 (discriminator 1)
Stack frame #18 pc 000b144d  /data/app/com.mapbox.mapboxsdk.testapp-2/lib/arm/libmapbox-gl.so: Routine operator() at /Users/ivo/git/mapbox-gl-native/platform/default/online_file_source.cpp:107
Stack frame #19 pc 000b1367  /data/app/com.mapbox.mapboxsdk.testapp-2/lib/arm/libmapbox-gl.so: Routine _ZNSt6__ndk18__invokeIRZN4mbgl16OnlineFileSource4Impl15activateRequestEPNS1_17OnlineFileRequestEEUlNS1_8ResponseEE_JS6_EEEDTclclsr3std6__ndk1E7forwardIT_Efp_Espclsr3std6__ndk1E7forwardIT0_Efp0_EEEOS9_DpOSA_ at /Users/ivo/git/mapbox-gl-native/mason_packages/osx-x86_64/android-ndk/arm-9-r13b/bin/../lib/gcc/arm-linux-androideabi/4.9.x/../../../../include/c++/4.9.x/type_traits:4287
Stack frame #20 pc 000a6e33  /data/app/com.mapbox.mapboxsdk.testapp-2/lib/arm/libmapbox-gl.so: Routine mbgl::HTTPRequest::async::{lambda()#1}::operator()() const at /Users/ivo/git/mapbox-gl-native/platform/android/src/http_file_source.cpp:47 (discriminator 1)
Stack frame #21 pc 000a3b25  /data/app/com.mapbox.mapboxsdk.testapp-2/lib/arm/libmapbox-gl.so: Routine mbgl::util::RunLoop::Impl::processRunnables() at /Users/ivo/git/mapbox-gl-native/platform/android/src/run_loop.cpp:180
Stack frame #22 pc 000a3eff  /data/app/com.mapbox.mapboxsdk.testapp-2/lib/arm/libmapbox-gl.so: Routine mbgl::util::RunLoop::run() at /Users/ivo/git/mapbox-gl-native/platform/android/src/run_loop.cpp:229 (discriminator 2)
Stack frame #23 pc 000aaaa1  /data/app/com.mapbox.mapboxsdk.testapp-2/lib/arm/libmapbox-gl.so: Routine void mbgl::util::Thread<mbgl::DefaultFileSource::Impl>::run<std::__ndk1::tuple<std::__ndk1::basic_string<char, std::__ndk1::char_traits<char>, std::__ndk1::allocator<char> > const&, unsigned long long&>, 0u, 1u>(std::__ndk1::tuple<std::__ndk1::basic_string<char, std::__ndk1::char_traits<char>, std::__ndk1::allocator<char> > const&, unsigned long long&>&&, std::__ndk1::integer_sequence<unsigned int, 0u, 1u>) at /Users/ivo/git/mapbox-gl-native/build/android-arm-v7/Debug/../../../src/mbgl/util/thread.hpp:112
Stack frame #24 pc 000aaa23  /data/app/com.mapbox.mapboxsdk.testapp-2/lib/arm/libmapbox-gl.so: Routine operator() at /Users/ivo/git/mapbox-gl-native/build/android-arm-v7/Debug/../../../src/mbgl/util/thread.hpp:96 (discriminator 1)
Stack frame #25 pc 00047003  /system/lib/libc.so (_ZL15__pthread_startPv+22)
Stack frame #26 pc 00019bdd  /system/lib/libc.so (__start_thread+6)

Based on a hunch from @brunoabinader, I already excluded changes in 80d7212 (Move lastInsertRowId/changes to sqlite::Statement)

@ivovandongen ivovandongen added Android Mapbox Maps SDK for Android bug labels Jan 25, 2017
@ivovandongen ivovandongen added this to the android-v5.0.0 milestone Jan 25, 2017
@jfirebaugh
Copy link
Contributor

Can you try backing out all of #7685?

@jfirebaugh
Copy link
Contributor

Also, given that the stack trace ends in evict, try backing out #7770. (cc @ericrwolfe)

@jfirebaugh
Copy link
Contributor

@ivovandongen Did you disable this test or did the issue disappear?

@ivovandongen
Copy link
Contributor Author

@jfirebaugh The issue has not re-appeared yet, no. Can't really explain it. Closing for now.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Android Mapbox Maps SDK for Android bug
Projects
None yet
Development

No branches or pull requests

2 participants