janet-lang / janet

A dynamic language and bytecode vm
https://janet-lang.org
MIT License
3.43k stars 221 forks source link

Commit dccb60b introduces a failure to return bug on Windows #1299

Closed CFiggers closed 10 months ago

CFiggers commented 10 months ago

Starting with commit dccb60ba35009812045d9006b3cc90adb6574e4d , Janet hangs on Windows when running janet bootstrap.janet to install janet-lang/jpm.

The issue arises from the exec-slurp function in jpm/shutil.janet. Starting with dccb60b, exec-slurp (which contains calls to os/spawn and ev/gather) never returns. Running the individual steps of that function with the same inputs at the REPL does not replicate the issue, but running the whole function at the REPL does.

This behavior was tested on Linux (Ubuntu 22.04 inside of WSL) with the most recent commit (51a75e1872e30e2d1ff7f8e7e293a20dd8e821e4), and the problem did not occur.

Rolling back to any commit prior to dccb60b (such as ae642ceca03cc2f7c98e446edeaccf2a3fc43a7e , the one immediately prior) seems to fix this issue.

sogaiu commented 10 months ago

Reproduced the hang here under Windows.

Seems fine since the commit got reverted. Tested with c708ff9708786f06744f92904dd5e2c0d2dd58a2.

CFiggers commented 10 months ago

Also tested and working with c708ff9 .

Thanks, @bakpakin ! Happy to close this one resolved.