Skip to content

spack ci rebuild fails to install all cached dependencies. #17544

@haampie

Description

@haampie

Steps to reproduce the issue

I'm trying to narrow down an issue in spack ci rebuild for which #17536 should be a solution, but it seems to not entirely fix everything.

I believe the issue is when you install a package (e.g. curl) which has dependencies in common with a compiler (e.g. for gcc it is perl, zlib) it will only install one version of perl, say perl%[email protected], but not the spec compiled with the new compiler perl%[email protected].

It seems the spack installcommand will fail the first time, but will not fail if I repeat it once more

If you want to try reproduce this, please use the stabbles/spack-fix docker image, since it contains the fixes from #17536 and more, and do e.g. docker run -it --rm --entrypoint="" -v `pwd`:/workspace stabbles/spack-fix /bin/bash and run the following:

$ cd /workspace
$ ls
config.yaml  curl.yaml  run.sh  spack.asc
$ cat config.yaml 
config:
    install_missing_compilers: True
$ cat run.sh
#!/bin/bash

unset MODULEPATH
export AWS_ACCESS_KEY_ID=xxxx
export AWS_SECRET_ACCESS_KEY=xxxx
export S3_ENDPOINT_URL=http://148.187.98.133:9000

cd /workspace
spack gpg trust spack.asc
spack mirror add minio s3://spack
cp /workspace/config.yaml /opt/spack/etc/spack/config.yaml
'/opt/spack/bin/spack' '-d' 'install' '--keep-stage' '--cache-only' '--only' 'dependencies' './curl.yaml'
$ cat spack.asc
-----BEGIN PGP PUBLIC KEY BLOCK-----

mQGNBF8GYB4BDADAoHHjv6uObSgXgVmTDsa9uobekL8zKhNLPakj2Oa1l7x4CyLZ
Ac+xRa4WfN0YoEaOaM71XS3g5svTKkDq+h/OfNq1iKBs0uA6E4H5SmfwVK9mV9L5
4HeyWhI6PvFI8ek6kUm0G+UAh/M8kUZbMwHlarQ23J4LYofRUYb/LyVXft55+sYi
VWhf/1stydzJMRdSCjFu/0GUMUhXCtifCk8MFkolZ6hT8j8qbCkzpKbP96FMyHFO
BzQInIV15AoJxOOMjDLqyhoKujuS5GzA31CgiSsLX03B/uk4rAm1dMPj9q5hs3pl
xWX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another-testing-domain.com/api/grab?url=https://gitlab.com/cscs-ci/ci-testing/spack-ci/-/jobs/639550384/artifacts/raw/jobs_scratch_dir/specs/curl.yaml

Error Message

The first time I run ./run.sh it will error:

$ ./run.sh
...
==> [2020-07-15-13:12:09.000894, 393] Error: Detected uninstalled dependencies for openssl: {'perl', 'zlib', 'gcc'}
==> [2020-07-15-13:12:09.000981, 393] InstallError: Cannot proceed with openssl: 3 uninstalled dependencies: perl,zlib,gcc
==> [2020-07-15-13:12:09.001019, 393] Error: Cannot proceed with openssl: 3 uninstalled dependencies: perl,zlib,gcc
Traceback (most recent call last):
  File "/opt/spack/lib/spack/spack/main.py", line 761, in main
    return _invoke_command(command, parser, args, unknown)
  File "/opt/spack/lib/spack/spack/main.py", line 489, in _invoke_command
    return_val = command(parser, args)
  File "/opt/spack/lib/spack/spack/cmd/install.py", line 397, in install
    install_spec(args, kwargs, abstract, concrete)
  File "/opt/spack/lib/spack/spack/cmd/install.py", line 243, in install_spec
    spec.package.do_install(**kwargs)
  File "/opt/spack/lib/spack/spack/package.py", line 1476, in do_install
    builder.install(**kwargs)
  File "/opt/spack/lib/spack/spack/installer.py", line 1456, in install
    ','.join(task.uninstalled_deps)))
spack.installer.InstallError: Cannot proceed with openssl: 3 uninstalled dependencies: perl,zlib,gcc

The second time it is fine and installs the missing specs:

Additional information

  • I have run spack debug report and reported the version of Spack/Python/Platform
  • I have searched the issues of this repo and believe this is not a duplicate
  • I have run the failing commands in debug mode and reported the output

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingpipelinesIssues related to spack's pipeline featurestriageThe issue needs to be prioritized

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions