I am developing an obelisk project. Obelisk offers a development tool: ob run
, that hot-reloads and reveals any error in the code. Relying on ob run
, however, resulted in this situation where my code supposedly works fine, only I can’t deploy.
I do ob deploy push -v
or nix-build -A exe --verbose
and my obelisk project won’t be build. Instead, the nix-daemon
process hangs, using 100% of CPU time until I hit CTRL-C. I had my computer run over night once to rule out that the build process just takes that much time.
I am slowly running out of ideas. The related issue in the obelisk platform is stale. Apparently I am the only one experiencing the issue:
https://github.com/obsidiansystems/obelisk/issues/855
I moved to a different system (from my laptop computer to a desktop) where I installed NixOS, too, and it seemed to work. It turns out, though, that it doesn’t work on either system. Only certain test cases where I selectively add packages to the ob init
example project worked on the desktop system.
My next step will be to install debian, to see whether or not this problem is specific to NixOS.
Regarding a locked nix-daemon process, I only found issues from years ago. This doesn’t seem to be common at all.
My first try would be to get the exact derivation obs
is trying to build, and
-
nix-build
it with -vvv
(or even more verbose) to see whether anything’s happening in the logs
-
nix-build
it as root to bypass the daemon to see whether the issue is related to the using the daemon or not.
1 Like
Your modest advice to run nix-build
mit -vvv
helped a lot, this is the output:
building of '/nix/store/njiphyrb4xcnnckclvv0r2ns65yipnkp-mmorph-1.1.3.tar.gz.drv': woken up
building of '/nix/store/nsncr60fii4fwki70bb5ishf1hzq89b5-coreutils-8.31.drv': created
building of '/nix/store/nsncr60fii4fwki70bb5ishf1hzq89b5-coreutils-8.31.drv': woken up
building of '/nix/store/pvq34lb5r34bypfl53hx8kibakzqw7fc-gnused-4.7.drv': created
building of '/nix/store/pvq34lb5r34bypfl53hx8kibakzqw7fc-gnused-4.7.drv': woken up
building of '/nix/store/xr4aygslk3lqdz9wnsq04vpbm4v68vk5-glibc-locales-2.27.drv': created
building of '/nix/store/xr4aygslk3lqdz9wnsq04vpbm4v68vk5-glibc-locales-2.27.drv': woken up
building of '/nix/store/m3dzp25n0g4fwlygdhvak1kk8xz906n9-bash-4.4-p23.drv': init
building of '/nix/store/m3dzp25n0g4fwlygdhvak1kk8xz906n9-bash-4.4-p23.drv': loading derivation
acquiring write lock on '/nix/var/nix/temproots/21932'
downgrading to read lock on '/nix/var/nix/temproots/21932'
building of '/nix/store/m3dzp25n0g4fwlygdhvak1kk8xz906n9-bash-4.4-p23.drv': have derivation
acquiring write lock on '/nix/var/nix/temproots/21932'
downgrading to read lock on '/nix/var/nix/temproots/21932'
acquiring write lock on '/nix/var/nix/temproots/21932'
downgrading to read lock on '/nix/var/nix/temproots/21932'
acquiring write lock on '/nix/var/nix/temproots/21932'
downgrading to read lock on '/nix/var/nix/temproots/21932'
acquiring write lock on '/nix/var/nix/temproots/21932'
downgrading to read lock on '/nix/var/nix/temproots/21932'
acquiring write lock on '/nix/var/nix/temproots/21932'
downgrading to read lock on '/nix/var/nix/temproots/21932'
So I suspect a locking problem.
I don’t know how to go on from there, though.
And using Google, I still can’t find anyone else with a similar problem. Do you have an idea where my problem might originate?
Could it even be my hardware (nvme ssd)?
I fixed the issue by moving to a conventional hard drive.