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

Prevent gc from closing image file descriptor #6054

Merged
merged 2 commits into from
Jun 24, 2021

Conversation

DrDaveD
Copy link
Collaborator

@DrDaveD DrDaveD commented Jun 23, 2021

Description of the Pull Request (PR):

This prevents garbage collection from closing a container image file descriptor, by initializing the Image.File object when it is first referenced rather than just before use. Previously if a copy of the image file descriptor was made (which is easy to do accidentally in go), the File object would be created in that copy and so when the copy was dereferenced garbage collection would close the corresponding file descriptor.

This fixes or addresses the following GitHub issues:

Before submitting a PR, make sure you have done the following:

pkg/image/image.go Outdated Show resolved Hide resolved
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Using -u --nv prevents singularity from holding a file descriptor on the container sandbox
2 participants