Concurrent msstore invocations crash with an unhandled IOException on telemetrySettings.json
Los mantenedores suelen responder en 4 días
Evaluación
Este issue todavía no se ha evaluado.
Descripción
Summary
Running two msstore processes at the same time can crash one of them with an unhandled IOException while it loads or saves telemetrySettings.json.
Repro
Start two msstore invocations concurrently — anything is enough, since the telemetry configuration is loaded before the command line is even parsed:
Start-Job { msstore --help }
Start-Job { msstore --help }
Observed
One process terminates with an unhandled exception and exit code -532462766 (0xE0434352):
Unhandled exception. System.IO.IOException: The process cannot access the file
'C:\Users\<user>\AppData\Local\Microsoft\MSStore.CLI\telemetrySettings.json'
because it is being used by another process.
at Microsoft.Win32.SafeHandles.SafeFileHandle.CreateFile(String fullPath, FileMode mode, FileAccess access, FileShare share, FileOptions options)
Expected
Concurrent invocations should not crash. Telemetry configuration is incidental bookkeeping, so contention on it should at worst be ignored, not terminate the process.
Notes
Program.Main calls telemetryConfigurationManager.LoadAsync(true, …) and then CreateTelemetryClientAsync, which writes the file back when TelemetryEnabled is unset or the GUID is older than 24 hours. ConfigurationManager.LoadAsync/SaveAsync (MSStore.CLI/Services/ConfigurationManager.cs) open the file with no sharing mode, retry, or exception handling for this case, and nothing higher up catches it.
This matters most in CI, where several pipeline steps may invoke the CLI in parallel, and the failure is confusing because it is unrelated to the command being run.
Found incidentally while working on #161 / #174 — two probe invocations happened to overlap. Not caused by that change; it reproduces on main.
- Lenguaje dominante
- C#
- Estrellas
- 163
- Forks
- 22
- Merge medio
- 5 d 22 h
- PR fusionados (30 d)
- 7
Preparar el entorno
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de microsoft/msstore-cli
-
Linux: settings.json (SellerId/TenantId/ClientId) not visible to any subsequent msstore invocation after reconfigure, despite file being correctly writtenPosiblemente ocupada @isourabh la tomó hace 18 días. Abierto
microsoft/msstore-cli#181 · 2 comentarios · 1 reacción · 2 asignados ·
Los mantenedores suelen responder en 4 días
-
Dificultad 5/5 Más de una semana Aptitud para principiantes 35/100
microsoft/msstore-cli#179 ·
Los mantenedores suelen responder en 4 días
-
Delete app commandAbiertoinvalid
Dificultad 3/5 1-2 días Aptitud para principiantes 64/100
microsoft/msstore-cli#171 · 6 comentarios ·
Los mantenedores suelen responder en 4 días
-
Limit on 100 appsAbierto
Dificultad 3/5 1-2 días Aptitud para principiantes 55/100
microsoft/msstore-cli#170 ·
Los mantenedores suelen responder en 4 días
-
Dificultad 3/5 1-2 días Aptitud para principiantes 55/100
microsoft/msstore-cli#142 ·
Los mantenedores suelen responder en 4 días
Todos los issues de microsoft/msstore-cli
Issues similares
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 82/100
NethermindEth/nethermind#14012 ·
Los mantenedores suelen responder en 1 día
-
dependencies Status: Triage
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
json-schema-org/website#2518 ·
Los mantenedores suelen responder en 1 día
-
agentic-workflows
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
builtbybel/Flyoobe#498 ·
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 62/100
builtbybel/CrapFixer#112 ·