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

[BUG] Configuration broken after power fail of computer #3112

Open
2 tasks done
technogrady opened this issue Oct 27, 2024 · 2 comments
Open
2 tasks done

[BUG] Configuration broken after power fail of computer #3112

technogrady opened this issue Oct 27, 2024 · 2 comments
Labels
BUG Something isn't working

Comments

@technogrady
Copy link

Is this a bug in companion itself or a module?

  • I believe this to be a bug in companion

Is there an existing issue for this?

  • I have searched the existing issues

Describe the bug

We believe we lost power on our companion machine. We run a NUC bridge computer between our LAN and outside internet. We came back and all machines were reset. We turned on the NUC and started companion, and every screen and connection had been reset, but the interface we were running companion on( we have 5 interfaces on this computer) and custom port did not change. Companion satellite still automatically connected and had a blank screen with no buttons, only navigation.

Steps To Reproduce

Not sure but probably pull power on a machine running compainon

Expected Behavior

I expected all settings to stay the same

Environment (please complete the following information)

  • OS:Windows 10
  • Browser: Chrome 64
  • Companion Version: v3.4.1+7323-stable-e32a1052

Additional context

No response

@technogrady technogrady added the BUG Something isn't working label Oct 27, 2024
@dnmeid dnmeid changed the title [BUG] [BUG] Configuration broken after power fail of computer Oct 27, 2024
@dnmeid
Copy link
Member

dnmeid commented Oct 27, 2024

I'm very sorry for you but I think that is not a bug we can reliably handle.
Companion stores the configuration data in some files. The listening port is in one file and all the connections and buttons and so on in a different database file.
Especially if you have frequently changing variables, like timers with seconds the database is changed often.
If there is a power fail during a write operation it depends on your hardware setup how that is handled.
There are drives with a battery back-upped write cache, that will make sure that all pending write operations are finished even in case of power fail.
A standard NUC doesn't feature that. The modern file systems only ensure that in case of a power fail the filesystem doesn't get corrupt, but it is possible that scheduled write operations are not finished and then the file content will be corrupt.

Companion automatically generates a backup of your configuration for such cases. If you didn't change the configuration after the power fail, the backup should still hold a quite recent state. You can find it in the Companion configuration folder with a right click on the Companion tray icon. Close Companion and remove the corrupt "db" file and rename "db.bak" to "db".

@Julusian
Copy link
Member

Julusian commented Oct 29, 2024

I think the risk of this should be lower in the betas, due to the change in storage format.

I'm not sure what we can do for 3.4, this issue has been around for ages but stopped happening for a while, no idea why it has started cropping up again recently.

I did have a quick look at it today, but the only change I could think of (calling fsync) would require larger changes that introduce risk of making this even worse

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
BUG Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants