# Nix-daemon hangs while building an obelisk/reflex-frp project

**URL:** https://discourse.nixos.org/t/nix-daemon-hangs-while-building-an-obelisk-reflex-frp-project/13028
**Category:** Development
**Created:** [May 12, 2021, 5:04am UTC](https://discourse.nixos.org/t/nix-daemon-hangs-while-building-an-obelisk-reflex-frp-project/13028 "2021-05-12T05:04:39Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![rubenmoor](https://discourse.nixos.org/user_avatar/discourse.nixos.org/rubenmoor/32/3631_2.png) [@rubenmoor](https://discourse.nixos.org/u/rubenmoor)
#### Post date: [May 12, 2021, 5:04am UTC](https://discourse.nixos.org/t/nix-daemon-hangs-while-building-an-obelisk-reflex-frp-project/13028/1 "2021-05-12T05:04:40Z")

</div>

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](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.

---

<div class="post-metadata">

### Author: ![thufschmitt](https://discourse.nixos.org/user_avatar/discourse.nixos.org/thufschmitt/32/202_2.png) [@thufschmitt](https://discourse.nixos.org/u/thufschmitt)
#### Post date: [May 12, 2021, 6:53am UTC](https://discourse.nixos.org/t/nix-daemon-hangs-while-building-an-obelisk-reflex-frp-project/13028/2 "2021-05-12T06:53:31Z")

</div>

My first try would be to get the exact derivation `obs` is trying to build, and

1. `nix-build` it with `-vvv` (or even more verbose) to see whether anything’s happening in the logs
2. `nix-build` it as root to bypass the daemon to see whether the issue is related to the using the daemon or not.

---

<div class="post-metadata">

### Author: ![rubenmoor](https://discourse.nixos.org/user_avatar/discourse.nixos.org/rubenmoor/32/3631_2.png) [@rubenmoor](https://discourse.nixos.org/u/rubenmoor)
#### Post date: [May 13, 2021, 3:28pm UTC](https://discourse.nixos.org/t/nix-daemon-hangs-while-building-an-obelisk-reflex-frp-project/13028/3 "2021-05-13T15:28:30Z")

</div>

Your modest advice to run `nix-build` mit `-vvv` helped a lot, this is the output:

```auto
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.

---

<div class="post-metadata">

### Author: ![rubenmoor](https://discourse.nixos.org/user_avatar/discourse.nixos.org/rubenmoor/32/3631_2.png) [@rubenmoor](https://discourse.nixos.org/u/rubenmoor)
#### Post date: [May 13, 2021, 3:32pm UTC](https://discourse.nixos.org/t/nix-daemon-hangs-while-building-an-obelisk-reflex-frp-project/13028/4 "2021-05-13T15:32:43Z")

</div>

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)?

---

<div class="post-metadata">

### Author: ![rubenmoor](https://discourse.nixos.org/user_avatar/discourse.nixos.org/rubenmoor/32/3631_2.png) [@rubenmoor](https://discourse.nixos.org/u/rubenmoor)
#### Post date: [May 24, 2021, 9:42pm UTC](https://discourse.nixos.org/t/nix-daemon-hangs-while-building-an-obelisk-reflex-frp-project/13028/5 "2021-05-24T21:42:14Z")

</div>

I fixed the issue by moving to a conventional hard drive.
