You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
The text was updated successfully, but these errors were encountered:
When a SIF is loaded from a non-local filesystem using
LoadContainer
orLoadContainerFp
, aSIGBUS
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. ASIGBUS
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, thegithub.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.
The text was updated successfully, but these errors were encountered: