spack / spack/spack

Race condition with sbang script

Open
#43,340 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug impact-low sbang
Dominant language
Python
Stars
5.1k
Forks
2.5k
Avg merge
3d 4h
Merged PRs (30d)
82

Description

Steps to reproduce
spack -e . env depfile -o Makefile
make -Orecurse -j $(($(nproc) + 1)) SPACK_INSTALL_FLAGS=--no-check-signature
Error message

https://github.com/celeritas-project/celeritas/actions/runs/8412724587/job/23033983101

==> Error: Failed to install gmake due to FileNotFoundError: [Errno 2] No such file or directory: '/opt/spack/bin/.sbang.tmp' -> '/opt/spack/bin/sbang'
spack -c config:install_status:false -e '/home/runner/work/celeritas/celeritas' install  --no-check-signature --only-concrete --only=package /r4bpehupffuwco7tz2xsupg27nezrtpw # gmake@4.4.1%clang@=15.0.7~guile build_system=generic arch=linux-ubuntu22.04-x86_64_v3
==> Error: gmake-4.4.1-r4bpehupffuwco7tz2xsupg27nezrtpw: Package was not installed
==> Error: Installation request failed.  Refer to reported errors for failing package(s).
make: *** [Makefile:24: /home/runner/work/celeritas/celeritas/.spack-env/makedeps/install/gmake-4.4.1-r4bpehupffuwco7tz2xsupg27nezrtpw] Error 1
make: *** Waiting for unfinished jobs....
Information on your system

ubuntu-22.04 on github:
968ad02473b12f6305cc1fe19f2a0d706f171154

General 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

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the failure with the shown parallel make and Spack environment commands, then inspect the sbang handling associated with /opt/spack/bin/sbang and .sbang.tmp. Done means parallel installation no longer raises the reported FileNotFoundError and the gmake target installs successfully.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
build-system
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.