containerd / overlaybd

Overlaybd: a block based remote image format. The storage backend of containerd/accelerated-container-image.
Apache License 2.0
260 stars 58 forks source link

[Fix] access deleted point in prefetch thread. #343

Closed BigVan closed 3 months ago

BigVan commented 3 months ago

What this PR does / why we need it:

The DynamicPrefetcher::replay(IFile imgfile) progress is running in a background thread and it will access an invalid pointer after imgfile has been deleted in stack_files() https://github.com/containerd/overlaybd/blob/7093da0f29da0d3b1dc786f404fbf87c875c366d/src/overlaybd/lsmt/file.cpp#L1790

Which issue(s) this PR fixes (optional, in fixes #<issue number>(, fixes #<issue_number>, ...) format, will close the issue(s) when PR gets merged): Fixes #

Please check the following list: