singularity 2.4 new problem: ERROR : No valid /bin/sh in container

1,325 views
Skip to first unread message

Igor Yakushin

unread,
Oct 24, 2017, 2:52:15 PM10/24/17
to singularity
Hello All,

The containers that I built with the previous version of singularity 2.3 does not work anymore under 2.4:

singularity shell /software/src/singularity_images/lsst_13.0.img  
ERROR  : No valid /bin/sh in container
ABORT  : Retval = 255    

The new version is not backward compatible with the old one?

Thank you,
Igor

Gregory M. Kurtzer

unread,
Oct 24, 2017, 2:54:50 PM10/24/17
to singu...@lbl.gov
This problem has come up a couple of times for people and usually (but not always) stems from a compilation not being done cleanly. If you installed from source, did you change any configure options from one install/build to another? If you did, you MUST run a `make clean` inbetween.

If this is not the case, can you please forward the debugging output so we can look at what is going wrong.

Thanks!

--
You received this message because you are subscribed to the Google Groups "singularity" group.
To unsubscribe from this group and stop receiving emails from it, send an email to singularity+unsubscribe@lbl.gov.



--
Gregory M. Kurtzer
CEO, SingularityWare, LLC.
Senior Architect, RStor

Igor Yakushin

unread,
Oct 24, 2017, 3:06:47 PM10/24/17
to singu...@lbl.gov
Hi Greg,


This problem has come up a couple of times for people and usually (but not always) stems from a compilation not being done cleanly. If you installed from source, did you change any configure options from one install/build to another?

Not as far as I remember

 
If you did, you MUST run a `make clean` inbetween.

I can try rebuilding and see if it helps.
 

If this is not the case, can you please forward the debugging output so we can look at what is going wrong.

You mean -v and -x options?

==========
$ singularity -v shell /software/src/singularity_images/lsst_13.0.img  
Increasing verbosity level (2)
Singularity version: 2.4-dist
Exec'ing: /software/singularity-2.4-el7-x86_64/libexec/singularity/cli/shell.exec
Evaluating args: '/software/src/singularity_images/lsst_13.0.img'
VERBOSE: Set messagelevel to: 2
VERBOSE: Initialize configuration file: /software/singularity-2.4-el7-x86_64/etc/singularity/singularity.conf
VERBOSE: Initializing Singularity Registry
VERBOSE: Invoking the user namespace
VERBOSE: Not virtualizing USER namespace: running as SUID
VERBOSE: File is not a valid SquashFS image
VERBOSE: Using session directory: /software/singularity-2.4-el7-x86_64/var/singularity/mnt/session
VERBOSE: Found available loop device: /dev/loop0
VERBOSE: Using loop device: /dev/loop0
VERBOSE: Mounting '/dev/loop0' to: '/software/singularity-2.4-el7-x86_64/var/singularity/mnt/container'
ERROR  : No valid /bin/sh in container
ABORT  : Retval = 255                          
==========
$ singularity -x shell /software/src/singularity_images/lsst_13.0.img   
+ '[' -f /home/ivy2/.singularity-init ']'
+ '[' -f /software/singularity-2.4-el7-x86_64/libexec/singularity/cli/action_argparser.sh ']'
+ . /software/singularity-2.4-el7-x86_64/libexec/singularity/cli/action_argparser.sh
++ message 2 'Evaluating args: '\''/software/src/singularity_images/lsst_13.0.img'\''\n'
++ LEVEL=2
++ MESSAGE='Evaluating args: '\''/software/src/singularity_images/lsst_13.0.img'\''\n'
++ '[' -z 'Evaluating args: '\''/software/src/singularity_images/lsst_13.0.img'\''\n' ']'
++ shift
++ shift
++ case "$LEVEL" in
++ '[' 2 -le 1 ']'
++ return 0
++ true
++ case ${1:-} in
++ break
+ '[' -f /software/singularity-2.4-el7-x86_64/libexec/singularity/cli/shell.info ']'
+ . /software/singularity-2.4-el7-x86_64/libexec/singularity/cli/shell.info
++ NAME=shell
++ SECTION=action
++ SUMMARY='Run a Bourne shell within container'
++ USAGE='singularity [...] shell [shell options...] <container path>'
+ '[' -z '' ']'
+ SINGULARITY_IMAGE=/software/src/singularity_images/lsst_13.0.img
+ export SINGULARITY_IMAGE
+ shift
+ '[' -z /software/src/singularity_images/lsst_13.0.img ']'
+ '[' -n '' ']'
+ '[' -f /software/singularity-2.4-el7-x86_64/etc/singularity/init ']'
+ . /software/singularity-2.4-el7-x86_64/etc/singularity/init
++ unset module
++ unset ml
++ unset BASH_ENV
++ '[' -z ']'
++ SINGULARITYENV_PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin
++ SINGULARITYENV_HISTFILE=
++ export SINGULARITYENV_PATH SINGULARITYENV_HISTFILE
+ '[' -x /software/singularity-2.4-el7-x86_64/libexec/singularity/image-handler.sh ']'
+ . /software/singularity-2.4-el7-x86_64/libexec/singularity/image-handler.sh
++ '[' -z /software/src/singularity_images/lsst_13.0.img ']'
++ '[' -z shell ']'
++ case "$SINGULARITY_IMAGE" in
+ '[' -z '' -a -u /software/singularity-2.4-el7-x86_64/libexec/singularity/bin/action-suid ']'
+ exec /software/singularity-2.4-el7-x86_64/libexec/singularity/bin/action-suid
ERROR  : No valid /bin/sh in container
ABORT  : Retval = 255   
=============
Notice: I have too different clusters sharing the same $HOME but different versions of OS and other software. I see that something is dumped into $HOME/.singularity. Might it create problems? For example $HOME/.local creates constant problems for python when people are using different versions of python or run on different clusters since python dumps there various binaries that might be incompatible. Is there environmental variable to put into module to set different $HOME/.singularity (and other?) directory for different clusters?

Thank you,
Igor



                                                   
 

Thanks!

On Tue, Oct 24, 2017 at 11:52 AM, Igor Yakushin <iv...@uchicago.edu> wrote:
Hello All,

The containers that I built with the previous version of singularity 2.3 does not work anymore under 2.4:

singularity shell /software/src/singularity_images/lsst_13.0.img  
ERROR  : No valid /bin/sh in container
ABORT  : Retval = 255    

The new version is not backward compatible with the old one?

Thank you,
Igor

--
You received this message because you are subscribed to the Google Groups "singularity" group.
To unsubscribe from this group and stop receiving emails from it, send an email to singularity...@lbl.gov.



--
Gregory M. Kurtzer
CEO, SingularityWare, LLC.
Senior Architect, RStor

--
You received this message because you are subscribed to the Google Groups "singularity" group.
To unsubscribe from this group and stop receiving emails from it, send an email to singularity+unsubscribe@lbl.gov.



--
Igor Yakushin, Ph.D.
Computational Scientist
Kavli Institute for Cosmological Physics, ERC #413
Research Computing Center, room #2
The University of Chicago

Gregory M. Kurtzer

unread,
Oct 24, 2017, 3:07:45 PM10/24/17
to singu...@lbl.gov
Hi Igor,

Can you try with the --debug option to Singularity, and forward as an attachment?

Thanks!

Hi Greg,

To unsubscribe from this group and stop receiving emails from it, send an email to singularity...@lbl.gov.



--
Igor Yakushin, Ph.D.
Computational Scientist
Kavli Institute for Cosmological Physics, ERC #413
Research Computing Center, room #2
The University of Chicago

--
You received this message because you are subscribed to the Google Groups "singularity" group.
To unsubscribe from this group and stop receiving emails from it, send an email to singularity+unsubscribe@lbl.gov.



--

Igor Yakushin

unread,
Oct 24, 2017, 3:12:05 PM10/24/17
to singu...@lbl.gov
Hi Greg,



Can you try with the --debug option to Singularity, and forward as an attachment?

Attached.
 
Thank you,
Igor
singularity.debug

Gregory M. Kurtzer

unread,
Oct 24, 2017, 3:14:53 PM10/24/17
to singu...@lbl.gov
Hi Igor,

Yes, it does seem as though `make clean` was not ran from an old/previous build. Some parts of the runtime are referencing: '/software/singularity-2.4-el7-x86_64' and other parts are referencing '/software/singularity-2.3.1-el7-x86_64'.

The fix is simply to run: `make clean && make && sudo make install` from the build directory.

Hope that helps!

--
You received this message because you are subscribed to the Google Groups "singularity" group.
To unsubscribe from this group and stop receiving emails from it, send an email to singularity+unsubscribe@lbl.gov.

Igor Yakushin

unread,
Oct 24, 2017, 3:32:35 PM10/24/17
to singu...@lbl.gov
Thank you, Greg. That fixed the problem.

To unsubscribe from this group and stop receiving emails from it, send an email to singularity...@lbl.gov.



--
Gregory M. Kurtzer
CEO, SingularityWare, LLC.
Senior Architect, RStor

--
You received this message because you are subscribed to the Google Groups "singularity" group.
To unsubscribe from this group and stop receiving emails from it, send an email to singularity+unsubscribe@lbl.gov.



--
Reply all
Reply to author
Forward
0 new messages