Ok, I see my error with shell vs exec. I'm running on a VM with my own space, no NFS involved. Here is the debug command run and lsofl
[root@mach0 ~]# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/mapper/vg1-lv001 5.7G 4.3G 1.1G 80% /
devtmpfs 911M 0 911M 0% /dev
tmpfs 920M 0 920M 0% /dev/shm
tmpfs 920M 41M 880M 5% /run
tmpfs 920M 0 920M 0% /sys/fs/cgroup
/dev/vda1 190M 110M 67M 63% /boot
/dev/mapper/vg1-lv002 12G 203M 11G 2% /var
tmpfs 184M 0 184M 0% /run/user/0
[root@mach0 ~]# singularity --debug shell -w c7
enabling debugging
ending argument loop
Exec'ing: /usr/local/libexec/singularity/cli/shell.exec -w+ '[' -f /usr/local/etc/singularity/init ']'
+ . /usr/local/etc/singularity/init
++ unset module
++ PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/root/bin:/bin:/sbin:/usr/bin:/usr/sbin
++ HISTFILE=/dev/null
++ export PATH HISTFILE
++ '[' -n '' ']'
++ '[' -n '' ']'
++ '[' -n '' ']'
++ '[' -n '' ']'
++ '[' -n '' ']'
++ '[' -n '' ']'
++ '[' -n '' ']'
++ '[' -n '' ']'
+ true
+ case ${1:-} in
+ shift
+ SINGULARITY_WRITABLE=1
+ export SINGULARITY_WRITABLE
+ true
+ case ${1:-} in
+ break
+ '[' -z c7 ']'
+ SINGULARITY_IMAGE=c7
+ export SINGULARITY_IMAGE
+ shift
+ exec /usr/local/libexec/singularity/sexec
VERBOSE [U=0,P=8045] message.c:52:init() : Set messagelevel to: 5
DEBUG [U=0,P=8045] sexec.c:127:main() : Gathering and caching user info.
DEBUG [U=0,P=8045] privilege.c:43:get_user_privs() : Called get_user_privs(struct s_privinfo *uinfo)
DEBUG [U=0,P=8045] privilege.c:54:get_user_privs() : Returning get_user_privs(struct s_privinfo *uinfo) = 0
DEBUG [U=0,P=8045] sexec.c:134:main() : Checking if we can escalate privs properly.
DEBUG [U=0,P=8045] privilege.c:61:escalate_privs() : Called escalate_privs(void)
DEBUG [U=0,P=8045] privilege.c:73:escalate_privs() : Returning escalate_privs(void) = 0
DEBUG [U=0,P=8045] sexec.c:141:main() : Setting privs to calling user
DEBUG [U=0,P=8045] privilege.c:79:drop_privs() : Called drop_privs(struct s_privinfo *uinfo)
DEBUG [U=0,P=8045] privilege.c:87:drop_privs() : Dropping privileges to GID = '0'
DEBUG [U=0,P=8045] privilege.c:93:drop_privs() : Dropping privileges to UID = '0'
DEBUG [U=0,P=8045] privilege.c:103:drop_privs() : Confirming we have correct GID
DEBUG [U=0,P=8045] privilege.c:109:drop_privs() : Confirming we have correct UID
DEBUG [U=0,P=8045] privilege.c:115:drop_privs() : Returning drop_privs(struct s_privinfo *uinfo) = 0
DEBUG [U=0,P=8045] sexec.c:146:main() : Obtaining user's homedir
DEBUG [U=0,P=8045] sexec.c:150:main() : Obtaining file descriptor to current directory
DEBUG [U=0,P=8045] sexec.c:155:main() : Getting current working directory path string
DEBUG [U=0,P=8045] sexec.c:161:main() : Obtaining SINGULARITY_COMMAND from environment
DEBUG [U=0,P=8045] sexec.c:168:main() : Obtaining SINGULARITY_IMAGE from environment
DEBUG [U=0,P=8045] sexec.c:174:main() : Checking container image is a file: c7
DEBUG [U=0,P=8045] sexec.c:180:main() : Building configuration file location
DEBUG [U=0,P=8045] sexec.c:183:main() : Config location: /usr/local/etc/singularity/singularity.conf
DEBUG [U=0,P=8045] sexec.c:185:main() : Checking Singularity configuration is a file: /usr/local/etc/singularity/singularity.conf
DEBUG [U=0,P=8045] sexec.c:191:main() : Checking Singularity configuration file is owned by root
DEBUG [U=0,P=8045] sexec.c:197:main() : Opening Singularity configuration file
DEBUG [U=0,P=8045] sexec.c:210:main() : Checking Singularity configuration for 'sessiondir prefix'
DEBUG [U=0,P=8045] config_parser.c:47:config_get_key_value() : Called config_get_key_value(fp, sessiondir prefix)
DEBUG [U=0,P=8045] config_parser.c:66:config_get_key_value() : Return config_get_key_value(fp, sessiondir prefix) = NULL
DEBUG [U=0,P=8045] file.c:48:file_id() : Called file_id(c7)
VERBOSE [U=0,P=8045] file.c:58:file_id() : Generated file_id: 0.64768.26052
DEBUG [U=0,P=8045] file.c:60:file_id() : Returning file_id(c7) = 0.64768.26052
DEBUG [U=0,P=8045] sexec.c:217:main() : Set sessiondir to: /tmp/.singularity-session-0.64768.26052
DEBUG [U=0,P=8045] sexec.c:221:main() : Set containername to: c7
DEBUG [U=0,P=8045] sexec.c:223:main() : Setting loop_dev_* paths
DEBUG [U=0,P=8045] config_parser.c:47:config_get_key_value() : Called config_get_key_value(fp, container dir)
DEBUG [U=0,P=8045] config_parser.c:58:config_get_key_value() : Return config_get_key_value(fp, container dir) = /var/singularity/mnt
DEBUG [U=0,P=8045] sexec.c:232:main() : Set image mount path to: /var/singularity/mnt
LOG [U=0,P=8045] sexec.c:234:main() : Command=shell, Container=c7, CWD=/root, Arg1=(null)
DEBUG [U=0,P=8045] sexec.c:247:main() : Set prompt to: Singularity.c7>
DEBUG [U=0,P=8045] sexec.c:249:main() : Checking if we are opening image as read/write
DEBUG [U=0,P=8045] sexec.c:264:main() : Opening image as read/write only: c7
DEBUG [U=0,P=8045] sexec.c:271:main() : Setting exclusive lock on file descriptor: 6
ERROR [U=0,P=8045] sexec.c:273:main() : Image is locked by another process
[root@mach0 ~]# lslocks
COMMAND PID TYPE SIZE MODE M START END PATH
crond 601 FLOCK 4B WRITE 0 0 0 /run/crond.pid
master 826 FLOCK 33B WRITE 0 0 0 /var/spool/postfix/pid/master.pid
master 826 FLOCK 33B WRITE 0 0 0 /var/lib/postfix/master.lock
lvmetad 478 POSIX 4B WRITE 0 0 0 /run/lvmetad.pid
slurmctld 940 POSIX 4B WRITE 0 0 0 /run/slurmctld.pid
slurmd 966 POSIX 4B WRITE 0 0 0 /run/slurmd.pid
(unknown) 2299 FLOCK 0B READ 0 0 0 /