target / lorri

Your project's nix-env
Apache License 2.0
993 stars 69 forks source link

Lorri hangs when starting (f2d_register_rpc error) #103

Closed luc-tielen closed 4 years ago

luc-tielen commented 5 years ago

Hi,

I came across this error on MacOSX when working on https://github.com/tweag/ormolu/pull/122 :

$ lorri watch
Started
2019-06-21 16:39 lorri[90059] (FSEvents.framework) FSEventStreamStart: register_with_server: ERROR: f2d_register_rpc() => (null) (-22)
2019-06-21 16:39 lorri[90059] (FSEvents.framework) FSEventStreamStart: register_with_server: ERROR: f2d_register_rpc() => (null) (-22)
2019-06-21 16:39 lorri[90059] (FSEvents.framework) FSEventStreamStart: register_with_server: ERROR: f2d_register_rpc() => (null) (-22)
...

1 CPU is constantly at 100%, and screen is filled with that error.

Steps to reproduce:

$ git clone https://github.com/luc-tielen/ormolu
$ cd ormolu
$ git checkout 1f6620489733f3a2ef21ddbee228a2f7da8bcd27
$ lorri watch

If I checkout the commit before (51e1443a8f6da53d5fd8f42215634b13a5f149c9), then lorri still works.

I have no clue what happens here, maybe some nix code is not supported yet by lorri?

Profpatsch commented 5 years ago

https://github.com/fsevents/fsevents/issues/129#issuecomment-309122604

You are watching too many files and the MacOS fsevent API is bad.

Related issue probably: https://github.com/target/lorri/issues/58

Profpatsch commented 5 years ago

I pushed a PR that might solve this issue: https://github.com/target/lorri/pull/146

If it’s not too much of a bother, can you try again with a lorri from this branch? You can update lorri to that branch by:

$ git clone https://github.com/target/lorri
$ cd lorri
$ git checkout origin/builder-default.nix-logic
$ lorri self-upgrade local $(pwd)
luc-tielen commented 5 years ago

I ran your commands, but I seem to still have the issue for that specific commit (see original PR, commit 6b73283 for example, only need to run lorri watch)? I noticed that on a recent commit the problem is gone anyway, so it's ok for me now.

Profpatsch commented 5 years ago

(see original PR, commit 6b73283 for example, only need to run lorri watch)?

I’m trying to reproduce this issue on a Macbook, but I can’t check out that commit, can you push a branch with it by any chance?

luc-tielen commented 5 years ago

Here you go: https://github.com/luc-tielen/ormolu/tree/broken-lorri

Profpatsch commented 5 years ago

Hm, I can’t reproduce on MacOS, it only watches the files I give it. But when I try on Linux, it tries to watch my whole /home oO.

Profpatsch commented 4 years ago

We finally found out what caused this!

Continuing in this issue: https://github.com/target/lorri/issues/211#issuecomment-555026353