-
Notifications
You must be signed in to change notification settings - Fork 909
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
chocolatey.config gets corrupted when multiple processes access simultaneously #1258
Comments
This is probably related to GH-653, specifically this change may help (but probably won't eliminate all possible corruption - but at the very least it relies on the OS copy being atomic...)
|
We'll close the other as a duplicate of this. |
FWIW, I'm put the above change (well, the 0.10.5 version of it - the one above was for 0.10.3) into our local chocolatey build and I'll see over the next couple of weeks if the issue reproduces or not..... |
Fixed for 0.10.6 |
Previously, multiple Chocolatey processes running could affect or corrupt the chocolatey.config file depending on how they accessed the file. Implement a single global mutex (process-wide) on serialization and deserialization of the xml configuration file to ensure the file stays consistent.
Add logging and xml docs to public items
A named mutex cannot be used in mono, it causes errors. If choco is not being run on Windows, skip the named mutex and just allow the function / action to execute.
Give the MUTEX_TIMEOUT 2 seconds, but also increase the retries by waiting 200 milliseconds and increasing by 200 milliseconds between retries.
I had the same error on version 12.1.
renamed the config file, renamed the config.backup file and it is working again. |
I still get the same error on Chocolatey v2.4.1 Business. Error deserializing response of type chocolatey.infrastructure.app.configuration.ConfigFileSettings: Fehler im XML-Dokument (22,14). This is try 1/3. Retrying after 400 milliseconds. Error converted to warning: Fehler im XML-Dokument (22,14). renamed the config.backup file and it is working again. |
@FLeven this issue is closed. As a Chocolatey for Business customer, can you please raise a support ticket? You can find your options for doing so by running |
What You Are Seeing?
Broken chocolatey.config after two processes use choco.exe at the same time. (sometimes)
What is Expected?
config shouldn't be corrupted
How Did You Get This To Happen? (Steps to Reproduce)
Two processes -> both use choco.exe at the very same time (
choco list
is sufficient)This Issue is a follow-up of GH-1047
The text was updated successfully, but these errors were encountered: