Skip to content

clangd can exhaust all disk space in /tmp by writing preamble-*.pch files #51831

@ehsan

Description

@ehsan
Bugzilla Link 52489
Version unspecified
OS All

Extended Description

I use the clangd extension in Visual Studio for a very large C++ project based on the Chromium code base.

I've noticed that clangd leaves behind preamble PCH files inside /tmp so frequently that I run out of disk space once every couple of weeks, with /tmp using 116GB, 130GB, etc worth in these files.

I noticed that others have experienced this issue too (e.g. https://youtrack.jetbrains.com/issue/CPP-19402) and some people recommend passing -pch-storage=memory to clangd. However I have 16GB of RAM on this server and I am unsure whether doing this is a good idea for a project of this size.

Could clangd be modified to manage these files better and prevent the out of disk space scenario?

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugzillaIssues migrated from bugzillaclangd

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions