Skip to content
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

DatabaseCommonTest.insertCollisionThrowsSQLiteException is flaky #1356

Open
swankjesse opened this issue Jun 14, 2024 · 0 comments
Open

DatabaseCommonTest.insertCollisionThrowsSQLiteException is flaky #1356

swankjesse opened this issue Jun 14, 2024 · 0 comments
Labels

Comments

@swankjesse
Copy link
Collaborator

We’re attempting to catch an exception but it isn’t catching? What a weird bug.

> Task :zipline-loader:macosX64Test
    at 14  test.kexe                           0x104c1ec40        kfun:kotlin.Function1#invoke(1:0){}1:1-trampoline + 80 (/Users/teamcity/.gradle/daemon/8.4/[K][Suspend]Functions:1:1)
    at 15  test.kexe                           0x104e76f66        kfun:app.cash.sqldelight.driver.native.ConnectionWrapper.accessStatement$lambda$0#internal + 870 (/Users/runner/work/sqldelight/sqldelight/drivers/native-driver/src/nativeMain/kotlin/app/cash/sqldelight/driver/native/NativeSqlDatabase.kt:42:9)
    at 16  test.kexe                           0x104e7724a        kfun:app.cash.sqldelight.driver.native.ConnectionWrapper.$accessStatement$lambda$0$FUNCTION_REFERENCE$0.invoke#internal + 122 (/Users/runner/work/sqldelight/sqldelight/drivers/native-driver/src/nativeMain/kotlin/app/cash/sqldelight/driver/native/NativeSqlDatabase.kt:35:12)
    at 17  test.kexe                           0x104c1ec40        kfun:kotlin.Function1#invoke(1:0){}1:1-trampoline + 80 (/Users/teamcity/.gradle/daemon/8.4/[K][Suspend]Functions:1:1)
    at 18  test.kexe                           0x104e7d9d8        kfun:app.cash.sqldelight.driver.native.Pool#access(kotlin.Function1<1:0,0:0>){0§<kotlin.Any?>}0:0 + 424 (/Users/runner/work/sqldelight/sqldelight/drivers/native-driver/src/nativeMain/kotlin/app/cash/sqldelight/driver/native/Pool.kt:65:7)
    at 19  test.kexe                           0x104e79203        kfun:app.cash.sqldelight.driver.native.NativeSqliteDriver#accessConnection(kotlin.Boolean;kotlin.Function1<app.cash.sqldelight.driver.native.ThreadConnection,0:0>){0§<kotlin.Any?>}0:0 + 803 (/Users/runner/work/sqldelight/sqldelight/drivers/native-driver/src/nativeMain/kotlin/app/cash/sqldelight/driver/native/NativeSqlDatabase.kt:248:25)
    at 20  test.kexe                           0x104e803d7        kfun:app.cash.sqldelight.driver.native.ConnectionWrapper#accessConnection(kotlin.Boolean;kotlin.Function1<app.cash.sqldelight.driver.native.ThreadConnection,0:0>){0§<kotlin.Any?>}0:0-trampoline + 71 (/Users/runner/work/sqldelight/sqldelight/drivers/native-driver/src/nativeMain/kotlin/app/cash/sqldelight/driver/native/NativeSqlDatabase.kt:23:21)
    at 21  test.kexe                           0x104e76773        kfun:app.cash.sqldelight.driver.native.ConnectionWrapper.accessStatement#internal + 499 (/Users/runner/work/sqldelight/sqldelight/drivers/native-driver/src/nativeMain/kotlin/app/cash/sqldelight/driver/native/NativeSqlDatabase.kt:35:12)
    at 22  test.kexe                           0x104e76924        kfun:app.cash.sqldelight.driver.native.ConnectionWrapper#execute(kotlin.Int?;kotlin.String;kotlin.Int;kotlin.Function1<app.cash.sqldelight.db.SqlPreparedStatement,kotlin.Unit>?){}app.cash.sqldelight.db.QueryResult<kotlin.Long> + 340 (/Users/runner/work/sqldelight/sqldelight/drivers/native-driver/src/nativeMain/kotlin/app/cash/sqldelight/driver/native/NativeSqlDatabase.kt:56:5)
    at 23  test.kexe                           0x104e42ae7        kfun:app.cash.sqldelight.db.SqlDriver#execute(kotlin.Int?;kotlin.String;kotlin.Int;kotlin.Function1<app.cash.sqldelight.db.SqlPreparedStatement,kotlin.Unit>?){}app.cash.sqldelight.db.QueryResult<kotlin.Long>-trampoline + 103 (/Users/runner/work/sqldelight/sqldelight/runtime/src/commonMain/kotlin/app/cash/sqldelight/db/SqlDriver.kt:63:3)
    at 24  test.kexe                           0x104826b13        kfun:app.cash.zipline.loader.internal.cache.FilesQueries#insert(kotlin.String;kotlin.String?;app.cash.zipline.loader.internal.cache.FileState;kotlin.Long;kotlin.Long;kotlin.Long?){} + 643 (/Users/runner/work/zipline/zipline/zipline-loader/build/generated/sqldelight/code/Database/commonMain/app/cash/zipline/loader/internal/cache/FilesQueries.kt:278:12)
    at 25  test.kexe                           0x1048faaa4        kfun:app.cash.zipline.loader.internal.cache.DatabaseCommonTest#insertCollisionThrowsSQLiteException(){} + 1188 (/Users/runner/work/zipline/zipline/zipline-loader/src/commonTest/kotlin/app/cash/zipline/loader/internal/cache/DatabaseCommonTest.kt:71:29)
    at 26  test.kexe                           0x1048fb0a7        kfun:app.cash.zipline.loader.internal.cache.$DatabaseCommonTest$test$0.$insertCollisionThrowsSQLiteException$FUNCTION_REFERENCE$2.invoke#internal + 71 (/Users/runner/work/zipline/zipline/zipline-loader/src/commonTest/kotlin/app/cash/zipline/loader/internal/cache/DatabaseCommonTest.kt:54:3)
    at 27  test.kexe                           0x1048fb10d        kfun:app.cash.zipline.loader.internal.cache.$DatabaseCommonTest$test$0.$insertCollisionThrowsSQLiteException$FUNCTION_REFERENCE$2.$<bridge-UNNN>invoke(-1:0){}#internal + 93 (/Users/runner/work/zipline/zipline/zipline-loader/src/commonTest/kotlin/app/cash/zipline/loader/internal/cache/DatabaseCommonTest.kt:54:3)
    at 28  test.kexe                           0x104c1ec40        kfun:kotlin.Function1#invoke(1:0){}1:1-trampoline + 80 (/Users/teamcity/.gradle/daemon/8.4/[K][Suspend]Functions:1:1)
    at 29  test.kexe                           0x104b2cfdf        kfun:kotlin.native.internal.test.BaseClassSuite.TestCase#doRun(){} + 223 (/opt/buildAgent/work/b2e1db4d8d903ca4/kotlin/kotlin-native/runtime/src/main/kotlin/kotlin/native/internal/test/TestSuite.kt:177:22)
    at 30  test.kexe                           0x104c26ba1        kfun:kotlin.native.internal.test.TestCase#doRun(){}-trampoline + 65 (/opt/buildAgent/work/b2e1db4d8d903ca4/kotlin/kotlin-native/runtime/src/main/kotlin/kotlin/native/internal/test/TestSuite.kt:44:12)
    at 31  test.kexe                           0x104b2ad2a        kfun:kotlin.native.internal.test.TestCase#run(){} + 170 (/opt/buildAgent/work/b2e1db4d8d903ca4/kotlin/kotlin-native/runtime/src/main/kotlin/kotlin/native/internal/test/TestSuite.kt:52:13)
    at 32  test.kexe                           0x104c26951        kfun:kotlin.native.internal.test.TestCase#run(){}-trampoline + 65 (/opt/buildAgent/work/b2e1db4d8d903ca4/kotlin/kotlin-native/runtime/src/main/kotlin/kotlin/native/internal/test/TestSuite.kt:49:12)
    at 33  test.kexe                           0x104b27a06        kfun:kotlin.native.internal.test.TestRunner.run#internal + 3862 (/opt/buildAgent/work/b2e1db4d8d903ca4/kotlin/kotlin-native/runtime/src/main/kotlin/kotlin/native/internal/test/TestRunner.kt:263:30)
    at 34  test.kexe                           0x104b28bff        kfun:kotlin.native.internal.test.TestRunner.runIteration#internal + 3167 (/opt/buildAgent/work/b2e1db4d8d903ca4/kotlin/kotlin-native/runtime/src/main/kotlin/kotlin/native/internal/test/TestRunner.kt:289:49)
    at 35  test.kexe                           0x104b29582        kfun:kotlin.native.internal.test.TestRunner#run(){}kotlin.Int + 1298 (/opt/buildAgent/work/b2e1db4d8d903ca4/kotlin/kotlin-native/runtime/src/main/kotlin/kotlin/native/internal/test/TestRunner.kt:304:17)
    at 36  test.kexe                           0x104b1c3c2        kfun:kotlin.native.internal.test#testLauncherEntryPoint(kotlin.Array<kotlin.String>){}kotlin.Int + 258 (/opt/buildAgent/work/b2e1db4d8d903ca4/kotlin/kotlin-native/runtime/src/main/kotlin/kotlin/native/internal/test/Launcher.kt:33:53)
    at 37  test.kexe                           0x104b1c457        kfun:kotlin.native.internal.test#main(kotlin.Array<kotlin.String>){} + 71 (/opt/buildAgent/work/b2e1db4d8d903ca4/kotlin/kotlin-native/runtime/src/main/kotlin/kotlin/native/internal/test/Launcher.kt:38:20)
    at 38  test.kexe                           0x104928b93        Konan_start + 147 (/Users/runner/.gradle/daemon/8.8/entryPointOwner:1:1)
    at 39  test.kexe                           0x104933b9d        Init_and_run_start + 93 
    at 40  dyld                                0x7ff8134cf365     start + 1941 
co.touchlab.sqliter.interop.SQLiteExceptionErrorCode: Sqlite operation failure UNIQUE constraint failed: files.sha256_hex
    at 0   test.kexe                           0x104ae99f9        kfun:kotlin.Throwable#<init>(kotlin.String?){} + 105 (/opt/buildAgent/work/b2e1db4d8d903ca4/kotlin/kotlin-native/runtime/src/main/kotlin/kotlin/Throwable.kt:28:44)
    at 1   test.kexe                           0x104ae42c5        kfun:kotlin.Exception#<init>(kotlin.String?){} + 101 (/opt/buildAgent/work/b2e1db4d8d903ca4/kotlin/kotlin-native/runtime/src/main/kotlin/kotlin/Exceptions.kt:23:51)
    at 2   test.kexe                           0x104e5b170        kfun:co.touchlab.sqliter.interop.SQLiteException#<init>(kotlin.String;co.touchlab.sqliter.interop.SqliteDatabaseConfig){} + 112 (/Users/runner/work/SQLiter/SQLiter/sqliter-driver/src/nativeCommonMain/kotlin/co/touchlab/sqliter/interop/SQLiteException.kt:3:110)
@swankjesse swankjesse added the bug label Jun 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant