apptainer / singularity

Singularity has been renamed to Apptainer as part of us moving the project to the Linux Foundation. This repo has been persisted as a snapshot right before the changes.
https://github.com/apptainer/apptainer
Other
2.53k stars 424 forks source link

error when decrypt #6338

Closed heibaidaolx123 closed 2 years ago

heibaidaolx123 commented 2 years ago

Version of Singularity:

What version of Singularity are you using? Run:

$ singularity --version
singularity version 3.8.3+222-g2f16701e3

Expected behavior

root@xxx:~# singularity  shell --pem-path=rsa_pri.pem  test_enc.sif
Singularity>

Actual behavior

root@xxx:~# singularity  shell --pem-path=rsa_pri.pem  test_enc.sif
ERROR:   could not cleanup crypt: invalid argument
FATAL:   container creation failed: mount /proc/self/fd/3->/usr/local/singularity/var/singularity/mnt/session/rootfs error: while mounting image /proc/self/fd/3: kernel reported a bad superblock for squashfs image partition, possible causes are that your kernel doesn't support the compression algorithm or the image is corrupted

Steps to reproduce this behavior

The definition file:

BootStrap: library
From: ubuntu:16.04

%setup
    # copy a large directory (~70G) to container
    cp -r /xxx/xxx ${SINGULARITY_ROOTFS}/

%post
    apt-get -y update
    apt-get -y install fortune cowsay lolcat

%environment
    export LC_ALL=C
    export PATH=/usr/games:$PATH

%runscript
    fortune | cowsay | lolcat

%labels
    Author GodloveD

Note that I copy a directory with ~70G data to the container. Everything will be fine if I remove %setup in .def.

The build command:

 export SINGULARITY_TMPDIR=/xxxx/xxxx/tmp/ && \
   singularity build --pem-path=rsa_pub.pem test_enc.sif test_enc.def

What OS/distro are you running

$ cat /etc/os-release
PRETTY_NAME="Debian GNU/Linux 10 (buster)"
NAME="Debian GNU/Linux"
VERSION_ID="10"
VERSION="10 (buster)"
VERSION_CODENAME=buster
ID=debian
HOME_URL="https://www.debian.org/"
SUPPORT_URL="https://www.debian.org/support"
BUG_REPORT_URL="https://bugs.debian.org/"

How did you install Singularity

source

ikaneshiro commented 2 years ago

Hi @heibaidaolx123, can you include the output of build and run steps with debug output (singularity -d). Also check output from dmesg during the build process as it might help shed light on the issue.

heibaidaolx123 commented 2 years ago

@ikaneshiro

root@dev0:/srv/data0/lx/res# export SINGULARITY_TMPDIR=/srv/data0/lx/tmp/ && singularity -d build --pem-path=rsa_pub.pem lolcow_enc.sif lolcow.def

DEBUG   [U=0,P=83858]      persistentPreRun()            Singularity version: 3.8.3+222-g2f16701e3
DEBUG   [U=0,P=83858]      persistentPreRun()            Parsing configuration file /usr/local/singularity/etc/singularity/singularity.conf
DEBUG   [U=0,P=83858]      handleConfDir()               /root/.singularity already exists. Not creating.
DEBUG   [U=0,P=83858]      setValue()                    Updated flag 'tmpdir' value to: /srv/data0/lx/tmp/
DEBUG   [U=0,P=83858]      Init()                        Image format detection
DEBUG   [U=0,P=83858]      Init()                        Check for sandbox image format
DEBUG   [U=0,P=83858]      Init()                        sandbox format initializer returned: not a directory image
DEBUG   [U=0,P=83858]      Init()                        Check for sif image format
DEBUG   [U=0,P=83858]      Init()                        sif image format detected
Build target 'lolcow_enc.sif' already exists and will be deleted during the build process. Do you want to continue? [N/y] y
VERBOSE [U=0,P=83858]      getEncryptionMaterial()       Using pem path flag for encrypted container
DEBUG   [U=0,P=83858]      getCacheParentDir()           environment variable SINGULARITY_CACHEDIR not set, using default image cache
DEBUG   [U=0,P=83858]      Init()                        Image format detection
DEBUG   [U=0,P=83858]      Init()                        Check for sandbox image format
DEBUG   [U=0,P=83858]      Init()                        sandbox format initializer returned: not a directory image
DEBUG   [U=0,P=83858]      Init()                        Check for sif image format
DEBUG   [U=0,P=83858]      Init()                        sif format initializer returned: can't read first 2048 bytes: <nil>
DEBUG   [U=0,P=83858]      Init()                        Check for squashfs image format
DEBUG   [U=0,P=83858]      Init()                        squashfs format initializer returned: can't read first 2048 bytes: <nil>
DEBUG   [U=0,P=83858]      Init()                        Check for ext3 image format
DEBUG   [U=0,P=83858]      Init()                        ext3 format initializer returned: can't read first 2048 bytes: <nil>
DEBUG   [U=0,P=83858]      newBundle()                   Created temporary directory "/srv/data0/lx/tmp/bundle-temp-3138456456" for the bundle
DEBUG   [U=0,P=83858]      newBundle()                   Created directory "/srv/data0/lx/tmp/build-temp-3229122302/rootfs" for the bundle
DEBUG   [U=0,P=83858]      findFromConfigOrPath()        Using "mksquashfs" at "/usr/bin/mksquashfs" (from singularity.conf)
DEBUG   [U=0,P=83858]      ensureGzipComp()              Ensuring gzip compression for mksquashfs
DEBUG   [U=0,P=83858]      findFromConfigOrPath()        Using "mksquashfs" at "/usr/bin/mksquashfs" (from singularity.conf)
DEBUG   [U=0,P=83858]      ensureGzipComp()              Gzip compression by default ensured
INFO    [U=0,P=83858]      Full()                        Starting build...
DEBUG   [U=0,P=83858]      Get()                         Getting container from Library
DEBUG   [U=0,P=83858]      Get()                         LibraryURL: https://library.sylabs.io
DEBUG   [U=0,P=83858]      Get()                         LibraryRef: library:ubuntu:16.04
DEBUG   [U=0,P=83858]      apiGet()                      apiGet calling v1/images/ubuntu:16.04?arch=amd64
INFO    [U=0,P=83858]      pull()                        Using cached image
DEBUG   [U=0,P=83858]      Init()                        Image format detection
DEBUG   [U=0,P=83858]      Init()                        Check for sandbox image format
DEBUG   [U=0,P=83858]      Init()                        sandbox format initializer returned: not a directory image
DEBUG   [U=0,P=83858]      Init()                        Check for sif image format
DEBUG   [U=0,P=83858]      Init()                        sif image format detected
DEBUG   [U=0,P=83858]      GetLocalPacker()              Packing from SIF
INFO    [U=0,P=83858]      verifySIF()                   Verifying bootstrap image /root/.singularity/cache/library/sha256.21678b2846063434e2009dee535d3e28ded35774ca72722e1d62b37077de30da
WARNING [U=0,P=83858]      GetLocalPacker()              integrity: signature not found for object group 1
WARNING [U=0,P=83858]      GetLocalPacker()              Bootstrap image could not be verified, but build will continue.
DEBUG   [U=0,P=83858]      findFromConfigOrPath()        Using "unsquashfs" at "/usr/bin/unsquashfs" (from singularity.conf)
DEBUG   [U=0,P=83858]      extract()                     Trying unsquashfs options: []
DEBUG   [U=0,P=83858]      unsquashfsSandboxCmd()        Calling wrapped unsquashfs: singularity [-q exec --no-home --no-nv --no-rocm -C --no-init --writable -B /srv/data0/lx/tmp/build-temp-3229122302:/image -B /usr/bin/unsquashfs:/usr/bin/unsquashfs:ro -B /lib/x86_64-linux-gnu/libpthread.so.0:/lib/x86_64-linux-gnu/libpthread.so.0:ro -B /lib/x86_64-linux-gnu/libm.so.6:/lib/x86_64-linux-gnu/libm.so.6:ro -B /lib/x86_64-linux-gnu/libz.so.1:/lib/x86_64-linux-gnu/libz.so.1:ro -B /lib/x86_64-linux-gnu/liblzma.so.5:/lib/x86_64-linux-gnu/liblzma.so.5:ro -B /lib/x86_64-linux-gnu/liblzo2.so.2:/lib/x86_64-linux-gnu/liblzo2.so.2:ro -B /lib/x86_64-linux-gnu/liblz4.so.1:/lib/x86_64-linux-gnu/liblz4.so.1:ro -B /lib/x86_64-linux-gnu/libzstd.so.1:/lib/x86_64-linux-gnu/libzstd.so.1:ro -B /lib/x86_64-linux-gnu/libc.so.6:/lib/x86_64-linux-gnu/libc.so.6:ro -B /lib64/ld-linux-x86-64.so.2:/lib64/ld-linux-x86-64.so.2:ro /srv/data0/lx/tmp/build-temp-3229122302/tmp-rootfs-3480260864 /usr/bin/unsquashfs -f -d /image/rootfs /image/archive-2684381009]
DEBUG   [U=0,P=83858]      unpackSIF()                   No oci-config.json section found
INFO    [U=0,P=83858]      runSectionScript()            Running setup scriptlet
+ cp -r /srv/data0/lx/xxx /srv/data0/lx/tmp/build-temp-3229122302/rootfs/
INFO    [U=0,P=83858]      runPostScript()               Running post scriptlet
+ apt-get -y update
Get:1 http://archive.ubuntu.com/ubuntu xenial InRelease [247 kB]
Get:2 http://security.ubuntu.com/ubuntu xenial-security InRelease [109 kB]
Get:3 http://archive.ubuntu.com/ubuntu xenial-updates InRelease [109 kB]
Get:4 http://archive.ubuntu.com/ubuntu xenial-backports InRelease [107 kB]
Get:5 http://security.ubuntu.com/ubuntu xenial-security/universe Sources [256 kB]
Get:6 http://archive.ubuntu.com/ubuntu xenial/universe Sources [9802 kB]
Get:7 http://security.ubuntu.com/ubuntu xenial-security/main amd64 Packages [2051 kB]
Get:8 http://security.ubuntu.com/ubuntu xenial-security/restricted amd64 Packages [15.9 kB]
Get:9 http://security.ubuntu.com/ubuntu xenial-security/universe amd64 Packages [984 kB]
Get:10 http://security.ubuntu.com/ubuntu xenial-security/multiverse amd64 Packages [8820 B]
Get:11 http://archive.ubuntu.com/ubuntu xenial/main amd64 Packages [1558 kB]
Get:12 http://archive.ubuntu.com/ubuntu xenial/restricted amd64 Packages [14.1 kB]
Get:13 http://archive.ubuntu.com/ubuntu xenial/universe amd64 Packages [9827 kB]
Get:14 http://archive.ubuntu.com/ubuntu xenial/multiverse amd64 Packages [176 kB]
Get:15 http://archive.ubuntu.com/ubuntu xenial-updates/universe Sources [548 kB]
Get:16 http://archive.ubuntu.com/ubuntu xenial-updates/main amd64 Packages [2560 kB]
Get:17 http://archive.ubuntu.com/ubuntu xenial-updates/restricted amd64 Packages [16.4 kB]
Get:18 http://archive.ubuntu.com/ubuntu xenial-updates/universe amd64 Packages [1544 kB]
Get:19 http://archive.ubuntu.com/ubuntu xenial-updates/multiverse amd64 Packages [26.2 kB]
Get:20 http://archive.ubuntu.com/ubuntu xenial-backports/main amd64 Packages [10.9 kB]
Get:21 http://archive.ubuntu.com/ubuntu xenial-backports/universe amd64 Packages [12.7 kB]
Fetched 30.0 MB in 23s (1292 kB/s)
Reading package lists... Done
+ apt-get -y install fortune cowsay lolcat
Reading package lists... Done
Building dependency tree
Reading state information... Done
Note, selecting 'fortune-mod' instead of 'fortune'
The following additional packages will be installed:
  ca-certificates cowsay-off fonts-lato fortunes-min ifupdown iproute2 isc-dhcp-client
  isc-dhcp-common javascript-common libatm1 libdns-export162 libffi6 libgdbm3 libgmp10
  libisc-export160 libjs-jquery libmnl0 libperl5.22 librecode0 libruby2.3 libssl1.0.0
  libtext-charwidth-perl libxtables11 libyaml-0-2 netbase openssl perl perl-base
  perl-modules-5.22 rake rename ruby ruby-did-you-mean ruby-minitest ruby-net-telnet
  ruby-paint ruby-power-assert ruby-test-unit ruby-trollop ruby2.3 rubygems-integration
  unzip zip
Suggested packages:
  filters fortunes x11-utils bsdmainutils ppp rdnssd iproute2-doc resolvconf
  avahi-autoipd isc-dhcp-client-ddns apparmor apache2 | lighttpd | httpd perl-doc
  libterm-readline-gnu-perl | libterm-readline-perl-perl make ri ruby-dev bundler
The following NEW packages will be installed:
  ca-certificates cowsay cowsay-off fonts-lato fortune-mod fortunes-min ifupdown
  iproute2 isc-dhcp-client isc-dhcp-common javascript-common libatm1 libdns-export162
  libffi6 libgdbm3 libgmp10 libisc-export160 libjs-jquery libmnl0 libperl5.22
  librecode0 libruby2.3 libssl1.0.0 libtext-charwidth-perl libxtables11 libyaml-0-2
  lolcat netbase openssl perl perl-modules-5.22 rake rename ruby ruby-did-you-mean
  ruby-minitest ruby-net-telnet ruby-paint ruby-power-assert ruby-test-unit
  ruby-trollop ruby2.3 rubygems-integration unzip zip
The following packages will be upgraded:
  perl-base
1 upgraded, 45 newly installed, 0 to remove and 44 not upgraded.
Need to get 18.4 MB of archives.
After this operation, 81.5 MB of additional disk space will be used.
Get:1 http://archive.ubuntu.com/ubuntu xenial-updates/main amd64 perl-base amd64 5.22.1-9ubuntu0.9 [1287 kB]
Get:2 http://archive.ubuntu.com/ubuntu xenial/main amd64 libatm1 amd64 1:2.5.1-1.5 [24.2 kB]
Get:3 http://archive.ubuntu.com/ubuntu xenial/main amd64 libmnl0 amd64 1.0.3-5 [12.0 kB]
Get:4 http://archive.ubuntu.com/ubuntu xenial/main amd64 libgdbm3 amd64 1.8.3-13.1 [16.9 kB]
Get:5 http://archive.ubuntu.com/ubuntu xenial/main amd64 fonts-lato all 2.0-1 [2693 kB]
Get:6 http://archive.ubuntu.com/ubuntu xenial/main amd64 libyaml-0-2 amd64 0.1.6-3 [47.6 kB]
Get:7 http://archive.ubuntu.com/ubuntu xenial-updates/main amd64 perl-modules-5.22 all 5.22.1-9ubuntu0.9 [2634 kB]
Get:8 http://archive.ubuntu.com/ubuntu xenial-updates/main amd64 libperl5.22 amd64 5.22.1-9ubuntu0.9 [3360 kB]
Get:9 http://archive.ubuntu.com/ubuntu xenial-updates/main amd64 perl amd64 5.22.1-9ubuntu0.9 [237 kB]
Get:10 http://archive.ubuntu.com/ubuntu xenial-updates/main amd64 iproute2 amd64 4.3.0-1ubuntu3.16.04.5 [523 kB]
Get:11 http://archive.ubuntu.com/ubuntu xenial-updates/main amd64 ifupdown amd64 0.8.10ubuntu1.4 [54.9 kB]
Get:12 http://archive.ubuntu.com/ubuntu xenial-updates/main amd64 libisc-export160 amd64 1:9.10.3.dfsg.P4-8ubuntu1.19 [153 kB]
Get:13 http://archive.ubuntu.com/ubuntu xenial-updates/main amd64 libdns-export162 amd64 1:9.10.3.dfsg.P4-8ubuntu1.19 [665 kB]
Get:14 http://archive.ubuntu.com/ubuntu xenial-updates/main amd64 isc-dhcp-client amd64 4.3.3-5ubuntu12.10 [224 kB]
Get:15 http://archive.ubuntu.com/ubuntu xenial-updates/main amd64 isc-dhcp-common amd64 4.3.3-5ubuntu12.10 [105 kB]
Get:16 http://archive.ubuntu.com/ubuntu xenial/main amd64 libffi6 amd64 3.2.1-4 [17.8 kB]
Get:17 http://archive.ubuntu.com/ubuntu xenial/main amd64 libgmp10 amd64 2:6.1.0+dfsg-2 [240 kB]
Get:18 http://archive.ubuntu.com/ubuntu xenial-updates/main amd64 libssl1.0.0 amd64 1.0.2g-1ubuntu4.20 [1083 kB]
Get:19 http://archive.ubuntu.com/ubuntu xenial/main amd64 libtext-charwidth-perl amd64 0.04-7build5 [9248 B]
Get:20 http://archive.ubuntu.com/ubuntu xenial/main amd64 libxtables11 amd64 1.6.0-2ubuntu3 [27.2 kB]
Get:21 http://archive.ubuntu.com/ubuntu xenial/main amd64 netbase all 5.3 [12.9 kB]
Get:22 http://archive.ubuntu.com/ubuntu xenial-updates/main amd64 openssl amd64 1.0.2g-1ubuntu4.20 [492 kB]
Get:23 http://archive.ubuntu.com/ubuntu xenial-updates/main amd64 ca-certificates all 20210119~16.04.1 [148 kB]
Get:24 http://archive.ubuntu.com/ubuntu xenial/universe amd64 cowsay all 3.03+dfsg1-15 [18.0 kB]
Get:25 http://archive.ubuntu.com/ubuntu xenial/universe amd64 cowsay-off all 3.03+dfsg1-15 [3640 B]
Get:26 http://archive.ubuntu.com/ubuntu xenial/main amd64 librecode0 amd64 3.6-22 [523 kB]
Get:27 http://archive.ubuntu.com/ubuntu xenial/universe amd64 fortune-mod amd64 1:1.99.1-7 [39.5 kB]
Get:28 http://archive.ubuntu.com/ubuntu xenial/universe amd64 fortunes-min all 1:1.99.1-7 [61.8 kB]
Get:29 http://archive.ubuntu.com/ubuntu xenial/main amd64 javascript-common all 11 [6066 B]
Get:30 http://archive.ubuntu.com/ubuntu xenial/main amd64 libjs-jquery all 1.11.3+dfsg-4 [161 kB]
Get:31 http://archive.ubuntu.com/ubuntu xenial/main amd64 rubygems-integration all 1.10 [4966 B]
Get:32 http://archive.ubuntu.com/ubuntu xenial/main amd64 ruby-did-you-mean all 1.0.0-2 [8390 B]
Get:33 http://archive.ubuntu.com/ubuntu xenial/main amd64 ruby-minitest all 5.8.4-2 [36.6 kB]
Get:34 http://archive.ubuntu.com/ubuntu xenial/main amd64 ruby-net-telnet all 0.1.1-2 [12.6 kB]
Get:35 http://archive.ubuntu.com/ubuntu xenial/main amd64 ruby-power-assert all 0.2.7-1 [7668 B]
Get:36 http://archive.ubuntu.com/ubuntu xenial/main amd64 ruby-test-unit all 3.1.7-2 [60.3 kB]
Get:37 http://archive.ubuntu.com/ubuntu xenial-updates/main amd64 libruby2.3 amd64 2.3.1-2~ubuntu16.04.16 [2969 kB]
Get:38 http://archive.ubuntu.com/ubuntu xenial-updates/main amd64 ruby2.3 amd64 2.3.1-2~ubuntu16.04.16 [41.0 kB]
Get:39 http://archive.ubuntu.com/ubuntu xenial/main amd64 ruby all 1:2.3.0+1 [5530 B]
Get:40 http://archive.ubuntu.com/ubuntu xenial-updates/main amd64 rake all 10.5.0-2ubuntu0.1 [48.1 kB]
Get:41 http://archive.ubuntu.com/ubuntu xenial/main amd64 rename all 0.20-4 [12.0 kB]
Get:42 http://archive.ubuntu.com/ubuntu xenial-updates/main amd64 unzip amd64 6.0-20ubuntu1.1 [162 kB]
Get:43 http://archive.ubuntu.com/ubuntu xenial/main amd64 zip amd64 3.0-11 [158 kB]
Get:44 http://archive.ubuntu.com/ubuntu xenial/universe amd64 ruby-trollop all 2.0-2 [14.8 kB]
Get:45 http://archive.ubuntu.com/ubuntu xenial/universe amd64 ruby-paint all 0.8.6-1build1 [15.3 kB]
Get:46 http://archive.ubuntu.com/ubuntu xenial/universe amd64 lolcat all 42.0.99-1 [5514 B]
Fetched 18.4 MB in 3s (5936 kB/s)
debconf: delaying package configuration, since apt-utils is not installed
(Reading database ... 4768 files and directories currently installed.)
Preparing to unpack .../perl-base_5.22.1-9ubuntu0.9_amd64.deb ...
Unpacking perl-base (5.22.1-9ubuntu0.9) over (5.22.1-9ubuntu0.5) ...
Setting up perl-base (5.22.1-9ubuntu0.9) ...
Selecting previously unselected package libatm1:amd64.
(Reading database ... 4768 files and directories currently installed.)
Preparing to unpack .../libatm1_1%3a2.5.1-1.5_amd64.deb ...
Unpacking libatm1:amd64 (1:2.5.1-1.5) ...
Selecting previously unselected package libmnl0:amd64.
Preparing to unpack .../libmnl0_1.0.3-5_amd64.deb ...
Unpacking libmnl0:amd64 (1.0.3-5) ...
Selecting previously unselected package libgdbm3:amd64.
Preparing to unpack .../libgdbm3_1.8.3-13.1_amd64.deb ...
Unpacking libgdbm3:amd64 (1.8.3-13.1) ...
Selecting previously unselected package fonts-lato.
Preparing to unpack .../fonts-lato_2.0-1_all.deb ...
Unpacking fonts-lato (2.0-1) ...
Selecting previously unselected package libyaml-0-2:amd64.
Preparing to unpack .../libyaml-0-2_0.1.6-3_amd64.deb ...
Unpacking libyaml-0-2:amd64 (0.1.6-3) ...
Selecting previously unselected package perl-modules-5.22.
Preparing to unpack .../perl-modules-5.22_5.22.1-9ubuntu0.9_all.deb ...
Unpacking perl-modules-5.22 (5.22.1-9ubuntu0.9) ...
Selecting previously unselected package libperl5.22:amd64.
Preparing to unpack .../libperl5.22_5.22.1-9ubuntu0.9_amd64.deb ...
Unpacking libperl5.22:amd64 (5.22.1-9ubuntu0.9) ...
Selecting previously unselected package perl.
Preparing to unpack .../perl_5.22.1-9ubuntu0.9_amd64.deb ...
Unpacking perl (5.22.1-9ubuntu0.9) ...
Selecting previously unselected package iproute2.
Preparing to unpack .../iproute2_4.3.0-1ubuntu3.16.04.5_amd64.deb ...
Unpacking iproute2 (4.3.0-1ubuntu3.16.04.5) ...
Selecting previously unselected package ifupdown.
Preparing to unpack .../ifupdown_0.8.10ubuntu1.4_amd64.deb ...
Unpacking ifupdown (0.8.10ubuntu1.4) ...
Selecting previously unselected package libisc-export160.
Preparing to unpack .../libisc-export160_1%3a9.10.3.dfsg.P4-8ubuntu1.19_amd64.deb ...
Unpacking libisc-export160 (1:9.10.3.dfsg.P4-8ubuntu1.19) ...
Selecting previously unselected package libdns-export162.
Preparing to unpack .../libdns-export162_1%3a9.10.3.dfsg.P4-8ubuntu1.19_amd64.deb ...
Unpacking libdns-export162 (1:9.10.3.dfsg.P4-8ubuntu1.19) ...
Selecting previously unselected package isc-dhcp-client.
Preparing to unpack .../isc-dhcp-client_4.3.3-5ubuntu12.10_amd64.deb ...
Unpacking isc-dhcp-client (4.3.3-5ubuntu12.10) ...
Selecting previously unselected package isc-dhcp-common.
Preparing to unpack .../isc-dhcp-common_4.3.3-5ubuntu12.10_amd64.deb ...
Unpacking isc-dhcp-common (4.3.3-5ubuntu12.10) ...
Selecting previously unselected package libffi6:amd64.
Preparing to unpack .../libffi6_3.2.1-4_amd64.deb ...
Unpacking libffi6:amd64 (3.2.1-4) ...
Selecting previously unselected package libgmp10:amd64.
Preparing to unpack .../libgmp10_2%3a6.1.0+dfsg-2_amd64.deb ...
Unpacking libgmp10:amd64 (2:6.1.0+dfsg-2) ...
Selecting previously unselected package libssl1.0.0:amd64.
Preparing to unpack .../libssl1.0.0_1.0.2g-1ubuntu4.20_amd64.deb ...
Unpacking libssl1.0.0:amd64 (1.0.2g-1ubuntu4.20) ...
Selecting previously unselected package libtext-charwidth-perl.
Preparing to unpack .../libtext-charwidth-perl_0.04-7build5_amd64.deb ...
Unpacking libtext-charwidth-perl (0.04-7build5) ...
Selecting previously unselected package libxtables11:amd64.
Preparing to unpack .../libxtables11_1.6.0-2ubuntu3_amd64.deb ...
Unpacking libxtables11:amd64 (1.6.0-2ubuntu3) ...
Selecting previously unselected package netbase.
Preparing to unpack .../archives/netbase_5.3_all.deb ...
Unpacking netbase (5.3) ...
Selecting previously unselected package openssl.
Preparing to unpack .../openssl_1.0.2g-1ubuntu4.20_amd64.deb ...
Unpacking openssl (1.0.2g-1ubuntu4.20) ...
Selecting previously unselected package ca-certificates.
Preparing to unpack .../ca-certificates_20210119~16.04.1_all.deb ...
Unpacking ca-certificates (20210119~16.04.1) ...
Selecting previously unselected package cowsay.
Preparing to unpack .../cowsay_3.03+dfsg1-15_all.deb ...
Unpacking cowsay (3.03+dfsg1-15) ...
Selecting previously unselected package cowsay-off.
Preparing to unpack .../cowsay-off_3.03+dfsg1-15_all.deb ...
Unpacking cowsay-off (3.03+dfsg1-15) ...
Selecting previously unselected package librecode0:amd64.
Preparing to unpack .../librecode0_3.6-22_amd64.deb ...
Unpacking librecode0:amd64 (3.6-22) ...
Selecting previously unselected package fortune-mod.
Preparing to unpack .../fortune-mod_1%3a1.99.1-7_amd64.deb ...
Unpacking fortune-mod (1:1.99.1-7) ...
Selecting previously unselected package fortunes-min.
Preparing to unpack .../fortunes-min_1%3a1.99.1-7_all.deb ...
Unpacking fortunes-min (1:1.99.1-7) ...
Selecting previously unselected package javascript-common.
Preparing to unpack .../javascript-common_11_all.deb ...
Unpacking javascript-common (11) ...
Selecting previously unselected package libjs-jquery.
Preparing to unpack .../libjs-jquery_1.11.3+dfsg-4_all.deb ...
Unpacking libjs-jquery (1.11.3+dfsg-4) ...
Selecting previously unselected package rubygems-integration.
Preparing to unpack .../rubygems-integration_1.10_all.deb ...
Unpacking rubygems-integration (1.10) ...
Selecting previously unselected package ruby-did-you-mean.
Preparing to unpack .../ruby-did-you-mean_1.0.0-2_all.deb ...
Unpacking ruby-did-you-mean (1.0.0-2) ...
Selecting previously unselected package ruby-minitest.
Preparing to unpack .../ruby-minitest_5.8.4-2_all.deb ...
Unpacking ruby-minitest (5.8.4-2) ...
Selecting previously unselected package ruby-net-telnet.
Preparing to unpack .../ruby-net-telnet_0.1.1-2_all.deb ...
Unpacking ruby-net-telnet (0.1.1-2) ...
Selecting previously unselected package ruby-power-assert.
Preparing to unpack .../ruby-power-assert_0.2.7-1_all.deb ...
Unpacking ruby-power-assert (0.2.7-1) ...
Selecting previously unselected package ruby-test-unit.
Preparing to unpack .../ruby-test-unit_3.1.7-2_all.deb ...
Unpacking ruby-test-unit (3.1.7-2) ...
Selecting previously unselected package libruby2.3:amd64.
Preparing to unpack .../libruby2.3_2.3.1-2~ubuntu16.04.16_amd64.deb ...
Unpacking libruby2.3:amd64 (2.3.1-2~ubuntu16.04.16) ...
Selecting previously unselected package ruby2.3.
Preparing to unpack .../ruby2.3_2.3.1-2~ubuntu16.04.16_amd64.deb ...
Unpacking ruby2.3 (2.3.1-2~ubuntu16.04.16) ...
Selecting previously unselected package ruby.
Preparing to unpack .../ruby_1%3a2.3.0+1_all.deb ...
Unpacking ruby (1:2.3.0+1) ...
Selecting previously unselected package rake.
Preparing to unpack .../rake_10.5.0-2ubuntu0.1_all.deb ...
Unpacking rake (10.5.0-2ubuntu0.1) ...
Selecting previously unselected package rename.
Preparing to unpack .../archives/rename_0.20-4_all.deb ...
Unpacking rename (0.20-4) ...
Selecting previously unselected package unzip.
Preparing to unpack .../unzip_6.0-20ubuntu1.1_amd64.deb ...
Unpacking unzip (6.0-20ubuntu1.1) ...
Selecting previously unselected package zip.
Preparing to unpack .../archives/zip_3.0-11_amd64.deb ...
Unpacking zip (3.0-11) ...
Selecting previously unselected package ruby-trollop.
Preparing to unpack .../ruby-trollop_2.0-2_all.deb ...
Unpacking ruby-trollop (2.0-2) ...
Selecting previously unselected package ruby-paint.
Preparing to unpack .../ruby-paint_0.8.6-1build1_all.deb ...
Unpacking ruby-paint (0.8.6-1build1) ...
Selecting previously unselected package lolcat.
Preparing to unpack .../lolcat_42.0.99-1_all.deb ...
Unpacking lolcat (42.0.99-1) ...
Processing triggers for systemd (229-4ubuntu21.4) ...
Processing triggers for libc-bin (2.23-0ubuntu10) ...
Setting up libatm1:amd64 (1:2.5.1-1.5) ...
Setting up libmnl0:amd64 (1.0.3-5) ...
Setting up libgdbm3:amd64 (1.8.3-13.1) ...
Setting up fonts-lato (2.0-1) ...
Setting up libyaml-0-2:amd64 (0.1.6-3) ...
Setting up perl-modules-5.22 (5.22.1-9ubuntu0.9) ...
Setting up libperl5.22:amd64 (5.22.1-9ubuntu0.9) ...
Setting up perl (5.22.1-9ubuntu0.9) ...
update-alternatives: using /usr/bin/prename to provide /usr/bin/rename (rename) in auto mode
Setting up iproute2 (4.3.0-1ubuntu3.16.04.5) ...
Setting up ifupdown (0.8.10ubuntu1.4) ...
Creating /etc/network/interfaces.
Setting up libisc-export160 (1:9.10.3.dfsg.P4-8ubuntu1.19) ...
Setting up libdns-export162 (1:9.10.3.dfsg.P4-8ubuntu1.19) ...
Setting up isc-dhcp-client (4.3.3-5ubuntu12.10) ...
Setting up isc-dhcp-common (4.3.3-5ubuntu12.10) ...
Setting up libffi6:amd64 (3.2.1-4) ...
Setting up libgmp10:amd64 (2:6.1.0+dfsg-2) ...
Setting up libssl1.0.0:amd64 (1.0.2g-1ubuntu4.20) ...
debconf: unable to initialize frontend: Dialog
debconf: (No usable dialog-like program is installed, so the dialog based frontend cannot be used. at /usr/share/perl5/Debconf/FrontEnd/Dialog.pm line 76.)
debconf: falling back to frontend: Readline
Setting up libtext-charwidth-perl (0.04-7build5) ...
Setting up libxtables11:amd64 (1.6.0-2ubuntu3) ...
Setting up netbase (5.3) ...
Setting up openssl (1.0.2g-1ubuntu4.20) ...
Setting up ca-certificates (20210119~16.04.1) ...
debconf: unable to initialize frontend: Dialog
debconf: (No usable dialog-like program is installed, so the dialog based frontend cannot be used. at /usr/share/perl5/Debconf/FrontEnd/Dialog.pm line 76.)
debconf: falling back to frontend: Readline
Setting up cowsay (3.03+dfsg1-15) ...
Setting up cowsay-off (3.03+dfsg1-15) ...
Setting up librecode0:amd64 (3.6-22) ...
Setting up fortune-mod (1:1.99.1-7) ...
Setting up fortunes-min (1:1.99.1-7) ...
Setting up javascript-common (11) ...
Setting up libjs-jquery (1.11.3+dfsg-4) ...
Setting up rubygems-integration (1.10) ...
Setting up ruby-did-you-mean (1.0.0-2) ...
Setting up ruby-minitest (5.8.4-2) ...
Setting up ruby-net-telnet (0.1.1-2) ...
Setting up ruby-power-assert (0.2.7-1) ...
Setting up ruby-test-unit (3.1.7-2) ...
Setting up rename (0.20-4) ...
update-alternatives: using /usr/bin/file-rename to provide /usr/bin/rename (rename) in auto mode
Setting up unzip (6.0-20ubuntu1.1) ...
Setting up zip (3.0-11) ...
Setting up rake (10.5.0-2ubuntu0.1) ...
Setting up libruby2.3:amd64 (2.3.1-2~ubuntu16.04.16) ...
Setting up ruby2.3 (2.3.1-2~ubuntu16.04.16) ...
Setting up ruby (1:2.3.0+1) ...
Setting up ruby-trollop (2.0-2) ...
Setting up ruby-paint (0.8.6-1build1) ...
Setting up lolcat (42.0.99-1) ...
Processing triggers for libc-bin (2.23-0ubuntu10) ...
Processing triggers for systemd (229-4ubuntu21.4) ...
Processing triggers for ca-certificates (20210119~16.04.1) ...
Updating certificates in /etc/ssl/certs...
129 added, 0 removed; done.
Running hooks in /etc/ca-certificates/update.d...
done.
DEBUG   [U=0,P=83858]      Full()                        Inserting Metadata
INFO    [U=0,P=83858]      insertLabelsJSON()            Adding labels
INFO    [U=0,P=83858]      insertEnvScript()             Adding environment to container
INFO    [U=0,P=83858]      insertRunScript()             Adding runscript
DEBUG   [U=0,P=83858]      Full()                        Calling assembler
INFO    [U=0,P=83858]      Assemble()                    Creating SIF file...
DEBUG   [U=0,P=83858]      findFromConfigOrPath()        Using "mksquashfs" at "/usr/bin/mksquashfs" (from singularity.conf)
VERBOSE [U=0,P=83858]      Assemble()                    Set SIF container architecture to amd64
DEBUG   [U=0,P=83858]      EncryptFilesystem()           Total device size for encrypted image: 32286212096
DEBUG   [U=0,P=83858]      findFromConfigOnly()          Using "cryptsetup" at "/usr/sbin/cryptsetup" (from singularity.conf)
DEBUG   [U=0,P=83858]      EncryptFilesystem()           Running /usr/sbin/cryptsetup /usr/sbin/cryptsetup luksFormat --batch-mode --type luks2 --key-file - /dev/loop11
DEBUG   [U=0,P=83858]      findFromConfigOnly()          Using "cryptsetup" at "/usr/sbin/cryptsetup" (from singularity.conf)
DEBUG   [U=0,P=83858]      Open()                        Running /usr/sbin/cryptsetup /usr/sbin/cryptsetup open --batch-mode --type luks2 --key-file - /dev/loop11 2775232f-f4f0-4385-851e-12ab84ca86ac
DEBUG   [U=0,P=83858]      Open()                        Successfully opened encrypted device /dev/loop11
DEBUG   [U=0,P=83858]      copyDeviceContents()          Copying /srv/data0/lx/tmp/bundle-temp-3138456456/squashfs-326193523 to /dev/mapper/2775232f-f4f0-4385-851e-12ab84ca86ac, size 32269434880
DEBUG   [U=0,P=83858]      EncryptFilesystem()           Running /usr/sbin/cryptsetup /usr/sbin/cryptsetup close 2775232f-f4f0-4385-851e-12ab84ca86ac
VERBOSE [U=0,P=83858]      Full()                        Build complete: /srv/data0/lx/res/lolcow_enc.sif
DEBUG   [U=0,P=83858]      cleanUp()                     Cleaning up "/srv/data0/lx/tmp/build-temp-3229122302/rootfs" and "/srv/data0/lx/tmp/bundle-temp-3138456456"
INFO    [U=0,P=83858]      runBuild()                    Build complete: lolcow_enc.sif

root@dev0:/srv/data0/lx/res# singularity -d run --pem-path=rsa_pri.pem lolcow_enc.sif

DEBUG   [U=0,P=93666]      persistentPreRun()            Singularity version: 3.8.3+222-g2f16701e3
DEBUG   [U=0,P=93666]      persistentPreRun()            Parsing configuration file /usr/local/singularity/etc/singularity/singularity.conf
DEBUG   [U=0,P=93666]      handleConfDir()               /root/.singularity already exists. Not creating.
DEBUG   [U=0,P=93666]      setValue()                    Updated flag 'tmpdir' value to: /srv/data0/lx/tmp/
DEBUG   [U=0,P=93666]      execStarter()                 Saving umask 0022 for propagation into container
DEBUG   [U=0,P=93666]      execStarter()                 Checking for encrypted system partition
DEBUG   [U=0,P=93666]      Init()                        Image format detection
DEBUG   [U=0,P=93666]      Init()                        Check for sandbox image format
DEBUG   [U=0,P=93666]      Init()                        sandbox format initializer returned: not a directory image
DEBUG   [U=0,P=93666]      Init()                        Check for sif image format
DEBUG   [U=0,P=93666]      Init()                        sif image format detected
DEBUG   [U=0,P=93666]      execStarter()                 Encrypted container filesystem detected
VERBOSE [U=0,P=93666]      getEncryptionMaterial()       Using pem path flag for encrypted container
DEBUG   [U=0,P=93666]      SetContainerEnv()             Forwarding SHELL environment variable
DEBUG   [U=0,P=93666]      SetContainerEnv()             Forwarding SUDO_GID environment variable
DEBUG   [U=0,P=93666]      SetContainerEnv()             Forwarding SUDO_COMMAND environment variable
DEBUG   [U=0,P=93666]      SetContainerEnv()             Forwarding SUDO_USER environment variable
DEBUG   [U=0,P=93666]      SetContainerEnv()             Forwarding PWD environment variable
DEBUG   [U=0,P=93666]      SetContainerEnv()             Forwarding LOGNAME environment variable
DEBUG   [U=0,P=93666]      SetContainerEnv()             Forwarding LANG environment variable
DEBUG   [U=0,P=93666]      SetContainerEnv()             Forwarding LS_COLORS environment variable
DEBUG   [U=0,P=93666]      SetContainerEnv()             Forwarding https_proxy environment variable
VERBOSE [U=0,P=93666]      SetContainerEnv()             Not forwarding SINGULARITY_TMPDIR environment variable
DEBUG   [U=0,P=93666]      SetContainerEnv()             Forwarding TERM environment variable
DEBUG   [U=0,P=93666]      SetContainerEnv()             Forwarding USER environment variable
DEBUG   [U=0,P=93666]      SetContainerEnv()             Forwarding DISPLAY environment variable
DEBUG   [U=0,P=93666]      SetContainerEnv()             Forwarding SHLVL environment variable
DEBUG   [U=0,P=93666]      SetContainerEnv()             Forwarding http_proxy environment variable
DEBUG   [U=0,P=93666]      SetContainerEnv()             Forwarding SUDO_UID environment variable
DEBUG   [U=0,P=93666]      SetContainerEnv()             Forwarding MAIL environment variable
DEBUG   [U=0,P=93666]      SetContainerEnv()             Forwarding OLDPWD environment variable
DEBUG   [U=0,P=93666]      SetContainerEnv()             Forwarding _ environment variable
DEBUG   [U=0,P=93666]      SetContainerEnv()             Forwarding USER_PATH environment variable
VERBOSE [U=0,P=93666]      SetContainerEnv()             Setting HOME=/root
VERBOSE [U=0,P=93666]      SetContainerEnv()             Setting PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
DEBUG   [U=0,P=93666]      init()                        Use starter binary /usr/local/singularity/libexec/singularity/bin/starter
VERBOSE [U=0,P=93666]      print()                       Set messagelevel to: 5
VERBOSE [U=0,P=93666]      init()                        Starter initialization
DEBUG   [U=0,P=93666]      load_overlay_module()         Trying to load overlay kernel module
DEBUG   [U=0,P=93666]      load_overlay_module()         Overlay seems supported by the kernel
VERBOSE [U=0,P=93666]      is_suid()                     Check if we are running as setuid
DEBUG   [U=0,P=93666]      read_engine_config()          Read engine configuration
DEBUG   [U=0,P=93666]      init()                        Wait completion of stage1
DEBUG   [U=0,P=93683]      set_parent_death_signal()     Set parent death signal to 9
VERBOSE [U=0,P=93683]      init()                        Spawn stage 1
DEBUG   [U=0,P=93683]      startup()                     singularity runtime engine selected
VERBOSE [U=0,P=93683]      startup()                     Execute stage 1
DEBUG   [U=0,P=93683]      StageOne()                    Entering stage 1
DEBUG   [U=0,P=93683]      prepareRootCaps()             Root full capabilities
DEBUG   [U=0,P=93683]      prepareAutofs()               Found "/proc/sys/fs/binfmt_misc" as autofs mount point
DEBUG   [U=0,P=93683]      prepareAutofs()               Could not keep file descriptor for bind path /etc/localtime: no mount point
DEBUG   [U=0,P=93683]      prepareAutofs()               Could not keep file descriptor for bind path /etc/hosts: no mount point
DEBUG   [U=0,P=93683]      prepareAutofs()               Could not keep file descriptor for home directory /root: no mount point
DEBUG   [U=0,P=93683]      prepareAutofs()               Could not keep file descriptor for current working directory /srv/data0/lx/res: no mount point
DEBUG   [U=0,P=93683]      Init()                        Image format detection
DEBUG   [U=0,P=93683]      Init()                        Check for sandbox image format
DEBUG   [U=0,P=93683]      Init()                        sandbox format initializer returned: not a directory image
DEBUG   [U=0,P=93683]      Init()                        Check for sif image format
DEBUG   [U=0,P=93683]      Init()                        sif image format detected
DEBUG   [U=0,P=93683]      setSessionLayer()             Overlay seems supported and allowed by kernel
DEBUG   [U=0,P=93683]      setSessionLayer()             Attempting to use overlayfs (enable overlay = try)
VERBOSE [U=0,P=93666]      wait_child()                  stage 1 exited with status 0
DEBUG   [U=0,P=93666]      cleanup_fd()                  Close file descriptor 4
DEBUG   [U=0,P=93666]      cleanup_fd()                  Close file descriptor 5
DEBUG   [U=0,P=93666]      cleanup_fd()                  Close file descriptor 6
DEBUG   [U=0,P=93666]      init()                        Set child signal mask
DEBUG   [U=0,P=93666]      init()                        Create socketpair for master communication channel
DEBUG   [U=0,P=93666]      init()                        Create RPC socketpair for communication between stage 2 and RPC server
VERBOSE [U=0,P=93666]      init()                        Spawn master process
DEBUG   [U=0,P=93689]      set_parent_death_signal()     Set parent death signal to 9
VERBOSE [U=0,P=93689]      create_namespace()            Create mount namespace
VERBOSE [U=0,P=93666]      enter_namespace()             Entering in mount namespace
DEBUG   [U=0,P=93666]      enter_namespace()             Opening namespace file ns/mnt
VERBOSE [U=0,P=93689]      create_namespace()            Create mount namespace
VERBOSE [U=0,P=93690]      init()                        Spawn RPC server
DEBUG   [U=0,P=93666]      startup()                     singularity runtime engine selected
VERBOSE [U=0,P=93666]      startup()                     Execute master process
DEBUG   [U=0,P=93690]      startup()                     singularity runtime engine selected
VERBOSE [U=0,P=93690]      startup()                     Serve RPC requests
DEBUG   [U=0,P=93666]      setupSessionLayout()          Using Layer system: overlay
DEBUG   [U=0,P=93666]      setupOverlayLayout()          Creating overlay SESSIONDIR layout
DEBUG   [U=0,P=93666]      addRootfsMount()              Mount rootfs in read-only mode
DEBUG   [U=0,P=93666]      addRootfsMount()              Image type is 4100
DEBUG   [U=0,P=93666]      addRootfsMount()              Mounting block [encryptfs] image: /srv/data0/lx/res/lolcow_enc.sif
DEBUG   [U=0,P=93666]      addKernelMount()              Checking configuration file for 'mount proc'
DEBUG   [U=0,P=93666]      addKernelMount()              Adding proc to mount list
VERBOSE [U=0,P=93666]      addKernelMount()              Default mount: /proc:/proc
DEBUG   [U=0,P=93666]      addKernelMount()              Checking configuration file for 'mount sys'
DEBUG   [U=0,P=93666]      addKernelMount()              Adding sysfs to mount list
VERBOSE [U=0,P=93666]      addKernelMount()              Default mount: /sys:/sys
DEBUG   [U=0,P=93666]      addDevMount()                 Checking configuration file for 'mount dev'
DEBUG   [U=0,P=93666]      addDevMount()                 Adding dev to mount list
VERBOSE [U=0,P=93666]      addDevMount()                 Default mount: /dev:/dev
DEBUG   [U=0,P=93666]      addHostMount()                Not mounting host file systems per configuration
VERBOSE [U=0,P=93666]      addBindsMount()               Found 'bind path' = /etc/localtime, /etc/localtime
VERBOSE [U=0,P=93666]      addBindsMount()               Found 'bind path' = /etc/hosts, /etc/hosts
DEBUG   [U=0,P=93666]      addHomeStagingDir()           Staging home directory (/root) at /usr/local/singularity/var/singularity/mnt/session/root
DEBUG   [U=0,P=93666]      addHomeMount()                Adding home directory mount [/usr/local/singularity/var/singularity/mnt/session/root:/root] to list using layer: overlay
DEBUG   [U=0,P=93666]      addTmpMount()                 Checking for 'mount tmp' in configuration file
VERBOSE [U=0,P=93666]      addTmpMount()                 Default mount: /tmp:/tmp
VERBOSE [U=0,P=93666]      addTmpMount()                 Default mount: /var/tmp:/var/tmp
DEBUG   [U=0,P=93666]      addScratchMount()             Not mounting scratch directory: Not requested
DEBUG   [U=0,P=93666]      addLibsMount()                Checking for 'user bind control' in configuration file
DEBUG   [U=0,P=93666]      addFilesMount()               Checking for 'user bind control' in configuration file
DEBUG   [U=0,P=93666]      addResolvConfMount()          Adding /etc/resolv.conf to mount list
VERBOSE [U=0,P=93666]      addResolvConfMount()          Default mount: /etc/resolv.conf:/etc/resolv.conf
DEBUG   [U=0,P=93666]      addHostnameMount()            Skipping hostname mount, not virtualizing UTS namespace on user request
DEBUG   [U=0,P=93666]      create()                      Mount all
DEBUG   [U=0,P=93666]      mountGeneric()                Mounting tmpfs to /usr/local/singularity/var/singularity/mnt/session
DEBUG   [U=0,P=93666]      mountImage()                  Mounting loop device /dev/loop10 to /usr/local/singularity/var/singularity/mnt/session/rootfs of type encryptfs
DEBUG   [U=0,P=93690]      findFromConfigOnly()          Using "cryptsetup" at "/usr/sbin/cryptsetup" (from singularity.conf)
DEBUG   [U=0,P=93690]      Open()                        Running /usr/sbin/cryptsetup /usr/sbin/cryptsetup open --batch-mode --type luks2 --key-file - /dev/loop10 3be99bdb-d363-4798-994a-4b6afc4538be
DEBUG   [U=0,P=93690]      Open()                        Successfully opened encrypted device /dev/loop10
DEBUG   [U=0,P=93666]      umount()                      Umount /usr/local/singularity/var/singularity/mnt/session/final
DEBUG   [U=0,P=93666]      umount()                      Umount /usr/local/singularity/var/singularity/mnt/session/rootfs
ERROR   [U=0,P=93666]      CleanupContainer()            could not cleanup crypt: invalid argument
FATAL   [U=0,P=93666]      Master()                      container creation failed: mount /proc/self/fd/3->/usr/local/singularity/var/singularity/mnt/session/rootfs error: while mounting image /proc/self/fd/3: kernel reported a bad superblock for squashfs image partition, possible causes are that your kernel doesn't support the compression algorithm or the image is corrupted
kmuriki commented 2 years ago

Singularity repo is now retired as the code base is now moved to Apptainer. We are closing all the old issues under the old Singularity repo. For further assistance please open a new issue under the new Apptainer repo. Thanks for your support.