Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

devenv up stuck #1525

Open
MarceColl opened this issue Oct 15, 2024 · 15 comments
Open

devenv up stuck #1525

MarceColl opened this issue Oct 15, 2024 · 15 comments
Labels
bug Something isn't working

Comments

@MarceColl
Copy link

Describe the bug
When I run devenv up in a brand new arch linux machine it gets stuck and never finishes at the Building shell stage. The same devenv.nix works in a separate arch linux machine, also up-to-date.

To reproduce
Devenv files: https://gist.github.com/MarceColl/bf5f924cb23b16f2efab99ac5775f451

[seikaku@seikaku seikaku]$ uname -a
Linux seikaku 6.6.52-1-lts #1 SMP PREEMPT_DYNAMIC Wed, 18 Sep 2024 19:02:04 +0000 x86_64 GNU/Linux

I also need --max-jobs=4 in this case for some reason.

[seikaku@seikaku seikaku]$ devenv up --max-jobs=4
• Building processes ...
• Using Cachix: devenv
these 3 derivations will be built:
  /nix/store/q37ckd0zi65qfzkzvzs38akxhbijl3ki-devenv-profile.drv
  /nix/store/8l7v5p81gsfb3zlf27r4sadnabr19nw9-process-compose.yaml.drv
  /nix/store/7zd2ysl9i2fgxrk9gk2drs2v159kxh21-devenv-up.drv
building '/nix/store/q37ckd0zi65qfzkzvzs38akxhbijl3ki-devenv-profile.drv'
created 833 symlinks in user environment
building '/nix/store/8l7v5p81gsfb3zlf27r4sadnabr19nw9-process-compose.yaml.drv'
building '/nix/store/7zd2ysl9i2fgxrk9gk2drs2v159kxh21-devenv-up.drv'
✔ Building processes in 6.1s.
• Starting processes ...
• Building shell ...
building '/nix/store/vjzm8xxzjg7x0y6xkfykndyiqlgxywmy-devenv-shell-env.drv'

User seikaku is part of nixbld.

[seikaku@seikaku seikaku]$ groups
wheel nixbld seikaku

Version

devenv 1.3.0 (x86_64-linux)
@MarceColl MarceColl added the bug Something isn't working label Oct 15, 2024
@sandydoo
Copy link
Member

Does devenv shell work? Also, run it with the --verbose flag to see the nix command it gets stuck on.

@MarceColl
Copy link
Author

Sorry, I'm super sleep deprived, I wanted to send this part as well, it gets stuck on

devenv readFile: '«github:cachix/devenv/ef61728d91ad5eb91f86cdbcc16070602e7afa16»/src/modules/latest-version'

Both devenv shell and devenv up get stuck in the same place.

@domenkozar
Copy link
Member

I also need --max-jobs=4 in this case for some reason.

Does this mean it only reproduces with 4?

@MarceColl
Copy link
Author

MarceColl commented Oct 15, 2024

It always happens, but if I try it without setting --max-jobs it complains that it cannot build before it even reaches that point.

[seikaku@seikaku seikaku]$ devenv up       
• Building processes ...
• Using Cachix: devenv
these 2 derivations will be built:
  /nix/store/g083qjcf324snh6xx08wfj0gsdjj5qn8-process-compose.yaml.drv
  /nix/store/0iy6yfgp4w2k91dajppgsbic1pchir2h-devenv-up.drv
error:
       error:
                           Unable to start any build;
                           either increase '--max-jobs' or enable remote builds.

                           For more information run 'man nix.conf' and search for '/machines'.
✔ Building processes in 5.3s.
Error:   × Failed to run command `/nix/store/kqn8clfzc13gnqbav7l13r9w7xick9lr-nix-2.24-devenv/bin/nix --show-trace --extra-experimental-features nix-command --extra-experimental-features flakes --option warn-dirty false --keep-going --max-jobs 0 --option
  │ eval-cache false --option extra-substituters https://devenv.cachix.org --option extra-trusted-public-keys devenv.cachix.org-1:w1cLUi8dv3hnoSPGAuibQv+f9TZLr6cv/Hm9XgU50cw= build --no-link --print-out-paths .#procfileScript -vv --log-format
  │ internal-json`
  ╰─▶ Nix command failed: exit status: 1

@sandydoo
Copy link
Member

The max-jobs issue is a bug on our end. We'll push a fix for it.

In verbose mode, before the Nix output and the line that hangs, there should be a really long Nix command. That's the command it's running. Try running copy-pasting that and running it separately. It might have a hint for us.

@MarceColl
Copy link
Author

MarceColl commented Oct 15, 2024

Sure, the command previous to the failure is

Running command: /nix/store/kqn8clfzc13gnqbav7l13r9w7xick9lr-nix-2.24-devenv/bin/nix --show-trace --extra-experimental-features nix-command --extra-experimental-features flakes --option warn-dirty false --keep-going --max-jobs 4 --option eval-cache false eval --json .#devenv.processes

@domenkozar
Copy link
Member

Pushed a fix for max_jobs in dc7ebaf

@domenkozar
Copy link
Member

Sure, the command previous to the failure is

Running command: /nix/store/kqn8clfzc13gnqbav7l13r9w7xick9lr-nix-2.24-devenv/bin/nix --show-trace --extra-experimental-features nix-command --extra-experimental-features flakes --option warn-dirty false --keep-going --max-jobs 4 --option eval-cache false eval --json .#devenv.processes

Does it work if you run it manually?

@MarceColl
Copy link
Author

Looks like it:

$ /nix/store/kqn8clfzc13gnqbav7l13r9w7xick9lr-nix-2.24-devenv/bin/nix --show-trace --extra-experimental-features nix-command --extra-experimental-features flakes --option warn-dirty false --keep-going --max-jobs 4 --option eval-cache false eval --json .#devenv.processes
{"postgres":{"exec":"exec /nix/store/wc19qmf9xsry7z9nlcpp9mrwgblcypmj-start-postgres/bin/start-postgres","process-compose":{"availability":{"restart":"on_failure"},"readiness_probe":{"exec":{"command":"/nix/store/b2629mw4kzz7av7m1w9y9g3l103wg2ll-postgresql-15.6/bin/pg_isready -d template1"},"failure_threshold":5,"initial_delay_seconds":2,"period_seconds":10,"success_threshold":1,"timeout_seconds":4},"shutdown":{"signal":2}}}}
[seikaku@seikaku seikaku]$ echo $?
0

@sandydoo
Copy link
Member

Are there more in there? Is there one with the command develop in it?

@MarceColl
Copy link
Author

Nope, no nix call with develop in it

@domenkozar
Copy link
Member

@MarceColl What command hangs if you do devenv --verbose shell? Can you run it manually?

@MarceColl
Copy link
Author

[seikaku@seikaku seikaku]$ devenv -v shell 2>&1 | grep command
• Running command: /nix/store/kqn8clfzc13gnqbav7l13r9w7xick9lr-nix-2.24-devenv/bin/nix --show-trace --extra-experimental-features nix-command --extra-experimental-features flakes --option warn-dirty false --keep-going --max-jobs 0 --option eval-cache false eval --json .#devenv.cachix
• Running command: /nix/store/kqn8clfzc13gnqbav7l13r9w7xick9lr-nix-2.24-devenv/bin/nix --show-trace --extra-experimental-features nix-command --extra-experimental-features flakes --option warn-dirty false --keep-going --max-jobs 0 --option eval-cache false store ping --json
• Running command: /nix/store/kqn8clfzc13gnqbav7l13r9w7xick9lr-nix-2.24-devenv/bin/nix --show-trace --extra-experimental-features nix-command --extra-experimental-features flakes --option warn-dirty false --keep-going --max-jobs 0 --option eval-cache false --option extra-substituters https://devenv.cachix.org --option extra-trusted-public-keys devenv.cachix.org-1:w1cLUi8dv3hnoSPGAuibQv+f9TZLr6cv/Hm9XgU50cw= print-dev-env --profile /home/seikaku/seikaku/.devenv/gc/shell

@domenkozar
Copy link
Member

@MarceColl if you run the last command manually, does it complete?

@domenkozar
Copy link
Member

@MarceColl please book a slot at https://calendly.com/domenkozar and we'll dive into this 1:1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants