René's URL Explorer Experiment


Title: java.util.concurrent.TimeoutException: net.sqlcipher.database.SQLiteCompiledSql.finalize() timed out after 10 seconds · Issue #537 · sqlcipher/android-database-sqlcipher · GitHub

Open Graph Title: java.util.concurrent.TimeoutException: net.sqlcipher.database.SQLiteCompiledSql.finalize() timed out after 10 seconds · Issue #537 · sqlcipher/android-database-sqlcipher

X Title: java.util.concurrent.TimeoutException: net.sqlcipher.database.SQLiteCompiledSql.finalize() timed out after 10 seconds · Issue #537 · sqlcipher/android-database-sqlcipher

Description: Expected Behavior App doesn't crash Actual Behavior App crashes due to SQLiteCipher on Android API 24-25 Steps to Reproduce App uses Room + SQLCipher. WAL is enabled. The only synthetic case how I can emulate crash is accessing SQLiteCom...

Open Graph Description: Expected Behavior App doesn't crash Actual Behavior App crashes due to SQLiteCipher on Android API 24-25 Steps to Reproduce App uses Room + SQLCipher. WAL is enabled. The only synthetic case how I ...

X Description: Expected Behavior App doesn't crash Actual Behavior App crashes due to SQLiteCipher on Android API 24-25 Steps to Reproduce App uses Room + SQLCipher. WAL is enabled. The only synthetic case ho...

Opengraph URL: https://github.com/sqlcipher/android-database-sqlcipher/issues/537

X: @github

direct link

Domain: patch-diff.githubusercontent.com


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":" java.util.concurrent.TimeoutException: net.sqlcipher.database.SQLiteCompiledSql.finalize() timed out after 10 seconds","articleBody":"### Expected Behavior\r\nApp doesn't crash\r\n### Actual Behavior\r\nApp crashes due to SQLiteCipher on Android API 24-25\r\n\r\n### Steps to Reproduce\r\n\r\nApp uses Room + SQLCipher.\r\nWAL is enabled. \r\n\r\nThe only synthetic case how I can emulate crash is accessing `SQLiteCompiledSql`(Use API 24-25 Android emulator):\r\n1) Launch thread A\r\n2) Launch thread B\r\n3) Block B, In A create `SQLiteCompiledSql` object, set `nStatement` so that `finalize` can run `releaseSqlStatement`, block A, unblock B\r\n4) In B launch start a long transaction, unblock A, do memory extensive work to cause GC\r\n5) Wait\r\n\r\nAndroid test Kotlin code(if required I can convert to Java):\r\n```\r\n  @Test\r\n    fun emulateCrash() = coroutineRule.runBlocking {\r\n        dbRule.useWithProject {\r\n            val latch1 = CountDownLatch(1)\r\n            val latch2 = CountDownLatch(1)\r\n\r\n            launch (Dispatchers.IO) {\r\n                SQLiteProxy(db.openHelper.writableDatabase as SQLiteDatabase, \"SELECT 1 FROM Album\").setupStub()\r\n                latch2.countDown()\r\n                latch1.await()\r\n            }\r\n\r\n            latch2.await()\r\n            db.withTransaction {\r\n                latch1.countDown()\r\n                while (true) {\r\n                    // no matter what  - just pollute memory to cause GC\r\n                    val albumEntity = newAlbum(\r\n                        projectEntity = projectEntity,\r\n                        companyEntity = companyEntity\r\n                    )\r\n                }\r\n            }\r\n        }\r\n    }\r\n```\r\n\r\n```\r\npackage net.sqlcipher.database;\r\n\r\npublic class SQLiteProxy extends SQLiteCompiledSql {\r\n\r\n    public SQLiteProxy(SQLiteDatabase db, String sql) {\r\n        super(db, sql);\r\n    }\r\n\r\n    public void setupStub() {\r\n        nStatement = Long.MAX_VALUE;\r\n    }\r\n\r\n}\r\n```\r\n\r\nSQLCipher version (can be identified by executing `PRAGMA cipher_version;`):\r\n4.4.2 community\r\n\r\nSQLCipher for Android version:\r\n4.4.2\r\n\r\nRoom version:\r\n2.3.0-beta01\r\n\r\nMy guess would be how Android handles GC and especially `finalize()` on version API 24-25.\r\nSince there is DB lock() call that blocks/await thread this causes watchdog to throw exception.\r\nI've checked generated Room code and I don't see where the cursor can be not closed.\r\nNot sure when the compiled statement is not cached to emulate the scenario.\r\nHowever, it happens in normal code execution with extensive concurrent work and multiple transactions. \r\n\r\nCan `releaseSqlStatement` be removed from `finalize` or handled in a different way?\r\n","author":{"url":"https://github.com/oleksandr-semenov","@type":"Person","name":"oleksandr-semenov"},"datePublished":"2021-02-15T17:31:39.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":23},"url":"https://github.com/537/android-database-sqlcipher/issues/537"}

route-pattern/_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format)
route-controllervoltron_issues_fragments
route-actionissue_layout
fetch-noncev2:b4a7a914-4937-a001-a1b7-140e9092f9f0
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-idD3D4:1DE36E:12F1864:19F423B:6971E0FB
html-safe-noncec2449fbadc70432526b69cf3ecdd939a5ea44fb653e5a39fec8f640e6a5ce9e2
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJEM0Q0OjFERTM2RToxMkYxODY0OjE5RjQyM0I6Njk3MUUwRkIiLCJ2aXNpdG9yX2lkIjoiMjMwMzUyNDM0NzExODIxNTQxOSIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9
visitor-hmac696caea04cee8eb139402a689dada720755ed4346bdda65a4cf4f75c60806ce3
hovercard-subject-tagissue:808714040
github-keyboard-shortcutsrepository,issues,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///voltron/issues_fragments/issue_layout
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/sqlcipher/android-database-sqlcipher/537/issue_layout
twitter:imagehttps://opengraph.githubassets.com/9357f4a51bc1fc36f737f5011fcb41a0f840da23b77aa8e4046f72e8ff1c0059/sqlcipher/android-database-sqlcipher/issues/537
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/9357f4a51bc1fc36f737f5011fcb41a0f840da23b77aa8e4046f72e8ff1c0059/sqlcipher/android-database-sqlcipher/issues/537
og:image:altExpected Behavior App doesn't crash Actual Behavior App crashes due to SQLiteCipher on Android API 24-25 Steps to Reproduce App uses Room + SQLCipher. WAL is enabled. The only synthetic case how I ...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernameoleksandr-semenov
hostnamegithub.com
expected-hostnamegithub.com
None683712716975b3393656edf09255a1d488d0e68ab7b9ac97e40ecf40036f696c
turbo-cache-controlno-preview
go-importgithub.com/sqlcipher/android-database-sqlcipher git https://github.com/sqlcipher/android-database-sqlcipher.git
octolytics-dimension-user_id649049
octolytics-dimension-user_loginsqlcipher
octolytics-dimension-repository_id1466080
octolytics-dimension-repository_nwosqlcipher/android-database-sqlcipher
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id1466080
octolytics-dimension-repository_network_root_nwosqlcipher/android-database-sqlcipher
turbo-body-classeslogged-out env-production page-responsive
disable-turbofalse
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
releaseed99da4e2de688dd1056894c1eccd4c82c6bbbfe
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://patch-diff.githubusercontent.com/sqlcipher/android-database-sqlcipher/issues/537#start-of-content
https://patch-diff.githubusercontent.com/
Sign in https://patch-diff.githubusercontent.com/login?return_to=https%3A%2F%2Fgithub.com%2Fsqlcipher%2Fandroid-database-sqlcipher%2Fissues%2F537
GitHub CopilotWrite better code with AIhttps://github.com/features/copilot
GitHub SparkBuild and deploy intelligent appshttps://github.com/features/spark
GitHub ModelsManage and compare promptshttps://github.com/features/models
MCP RegistryNewIntegrate external toolshttps://github.com/mcp
ActionsAutomate any workflowhttps://github.com/features/actions
CodespacesInstant dev environmentshttps://github.com/features/codespaces
IssuesPlan and track workhttps://github.com/features/issues
Code ReviewManage code changeshttps://github.com/features/code-review
GitHub Advanced SecurityFind and fix vulnerabilitieshttps://github.com/security/advanced-security
Code securitySecure your code as you buildhttps://github.com/security/advanced-security/code-security
Secret protectionStop leaks before they starthttps://github.com/security/advanced-security/secret-protection
Why GitHubhttps://github.com/why-github
Documentationhttps://docs.github.com
Bloghttps://github.blog
Changeloghttps://github.blog/changelog
Marketplacehttps://github.com/marketplace
View all featureshttps://github.com/features
Enterpriseshttps://github.com/enterprise
Small and medium teamshttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
App Modernizationhttps://github.com/solutions/use-case/app-modernization
DevSecOpshttps://github.com/solutions/use-case/devsecops
DevOpshttps://github.com/solutions/use-case/devops
CI/CDhttps://github.com/solutions/use-case/ci-cd
View all use caseshttps://github.com/solutions/use-case
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
View all industrieshttps://github.com/solutions/industry
View all solutionshttps://github.com/solutions
AIhttps://github.com/resources/articles?topic=ai
Software Developmenthttps://github.com/resources/articles?topic=software-development
DevOpshttps://github.com/resources/articles?topic=devops
Securityhttps://github.com/resources/articles?topic=security
View all topicshttps://github.com/resources/articles
Customer storieshttps://github.com/customer-stories
Events & webinarshttps://github.com/resources/events
Ebooks & reportshttps://github.com/resources/whitepapers
Business insightshttps://github.com/solutions/executive-insights
GitHub Skillshttps://skills.github.com
Documentationhttps://docs.github.com
Customer supporthttps://support.github.com
Community forumhttps://github.com/orgs/community/discussions
Trust centerhttps://github.com/trust-center
Partnershttps://github.com/partners
GitHub SponsorsFund open source developershttps://github.com/sponsors
Security Labhttps://securitylab.github.com
Maintainer Communityhttps://maintainers.github.com
Acceleratorhttps://github.com/accelerator
Archive Programhttps://archiveprogram.github.com
Topicshttps://github.com/topics
Trendinghttps://github.com/trending
Collectionshttps://github.com/collections
Enterprise platformAI-powered developer platformhttps://github.com/enterprise
GitHub Advanced SecurityEnterprise-grade security featureshttps://github.com/security/advanced-security
Copilot for BusinessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/premium-support
Pricinghttps://github.com/pricing
Search syntax tipshttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
documentationhttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
Sign in https://patch-diff.githubusercontent.com/login?return_to=https%3A%2F%2Fgithub.com%2Fsqlcipher%2Fandroid-database-sqlcipher%2Fissues%2F537
Sign up https://patch-diff.githubusercontent.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fvoltron%2Fissues_fragments%2Fissue_layout&source=header-repo&source_repo=sqlcipher%2Fandroid-database-sqlcipher
Reloadhttps://patch-diff.githubusercontent.com/sqlcipher/android-database-sqlcipher/issues/537
Reloadhttps://patch-diff.githubusercontent.com/sqlcipher/android-database-sqlcipher/issues/537
Reloadhttps://patch-diff.githubusercontent.com/sqlcipher/android-database-sqlcipher/issues/537
sqlcipher https://patch-diff.githubusercontent.com/sqlcipher
android-database-sqlcipherhttps://patch-diff.githubusercontent.com/sqlcipher/android-database-sqlcipher
Notifications https://patch-diff.githubusercontent.com/login?return_to=%2Fsqlcipher%2Fandroid-database-sqlcipher
Fork 575 https://patch-diff.githubusercontent.com/login?return_to=%2Fsqlcipher%2Fandroid-database-sqlcipher
Star 2.8k https://patch-diff.githubusercontent.com/login?return_to=%2Fsqlcipher%2Fandroid-database-sqlcipher
Code https://patch-diff.githubusercontent.com/sqlcipher/android-database-sqlcipher
Issues 1 https://patch-diff.githubusercontent.com/sqlcipher/android-database-sqlcipher/issues
Pull requests 0 https://patch-diff.githubusercontent.com/sqlcipher/android-database-sqlcipher/pulls
Actions https://patch-diff.githubusercontent.com/sqlcipher/android-database-sqlcipher/actions
Projects 0 https://patch-diff.githubusercontent.com/sqlcipher/android-database-sqlcipher/projects
Security Uh oh! There was an error while loading. Please reload this page. https://patch-diff.githubusercontent.com/sqlcipher/android-database-sqlcipher/security
Please reload this pagehttps://patch-diff.githubusercontent.com/sqlcipher/android-database-sqlcipher/issues/537
Insights https://patch-diff.githubusercontent.com/sqlcipher/android-database-sqlcipher/pulse
Code https://patch-diff.githubusercontent.com/sqlcipher/android-database-sqlcipher
Issues https://patch-diff.githubusercontent.com/sqlcipher/android-database-sqlcipher/issues
Pull requests https://patch-diff.githubusercontent.com/sqlcipher/android-database-sqlcipher/pulls
Actions https://patch-diff.githubusercontent.com/sqlcipher/android-database-sqlcipher/actions
Projects https://patch-diff.githubusercontent.com/sqlcipher/android-database-sqlcipher/projects
Security https://patch-diff.githubusercontent.com/sqlcipher/android-database-sqlcipher/security
Insights https://patch-diff.githubusercontent.com/sqlcipher/android-database-sqlcipher/pulse
New issuehttps://patch-diff.githubusercontent.com/login?return_to=https://github.com/sqlcipher/android-database-sqlcipher/issues/537
New issuehttps://patch-diff.githubusercontent.com/login?return_to=https://github.com/sqlcipher/android-database-sqlcipher/issues/537
java.util.concurrent.TimeoutException: net.sqlcipher.database.SQLiteCompiledSql.finalize() timed out after 10 secondshttps://patch-diff.githubusercontent.com/sqlcipher/android-database-sqlcipher/issues/537#top
needs-detailsNeeds additional details to proceed.https://github.com/sqlcipher/android-database-sqlcipher/issues?q=state%3Aopen%20label%3A%22needs-details%22
staleThis issue lacks recent activity.https://github.com/sqlcipher/android-database-sqlcipher/issues?q=state%3Aopen%20label%3A%22stale%22
https://github.com/oleksandr-semenov
https://github.com/oleksandr-semenov
oleksandr-semenovhttps://github.com/oleksandr-semenov
on Feb 15, 2021https://github.com/sqlcipher/android-database-sqlcipher/issues/537#issue-808714040
needs-detailsNeeds additional details to proceed.https://github.com/sqlcipher/android-database-sqlcipher/issues?q=state%3Aopen%20label%3A%22needs-details%22
staleThis issue lacks recent activity.https://github.com/sqlcipher/android-database-sqlcipher/issues?q=state%3Aopen%20label%3A%22stale%22
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Viewport: width=device-width


URLs of crawlers that visited me.