Closed AmelBawa-msft closed 3 months ago
Correct me if I'm wrong, but isn’t this a limitation of MSI installers in general, where only one operation can be performed at a time anyways? Even with exe installers, although they can run at the same time if they attempt to access the same resource, there could be issues.
To me it seems that best practice for any automated installation is to only allow a single thread to process an install at any given time
Correct me if I'm wrong, but isn’t this a limitation of MSI installers in general, where only one operation can be performed at a time anyways? Even with exe installers, although they can run at the same time if they attempt to access the same resource, there could be issues.
To me it seems that best practice for any automated installation is to only allow a single thread to process an install at any given time
We already take care of that in the COM server, doing the things that we can in parallel (downloads) and serializing the parts that we must (installs [except of MSIX, because it takes care of that]).
@amelbawa-msft was able to capture a TTT for me and I determined that it was an issue in winget caused by a lack of thread safety around our opening of the tracking catalog (really, around the shared_ptr
where we store it). So ultimately the error occurs due to a race on searching using that source/catalog the first time.
Brief description of your issue
From Dev Home, when calling the COM API during installation from multiple threads running in parallel, often an exception occurs for one of the calls.
Dev Home logs
AppInstaller logs
Steps to reproduce
From Dev Home, attempt to install:
Expected behavior
Ability to call the API from multiple threads
Actual behavior
At least one call will throw an exception (logs above)
Environment