Skip to content

Settings stream access is not synchronized cross process #463

Closed

Description

@JohnMcPMS

Brief description of your issue

The base settings stream set/get functions are not synchronized cross process (nor in process either, but since things are largely single threaded, not a big deal). This probably does not apply to the app setting container streams, but the file streams created by std::fstream and kin are not exclusive.

The first step would be to simply prevent corrupt data via use of a CrossProcessReaderWriteLock when the fstream is open.

The next step would be to change the setting stream functionality to be more object oriented, allowing for read then write functionality while holding the exclusive lock.

Steps to reproduce

Attempting to manage sources from multiple processes could lead to corrupted data. This includes running winget concurrently, triggering multiple automatic updates that

Activity

  1. added this to the milestone on Jun 26, 2020
  2. ghost added
    Needs-Triage
    on Jun 26, 2020
  3. added
    Issue-Bug
    and removed
    Needs-Triage
    on Jun 26, 2020
  4. modified the milestones: , v1.1 - Windows Package Manager on May 14, 2021
  5. ghost added
    In-PR
    on Oct 1, 2021
  6. ghost removed
    In-PR
    on Oct 4, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Issue-Bug

    Type

    No type

    Projects

    • Status
      Done

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions