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

SIGBUS Accessing SIF on Non-Local Filesystem #11

Closed
tri-adam opened this issue Jun 9, 2021 · 0 comments · Fixed by #12
Closed

SIGBUS Accessing SIF on Non-Local Filesystem #11

tri-adam opened this issue Jun 9, 2021 · 0 comments · Fixed by #12
Assignees
Labels
bug Something isn't working

Comments

@tri-adam
Copy link
Member

tri-adam commented Jun 9, 2021

When a SIF is loaded from a non-local filesystem using LoadContainer or LoadContainerFp, a SIGBUS may occur when an I/O issue occurs in the underlying storage.

The reason for this is that the SIF module memory maps the file when loading with LoadContainer/LoadContainerFp. When combined with non-local storage, mmap is particularly risky. A SIGBUS can be raised any time an underlying I/O operation fails. Since accessing SIF images from non-local storage is a common use case in SingularityCE, we can't ignore this risk.

In theory, the SIGBUS could be caught with a signal handler, and a scheme could be devised to safely recover. In practice though, the github.com/sylabs/sif module is generally imported into applications which may already define a signal handler. Since these are global, there would need to be some scheme devised to coordinate, and in the end this would be quite cumbersome and clunky.

As an alternative, I propose we look at whether we really need to use memory mapping in the first place. On the surface, it wouldn't appear that we're getting much benefit from it.

@tri-adam tri-adam added the bug Something isn't working label Jun 9, 2021
@tri-adam tri-adam self-assigned this Jun 9, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant