Closed mwallner closed 7 years ago
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...)
diff --git a/src/chocolatey/infrastructure/services/XmlService.cs b/src/chocolatey/infrastructure/services/XmlService.cs
index 00619f6..032e87d 100644
--- a/src/chocolatey/infrastructure/services/XmlService.cs
+++ b/src/chocolatey/infrastructure/services/XmlService.cs
@@ -19,6 +19,7 @@ namespace chocolatey.infrastructure.services
using System.Text;
using System.Xml;
using System.Xml.Serialization;
+ using System.Diagnostics;
using cryptography;
using filesystem;
using tolerance;
@@ -65,7 +66,7 @@ namespace chocolatey.infrastructure.services
{
_fileSystem.create_directory_if_not_exists(_fileSystem.get_directory_name(xmlFilePath));
- var xmlUpdateFilePath = xmlFilePath + ".update";
+ var xmlUpdateFilePath = xmlFilePath + ".update" + Process.GetCurrentProcess().Id().ToString();
FaultTolerance.try_catch_with_logging_exception(
() =>
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
I had the same error on version 12.1.
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 file, renamed the config.backup file and it is working again.
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