Skip to content

Filecache is not safe for concurrent use and can lead to broken files #9

Description

@hlubek

We sometimes experience this error when using Devbox:

Error: invalid character '"' after top-level value

The system is not usable after this. We debugged the issue and found broken JSON files in the filecache to be the culprit.

It seems the filecache is prone to break with concurrent writes. It should use proper locking to:

  • prevent reading incomplete cache entries
  • exclusively writing cache entries so files are not interleaved / wrongly truncated

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions