Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cache: concurrent operation safety, redesign #6

Open
dtzWill opened this issue Feb 14, 2018 · 1 comment
Open

cache: concurrent operation safety, redesign #6

dtzWill opened this issue Feb 14, 2018 · 1 comment
Labels
enhancement New feature or request help wanted Extra attention is needed

Comments

@dtzWill
Copy link
Member

dtzWill commented Feb 14, 2018

Both StaticBinaryCache and JITCache (since they share much of their implementation)
don't currently take into account safe operation when other ALLVM processes are executing--
it's currently possible for two allready instances (or alley) to perform the same failing check
for cached code, both decide to build it, and then both try to add it to the cache.

A major part of handling this issue is sorting out some of the design details
(such as whether the interface should change to make doing the right thing more straightforward).

As a potential reference I suggest looking at LLVM's LTO Caching code,
such as the bits touched in this recent commit:

llvm-mirror/llvm@91d99c6


(maybe the existence of an LTO cache suggests we should be working with them, or at least trying to use their components?)

@dtzWill dtzWill added enhancement New feature or request help wanted Extra attention is needed labels Feb 14, 2018
@dtzWill
Copy link
Member Author

dtzWill commented Nov 5, 2019

Related: use memfd_create + file sealing to ensure a)cache isn't modified if app tries to write to its image and b)avoid need for filesystem location underlying the fd (and don't leak it)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

1 participant