elm / compiler

Compiler for Elm, a functional language for reliable webapps.
https://elm-lang.org/
BSD 3-Clause "New" or "Revised" License
7.54k stars 663 forks source link

thread blocked indefinitely in an MVar operation #2134

Closed Grohden closed 4 years ago

Grohden commented 4 years ago

Quick Summary: Just started with elm today, been following tutorials but I think I may have found a bug.

I recently acquired a new external ssd driver for my mac, and it seems that a simple elm project on that driver compiles fine, but reports an error at the end:

➜  frontend-elm git:(master) ✗ cd "/Volumes/Extreme SSD/repo-tagger/frontend-elm"
➜  frontend-elm git:(master) ✗ elm make src/Main.elm
Dependencies ready!         
Compiling ...elm: elm: /Volumes/Extreme SSD/repo-tagger/frontend-elm/elm-stuff/0.19.1/i.dat: openBinaryFile: resource busy (file is locked)/Volumes/Extreme SSD/repo-tagger/frontend-elm/elm-stuff/0.19.1/o.dat: openBinaryFile: resource busy (file is locked)

Success! Compiled 1 module.

    Main ───> index.html

-- ERROR -----------------------------------------------------------------------

I ran into something that bypassed the normal error reporting process! I
extracted whatever information I could from the internal error:

>   thread blocked indefinitely in an MVar operation

These errors are usually pretty confusing, so start by asking around on one of
forums listed at https://elm-lang.org/community to see if anyone can get you
unstuck quickly.

-- REQUEST ---------------------------------------------------------------------

If you are feeling up to it, please try to get your code down to the smallest
version that still triggers this message. Ideally in a single Main.elm and
elm.json file.

From there open a NEW issue at https://github.com/elm/compiler/issues with your
reduced example pasted in directly. (Not a link to a repo or gist!) Do not worry
about if someone else saw something similar. More examples is better!

This kind of error is usually tied up in larger architectural choices that are
hard to change, so even when we have a couple good examples, it can take some
time to resolve in a solid way.elm: thread blocked indefinitely in an MVar operation
➜  frontend-elm git:(master) ✗ 

Elm reactor output (first time opened):

➜  frontend-elm git:(master) ✗ rm -rf elm-stuff
➜  frontend-elm git:(master) ✗ elm reactor     
Go to http://localhost:8000 to see your project dashboard.
elm: /Volumes/Extreme SSD/repo-tagger/frontend-elm/elm-stuff/0.19.1/i.dat: openBinaryFile: resource busy (file is locked)
elm: /Volumes/Extreme SSD/repo-tagger/frontend-elm/elm-stuff/0.19.1/o.dat: openBinaryFile: resource busy (file is locked)

The same sources copied to my desktop folder compile fine:

➜  frontend-elm git:(master) ✗ cd ~/Desktop/frontend-elm 
➜  frontend-elm elm make src/Main.elm
Success! Compiled 1 module.

    Main ───> index.html

SSCCE

Additional Details

This may not be elm's fault, maybe it's some weird apple stuff with the driver's fs 🤔

Edit: The driver format is ExFAT, I'm gonna test some other fs format to see if it has something to do with that

github-actions[bot] commented 4 years ago

Thanks for reporting this! To set expectations:

Finally, please be patient with the core team. They are trying their best with limited resources.

Grohden commented 4 years ago

The driver format is ExFAT, I'm gonna test some other fs format to see if it has something to do with that

Yep, that seemed to be the problem, I've reformatted the driver with APFS and elm now compiles the file fine.

Not sure if support for ExFAT is desirable, so I'm gonna close this one, feel free to reopen it if needed