在Ubuntu升级后运行singularity时出现压扁错误



概述

我正在一台运行Ubuntu 18.04的机器上处理奇异图像中的代码。截至周二晚上,它在机器A上运行(好吧,我正在调试代码(。我运行了一个更新,截至第二天,任何运行任何奇点容器的尝试都会给我以下错误:

ERROR  : Failed to mount squashfs image in (read only): Invalid argument
ABORT  : Retval = 255

在确认这不是我的代码造成的(通过简单地运行singularity exec <my_image_file>.sif并得到相同的错误,我记得我在另一台机器上有一个几乎相同的设置(B(。我能够在那里运行映像,没有任何问题。

不幸的是,我忘了我有";无人值守更新";在该机器上选择并重新启动。它现在返回相同的错误。

我的尝试

我这里有点空。我所做的只是说服自己,它与我的代码没有直接关系,几乎可以肯定与更新的东西有关。我对南瓜真的不太了解,对奇点也相对陌生。我没有在网上找到任何关于这个确切错误的东西("无效参数"部分(。作为一名圣母玛利亚,我在机器上重新安装了奇点a,它没有改变。

我不相信这是奇点本身的问题,我使用的是旧版本,所以我认为这不是一个有效的github问题。我使用的是2.5.2版本,因为这是该代码用于集群的版本。

详细信息

-来自奇点的vv日志(注意:无论我通过什么参数,都有相同的反馈(:

Increasing verbosity level (4)
Singularity version: 2.5.2-dist
Exec'ing: /usr/local/libexec/singularity/cli/exec.exec
Evaluating args: '<my_image_file>.sif <my_program> <program_arg>'
VERBOSE: Set messagelevel to: 4
VERBOSE: Initialize configuration file: /usr/local/etc/singularity/singularity.conf
VERBOSE: Got config key allow setuid = 'yes'
VERBOSE: Got config key max loop devices = '256'
VERBOSE: Got config key allow pid ns = 'yes'
VERBOSE: Got config key config passwd = 'yes'
VERBOSE: Got config key config group = 'yes'
VERBOSE: Got config key config resolv_conf = 'yes'
VERBOSE: Got config key mount proc = 'yes'
VERBOSE: Got config key mount sys = 'yes'
VERBOSE: Got config key mount dev = 'yes'
VERBOSE: Got config key mount devpts = 'yes'
VERBOSE: Got config key mount home = 'yes'
VERBOSE: Got config key mount tmp = 'yes'
VERBOSE: Got config key mount hostfs = 'no'
VERBOSE: Got config key bind path = '/etc/localtime'
VERBOSE: Got config key bind path = '/etc/hosts'
VERBOSE: Got config key user bind control = 'yes'
VERBOSE: Got config key enable overlay = 'try'
VERBOSE: Got config key mount slave = 'yes'
VERBOSE: Got config key sessiondir max size = '16'
VERBOSE: Got config key allow container squashfs = 'yes'
VERBOSE: Got config key allow container extfs = 'yes'
VERBOSE: Got config key allow container dir = 'yes'
VERBOSE: Initializing Singularity Registry
VERBOSE: Adding value to registry: 'COMMAND' = 'exec'
VERBOSE: Adding value to registry: 'SYSCONFDIR' = '/usr/local/etc'
VERBOSE: Adding value to registry: 'VERSION' = '2.5.2-dist'
VERBOSE: Adding value to registry: 'IMAGE' = '<my_image_file>.sif'
VERBOSE: Adding value to registry: 'MESSAGELEVEL' = '4'
VERBOSE: Adding value to registry: 'BINDIR' = '/usr/local/bin'
VERBOSE: Adding value to registry: 'LOCALSTATEDIR' = '/usr/local/var'
VERBOSE: Adding value to registry: 'LIBEXECDIR' = '/usr/local/libexec'
VERBOSE: Set home (via getpwuid()) to: <my_home_directory>
VERBOSE: Running SUID program workflow
VERBOSE: Checking program has appropriate permissions
VERBOSE: Checking configuration file is properly owned by root
VERBOSE: Checking if singularity.conf allows us to run as suid
VERBOSE: Invoking the user namespace
VERBOSE: Not virtualizing USER namespace: running as SUID
VERBOSE: No autofs bug path in configuration, skipping
VERBOSE: Instantiating read only container image object
VERBOSE: Checking that file pointer is a Singularity image
VERBOSE: File is a valid SquashFS image
VERBOSE: Adding value to registry: 'CLEANUPD_FD' = '-1'
VERBOSE: Not virtualizing IPC namespace on user request
VERBOSE: Not virtualizing PID namespace on user request
VERBOSE: Not virtualizing network namespace on user request
VERBOSE: Using session directory: /usr/local/var/singularity/mnt/session
VERBOSE: Adding value to registry: 'SESSIONDIR' = '/usr/local/var/singularity/mnt/session'
VERBOSE: Found available loop device: /dev/loop18
VERBOSE: Using loop device: /dev/loop18
VERBOSE: Mounting squashfs image: /dev/loop18 -> /usr/local/var/singularity/mnt/container
ERROR  : Failed to mount squashfs image in (read only): Invalid argument
ABORT  : Retval = 255

dpkg.log中"升级"的grep:

2020-07-23 06:10:36 upgrade evolution-data-server-common:all 3.28.5-0ubuntu0.18.04.2 3.28.5-0ubuntu0.18.04.3
2020-07-23 06:10:41 upgrade linux-libc-dev:amd64 4.15.0-111.112 4.15.0-112.113
2020-07-23 06:10:46 upgrade python-pil:amd64 5.1.0-1ubuntu0.2 5.1.0-1ubuntu0.3
2020-07-23 06:10:51 upgrade python3-pil:amd64 5.1.0-1ubuntu0.2 5.1.0-1ubuntu0.3
2020-07-23 06:10:56 upgrade python2.7:amd64 2.7.17-1~18.04ubuntu1 2.7.17-1~18.04ubuntu1.1
2020-07-23 06:10:57 upgrade libpython2.7:amd64 2.7.17-1~18.04ubuntu1 2.7.17-1~18.04ubuntu1.1
2020-07-23 06:10:57 upgrade libpython2.7-stdlib:amd64 2.7.17-1~18.04ubuntu1 2.7.17-1~18.04ubuntu1.1
2020-07-23 06:10:58 upgrade python2.7-minimal:amd64 2.7.17-1~18.04ubuntu1 2.7.17-1~18.04ubuntu1.1
2020-07-23 06:10:58 upgrade libpython2.7-minimal:amd64 2.7.17-1~18.04ubuntu1 2.7.17-1~18.04ubuntu1.1
2020-07-23 06:11:06 upgrade python3.6-venv:amd64 3.6.9-1~18.04ubuntu1 3.6.9-1~18.04ubuntu1.1
2020-07-23 06:11:06 upgrade python3.6-dev:amd64 3.6.9-1~18.04ubuntu1 3.6.9-1~18.04ubuntu1.1
2020-07-23 06:11:06 upgrade libpython3.6-dev:amd64 3.6.9-1~18.04ubuntu1 3.6.9-1~18.04ubuntu1.1
2020-07-23 06:11:11 upgrade libpython3.6:amd64 3.6.9-1~18.04ubuntu1 3.6.9-1~18.04ubuntu1.1
2020-07-23 06:11:11 upgrade python3.6:amd64 3.6.9-1~18.04ubuntu1 3.6.9-1~18.04ubuntu1.1
2020-07-23 06:11:11 upgrade libpython3.6-stdlib:amd64 3.6.9-1~18.04ubuntu1 3.6.9-1~18.04ubuntu1.1
2020-07-23 06:11:12 upgrade python3.6-minimal:amd64 3.6.9-1~18.04ubuntu1 3.6.9-1~18.04ubuntu1.1
2020-07-23 06:11:12 upgrade libpython3.6-minimal:amd64 3.6.9-1~18.04ubuntu1 3.6.9-1~18.04ubuntu1.1
2020-07-23 06:11:29 upgrade linux-generic-hwe-18.04:amd64 5.3.0.62.115 5.4.0.42.46~18.04.35
2020-07-23 06:11:29 upgrade linux-image-generic-hwe-18.04:amd64 5.3.0.62.115 5.4.0.42.46~18.04.35
2020-07-23 06:11:41 upgrade linux-headers-generic-hwe-18.04:amd64 5.3.0.62.115 5.4.0.42.46~18.04.35
2020-07-23 06:12:37 upgrade evolution-data-server:amd64 3.28.5-0ubuntu0.18.04.2 3.28.5-0ubuntu0.18.04.3
2020-07-23 06:12:37 upgrade libebook-1.2-19:amd64 3.28.5-0ubuntu0.18.04.2 3.28.5-0ubuntu0.18.04.3
2020-07-23 06:12:38 upgrade libedata-book-1.2-25:amd64 3.28.5-0ubuntu0.18.04.2 3.28.5-0ubuntu0.18.04.3
2020-07-23 06:12:38 upgrade libedata-cal-1.2-28:amd64 3.28.5-0ubuntu0.18.04.2 3.28.5-0ubuntu0.18.04.3
2020-07-23 06:12:38 upgrade libebook-contacts-1.2-2:amd64 3.28.5-0ubuntu0.18.04.2 3.28.5-0ubuntu0.18.04.3
2020-07-23 06:12:38 upgrade libebackend-1.2-10:amd64 3.28.5-0ubuntu0.18.04.2 3.28.5-0ubuntu0.18.04.3
2020-07-23 06:12:38 upgrade libecal-1.2-19:amd64 3.28.5-0ubuntu0.18.04.2 3.28.5-0ubuntu0.18.04.3
2020-07-23 06:12:38 upgrade libedataserver-1.2-23:amd64 3.28.5-0ubuntu0.18.04.2 3.28.5-0ubuntu0.18.04.3
2020-07-23 06:12:39 upgrade libcamel-1.2-61:amd64 3.28.5-0ubuntu0.18.04.2 3.28.5-0ubuntu0.18.04.3
2020-07-23 06:12:44 upgrade libavformat-dev:amd64 7:3.4.6-0ubuntu0.18.04.1 7:3.4.8-0ubuntu0.2
2020-07-23 06:12:44 upgrade libavcodec-dev:amd64 7:3.4.6-0ubuntu0.18.04.1 7:3.4.8-0ubuntu0.2
2020-07-23 06:12:45 upgrade libswresample-dev:amd64 7:3.4.6-0ubuntu0.18.04.1 7:3.4.8-0ubuntu0.2
2020-07-23 06:12:45 upgrade libswresample2:amd64 7:3.4.6-0ubuntu0.18.04.1 7:3.4.8-0ubuntu0.2
2020-07-23 06:12:45 upgrade libswscale-dev:amd64 7:3.4.6-0ubuntu0.18.04.1 7:3.4.8-0ubuntu0.2
2020-07-23 06:12:45 upgrade libswscale4:amd64 7:3.4.6-0ubuntu0.18.04.1 7:3.4.8-0ubuntu0.2
2020-07-23 06:12:46 upgrade libavresample-dev:amd64 7:3.4.6-0ubuntu0.18.04.1 7:3.4.8-0ubuntu0.2
2020-07-23 06:12:46 upgrade libavresample3:amd64 7:3.4.6-0ubuntu0.18.04.1 7:3.4.8-0ubuntu0.2
2020-07-23 06:12:46 upgrade libavutil-dev:amd64 7:3.4.6-0ubuntu0.18.04.1 7:3.4.8-0ubuntu0.2
2020-07-23 06:12:46 upgrade libavutil55:amd64 7:3.4.6-0ubuntu0.18.04.1 7:3.4.8-0ubuntu0.2
2020-07-23 06:12:46 upgrade libavcodec57:amd64 7:3.4.6-0ubuntu0.18.04.1 7:3.4.8-0ubuntu0.2
2020-07-23 06:12:47 upgrade libavformat57:amd64 7:3.4.6-0ubuntu0.18.04.1 7:3.4.8-0ubuntu0.2
2020-07-23 06:12:52 upgrade libpostproc54:amd64 7:3.4.6-0ubuntu0.18.04.1 7:3.4.8-0ubuntu0.2
2020-07-23 06:12:57 upgrade libavfilter6:amd64 7:3.4.6-0ubuntu0.18.04.1 7:3.4.8-0ubuntu0.2
2020-07-23 06:13:02 upgrade libavdevice57:amd64 7:3.4.6-0ubuntu0.18.04.1 7:3.4.8-0ubuntu0.2
2020-07-23 06:13:06 upgrade ffmpeg:amd64 7:3.4.6-0ubuntu0.18.04.1 7:3.4.8-0ubuntu0.2

该图像是从Docker图像构建的,只需要一些额外的步骤。我没有提供任何关于这方面的信息,因为行为似乎并不取决于我何时构建图像。

我遇到了这个确切的问题,我在Ubuntu 18.04中用奇异性版本2.6.1修复了它(我认为2.5.2中的解决方案不会有太大不同(。

采取的步骤

  1. 如果需要,请卸载早期版本的奇点。

  2. 打开终端并运行以下命令,下载正确奇点版本的tarball:

# Go to the place you want to work in
cd ~
VERSION=2.6.1  # Set an environment variable just for convenience, could replace with another version.
# Download
wget https://github.com/singularityware/singularity/releases/download/$VERSION/singularity-$VERSION.tar.gz
# Extract
tar xvf singularity-$VERSION.tar.gz
  1. 现在,应该有一个名为singularity-2.6.1的文件夹(对我来说,它被放在Home(~(中(。然后打开放在singularity-2.6.1/src/lib/image/squashfs/mount.c中的文件mount.c(我不确定v2.5.2是否相同,但我认为变化不大。不过我们可能运气不好(

  2. 在这个文件中找到代码行

if ( singularity_mount(loop_dev, mount_point, "squashfs", MS_NOSUID|MS_RDONLY|MS_NODEV, "errors=remount-ro") < 0 )

将其更改为

if ( singularity_mount(loop_dev, mount_point, "squashfs", MS_NOSUID|MS_RDONLY|MS_NODEV, "") < 0 )

别忘了保存!

  1. 返回终端,通过运行命令从编辑的安装文件安装Singularity
cd singularity-$VERSION
./configure --prefix=/usr/local
make
sudo make install

对我来说,问题现在已经解决了!

编辑

正如aguadopd所指出的,如果没有安装libarchive-devmake命令可能无法工作。如果是这种情况,那么首先通过在终端中运行来修复它

sudo apt-get update -y
sudo apt-get install -y libarchive-dev

然后在一个新的终端

singularity shell -p $HOME/Downloads/hrwros-09.simg

问题原理

显然,squashfs中曾经有一个错误,如果它不知道的话,它就会忽略参数。今年早些时候修复了这个错误,当遇到无效参数时,它开始出错,就像我们的案例中发生的那样。(此处也有解释https://www.mail-archive.com/debian-kernel@lists.debian.org/msg117435.html(因此,删除未知参数"errors=remount-ro"解决了问题。

老实说,我是100%的新手,我不确定它是否会在其他地方引发任何新的错误。然而,这也是这个错误在后来发布的奇点中基本上被修复的原因(https://github.com/hpcng/singularity/pull/4802/files/3f3136be150d9a8f63e58a0b4e39dc8487f1c0dc)。

希望它能有所帮助!

谢谢。我跟随你的脚步,它奏效了。然而,我对步骤";制造";。它没有工作,因为我没有安装";libarchive dev";。为了修复它,我做了

  1. sudo apt-get-update-y
  2. sudo apt-get-install-y libarchive dev

然后在新的终端中

  1. 奇异外壳-p$HOME/Downloads/hrwros-09.simg

现在它正在工作。

相关内容

  • 没有找到相关文章

最新更新