spack: Hash error when trying to install or activate an environment
Updated to spack to v0.15. Rewrote the environment to comply to the new format. Tried to reinstall the environment and it fails part way through the installation of the environment. At that point it also fails to activate the environment.
Steps to reproduce the issue
./scripts/install_lbann.sh -d
spack env create lbann-dev-power9le /tmp/tmp.sNWlgHKVtI
==> Updating view at /autofs/nccs-svm1_home1/vanessen/spack.git/var/spack/environments/lbann-dev-power9le/.spack-env/view
==> Created environment 'lbann-dev-power9le' in /autofs/nccs-svm1_home1/vanessen/spack.git/var/spack/environments/lbann-dev-power9le
==> You can activate this environment with:
==> spack env activate lbann-dev-power9le
spack env activate -p lbann-dev-power9le
spack install
<some packages install>
...
==> Installing py-pytest
==> No binary for py-pytest found: installing from source
==> Fetching https://spack-llnl-mirror.s3-us-west-2.amazonaws.com/_source-cache/archive/1d/1d122e8be54d1a709e56f82e2d85dcba3018313d64647f38a91aec88c239b600.tar.gz
######################################################################## 100.0%
==> py-pytest: Executing phase: 'build'
==> py-pytest: Executing phase: 'install'
[+] /ccs/home/vanessen/spack_installed_packages/opt/spack/linux-rhel7-power9le/gcc-8.1.1/py-pytest-5.3.4-ln2l2mdp4jvtfctmfalqlzcjkomctj62
==> gcc@8.1.1 : has external module in ['gcc/8.1.1']
==> Error: '3easygztiqbtrszh4rxogt6wb5r7nvra'...
Error Message
vanessen@login4 [lbann.git] %> spack env activate lbann-dev-power9le
==> Error: '3easygztiqbtrszh4rxogt6wb5r7nvra'
vanessen@login4 [lbann.git] %> spack -d env activate lbann-dev-power9le
==> [2020-08-27-18:17:23.300408] Imported env from built-in commands
==> [2020-08-27-18:17:23.304057] Imported env from built-in commands
==> [2020-08-27-18:17:23.305158] Reading config file /autofs/nccs-svm1_home1/vanessen/spack.git/etc/spack/defaults/config.yaml
==> [2020-08-27-18:17:23.338516] Reading config file /ccs/home/vanessen/.spack/config.yaml
==> [2020-08-27-18:17:23.840768] Using environmennt 'lbann-dev-power9le'
==> [2020-08-27-18:17:23.841232] Reading config file /autofs/nccs-svm1_home1/vanessen/spack.git/var/spack/environments/lbann-dev-power9le/spack.yaml
==> [2020-08-27-18:17:24.030551] DATABASE LOCK TIMEOUT: 3s
==> [2020-08-27-18:17:24.030634] PACKAGE LOCK TIMEOUT: No timeout
Traceback (most recent call last):
File "/ccs/home/vanessen/spack.git/bin/spack", line 64, in <module>
sys.exit(spack.main.main())
File "/autofs/nccs-svm1_home1/vanessen/spack.git/lib/spack/spack/main.py", line 762, in main
return _invoke_command(command, parser, args, unknown)
File "/autofs/nccs-svm1_home1/vanessen/spack.git/lib/spack/spack/main.py", line 490, in _invoke_command
return_val = command(parser, args)
File "/autofs/nccs-svm1_home1/vanessen/spack.git/lib/spack/spack/cmd/env.py", line 509, in env
action(args)
File "/autofs/nccs-svm1_home1/vanessen/spack.git/lib/spack/spack/cmd/env.py", line 120, in env_activate
prompt=env_prompt if args.prompt else None
File "/autofs/nccs-svm1_home1/vanessen/spack.git/lib/spack/spack/environment.py", line 181, in activate
cmds += env.add_default_view_to_shell(shell)
File "/autofs/nccs-svm1_home1/vanessen/spack.git/lib/spack/spack/environment.py", line 1198, in add_default_view_to_shell
mods, errors = self._env_modifications_for_default_view()
File "/autofs/nccs-svm1_home1/vanessen/spack.git/lib/spack/spack/environment.py", line 1173, in _env_modifications_for_default_view
for _, spec in self.concretized_specs():
File "/autofs/nccs-svm1_home1/vanessen/spack.git/lib/spack/spack/environment.py", line 1351, in concretized_specs
yield (s, self.specs_by_hash[h])
KeyError: '3easygztiqbtrszh4rxogt6wb5r7nvra'
Information on your system
Additional information
- I have run
spack debug reportand 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
About this issue
- Original URL
- State: closed
- Created 6 years ago
- Comments: 22 (22 by maintainers)
@alalazo, Thank you for clarifying this 😃
FYI, removing the space after the module file names solved my issues.
Brian C. Van Essen vanessen1@llnl.gov (w) 925-422-9300 © 925-290-5470
I guess to be precise, I was using head of develop, not the explicit 0.15.4 release.
Brian C. Van Essen vanessen1@llnl.gov (w) 925-422-9300 © 925-290-5470