Attaching Android Studio Database Inspector to a running app can make the app crash inside SQLite with Fatal signal 11 (SIGSEGV). Google fixed this known defect as Issue 530704637.
Representative error log
Fatal signal 11 (SIGSEGV), code 1 (SEGV_MAPERR) in tid ...
# ... libsqlite.so / libsqliteX.so ...
Addresses, thread names, and SQLite library names vary. The useful signature is a native SQLite crash immediately after Database Inspector opens or attaches.
Cause
The inspection agent could race with the app while accessing SQLite connections and statements. Google’s fix locks statements on SQLiteConnection and adds a reentrant lock and statement wrapper to the AndroidX database inspection path.
Conditions and affected versions
- Database Inspector attaches to a running debuggable app.
- The app concurrently uses SQLite or Room.
- The app crashes, or Inspector cannot attach reliably, when the tool window opens.
Google does not publish the complete first-affected version range. The fix is listed in Android Studio Quail 4 Canary 3 and is included in stable Quail 4 and later.
Recommended solution
- Upgrade Android Studio to stable Quail 4 or later.
- Exit the IDE completely and restart it.
- Stop the app on the device and start a fresh debug session.
- Open Database Inspector from View > Tool Windows > App Inspection.
- Browse tables and run queries while confirming that the app and Logcat remain stable.
Alternatives
- Until you can upgrade, keep Inspector closed and export the database for offline inspection.
- Attaching only while application database writes are idle might avoid the race, but this is not an officially guaranteed workaround.
adb shell run-as com.example.app cp databases/app.db /sdcard/Download/app.db
adb pull /sdcard/Download/app.db
This may not work on every device or run-as configuration. When WAL is enabled, account for the -wal and -shm files.
How to verify the fix
- Check the IDE version under Help > About.
- Use the same device and debug build to open Inspector.
- Repeat database reads and writes.
- Confirm that Logcat no longer reports the same SQLite-related
SIGSEGV.
Cautions
- If the app crashes without Inspector attached, investigate application code and SQLite dependencies separately.
- A copied database can omit uncheckpointed WAL data.
- Do not modify production data through Inspector.
Summary
If opening Database Inspector triggers Fatal signal 11 (SIGSEGV) in SQLite, the app may be affected by the synchronization defect tracked as Issue 530704637. Upgrade to Android Studio Quail 4 or later and repeat the original workflow on the same device.
