Skip to content

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

@hlubek

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

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