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

Deadlock during migration #741

Closed
cosmer-work opened this issue Mar 27, 2020 · 3 comments
Closed

Deadlock during migration #741

cosmer-work opened this issue Mar 27, 2020 · 3 comments
Labels

Comments

@cosmer-work
Copy link

What did you do?

Updated to GRDB from 4.9.0 to 4.12.0.

What did you expect to happen?

No deadlock.

What happened instead?

A deadlock occurred during migration.

Environment

GRDB flavor(s): GRDB
GRDB version: 4.12.0
Installation method: SPM
Xcode version: 11.4
Swift version: 5.2
Platform(s) running GRDB: iOS 13.4
macOS version running Xcode: 10.15.4

Steps to Reproduce

Assign a target queue to the configuration

var configuration = Configuration()
configuration.targetQueue = targetQueue

Enable erase database on schema change

var migrator = DatabaseMigrator()
migrator.eraseDatabaseOnSchemaChange = true

A deadlock will occur at line 51 of SerializedDatabase.swift after calling migrator.migrate.
try queue.sync {

4.10.0 doesn't have this issue. 4.11.0 does.

@groue
Copy link
Owner

groue commented Mar 27, 2020

Hello @cosmer-work, thank you for the report!

@groue
Copy link
Owner

groue commented Mar 29, 2020

A fix has been pushed in v4.12.1

@groue groue closed this as completed Mar 29, 2020
@cosmer-work
Copy link
Author

Thank you @groue.

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

2 participants