Flamenco Manager crashes; "foreign key relation missing" prevents restart #104321

Closed
opened 2024-07-01 22:22:02 +02:00 by PhilipN · 2 comments

System Information
Operating System(s): Windows Server 2022 Datacenter

Flamenco Version
Is Broken: 3.3.1

Short description of error
Flamenco Manager occasionally crashes. After crash, Manager closes immediately when started.

Asking Manager to run and pause shows Manager is printing:

INF opening database dsn=flamenco-manager.sqlite
ERR database: foreign key check failed num issues=8
ERR database: foreign key relation missing fkid=l parent=jobs rowid=4696 table=tasks
ERR database: foreign key relation missing fkid-l parent=jobs rowid=4697 table=tasks
ERR database: foreign key relation missing fkid=l parent=jobs rowid=4698 table=tasks
ERR database: foreign key relation missing fkid=l parent=jobs rowid=4699 table=tasks
ERR database: foreign key relation missing fkid=l parent=jobs rowid=4695 table=tasks
ERR database: foreign key relation missing fkid=l parent=jobs rowid=4700 table=tasks
ERR database: foreign key relation missing fkid=l parent=jobs rowid=4701 table=tasks
ERR database: foreign key relation missing fkid=l parent=jobs rowid=4702 table=tasks
FTL error opening database error="database integrity check failed" dsn=flamenco-manager. sqlite

Deleting or moving the database so Manager will create a new one allows the Manager to restart. Workers must be restarted and Job Types must be refetched.

Exact steps for others to reproduce the error
Difficult to pin down, but it seems like it may be the same as #104305 — leave Flamenco running long enough & delete a job. Both times this has happened, it's been up a few weeks, and this time I am able to say someone deleted a job right before it died.

Thanks for this great tool! Hoping this is just a data point for 104305.

**System Information** Operating System(s): Windows Server 2022 Datacenter **Flamenco Version** Is Broken: 3.3.1 **Short description of error** Flamenco Manager occasionally crashes. After crash, Manager closes immediately when started. Asking Manager to run and pause shows Manager is printing: INF opening database dsn=flamenco-manager.sqlite ERR database: foreign key check failed num issues=8 ERR database: foreign key relation missing fkid=l parent=jobs rowid=4696 table=tasks ERR database: foreign key relation missing fkid-l parent=jobs rowid=4697 table=tasks ERR database: foreign key relation missing fkid=l parent=jobs rowid=4698 table=tasks ERR database: foreign key relation missing fkid=l parent=jobs rowid=4699 table=tasks ERR database: foreign key relation missing fkid=l parent=jobs rowid=4695 table=tasks ERR database: foreign key relation missing fkid=l parent=jobs rowid=4700 table=tasks ERR database: foreign key relation missing fkid=l parent=jobs rowid=4701 table=tasks ERR database: foreign key relation missing fkid=l parent=jobs rowid=4702 table=tasks FTL error opening database error="database integrity check failed" dsn=flamenco-manager. sqlite Deleting or moving the database so Manager will create a new one allows the Manager to restart. Workers must be restarted and Job Types must be refetched. **Exact steps for others to reproduce the error** Difficult to pin down, but it seems like it may be the same as [#104305]([url](https://projects.blender.org/studio/flamenco/issues/104305)) — leave Flamenco running long enough & delete a job. Both times this has happened, it's been up a few weeks, and this time I am able to say someone deleted a job right before it died. Thanks for this great tool! Hoping this is just a data point for 104305.
PhilipN added the
Status
Needs Triage
Type
Report
Priority
Normal
labels 2024-07-01 22:22:02 +02:00

This is not caused by the crash, but by a more devious bug. It's been "fixed", so please update to the latest release of Flamenco.

This indeed has to do with #104305, which is something I'm actively working on. That issue also reads:

Note that there are already some guards in place, that refuse to delete jobs / workers / tags when foreign key constraints are disabled.

Those guards aren't there yet in version 3.3 though.

Unfortunately for now you'll have to do one more delete & start over. Then update to 3.5 and this should be a thing of the past. Maybe it'll refuse to delete a job; then restart Flamenco and it'll delete it just fine. That's the new guard. A proper solution is coming, but it requires a massive rewrite of the entire database interface, so it'll take a bit more time.

This is not caused by the crash, but by a more devious bug. It's been "fixed", so please update to the latest release of Flamenco. This indeed has to do with #104305, which is something I'm actively working on. That issue also reads: > Note that there are already some guards in place, that refuse to delete jobs / workers / tags when foreign key constraints are disabled. Those guards aren't there yet in version 3.3 though. Unfortunately for now you'll have to do one more delete & start over. Then update to 3.5 and this should be a thing of the past. Maybe it'll refuse to delete a job; then restart Flamenco and it'll delete it just fine. That's the new guard. A proper solution is coming, but it requires a massive rewrite of the entire database interface, so it'll take a bit more time.
Author

Thanks! We'll update!

Thanks! We'll update!
Sign in to join this conversation.
No Milestone
No Assignees
2 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: studio/flamenco#104321
No description provided.