janet-lang / spork

Various Janet utility modules - the official "Contrib" library.
MIT License
122 stars 35 forks source link

Hang during `jpm test` at `test/suit0002.janet` #184

Closed sogaiu closed 4 months ago

sogaiu commented 4 months ago

I noticed that (at least here) jpm test doesn't get beyond test/suite0002.janet with:

$ jpm test
compiling src/crc.c to build/src___crc.o...
generating meta file build/spork/rawterm.meta.janet...
compiling src/rawterm.c to build/src___rawterm.o...
compiling src/zip.c to build/src___zip.o...
compiling src/cmath.c to build/src___cmath.o...
compiling src/json.c to build/src___json.o...
generating meta file build/spork/json.meta.janet...
generating meta file build/spork/crc.meta.janet...
compiling src/utf8.c to build/src___utf8.o...
generating meta file build/spork/utf8.meta.janet...
compiling src/tarray.c to build/src___tarray.o...
generating meta file build/spork/tarray.meta.janet...
compiling deps/miniz/miniz.c to build/deps___miniz___miniz.o...
generating meta file build/spork/zip.meta.janet...
generating meta file build/spork/cmath.meta.janet...
creating native module build/spork/utf8.so...
compiling src/utf8.c to build/src___utf8.static.o...
compiling src/cmath.c to build/src___cmath.static.o...
creating native module build/spork/cmath.so...
compiling src/zip.c to build/src___zip.static.o...
creating static library build/spork/utf8.a...
creating native module build/spork/crc.so...
compiling src/crc.c to build/src___crc.static.o...
creating native module build/spork/rawterm.so...
compiling src/rawterm.c to build/src___rawterm.static.o...
creating static library build/spork/cmath.a...
creating native module build/spork/tarray.so...
compiling src/tarray.c to build/src___tarray.static.o...
creating native module build/spork/json.so...
compiling src/json.c to build/src___json.static.o...
creating static library build/spork/crc.a...
creating static library build/spork/tarray.a...
creating static library build/spork/rawterm.a...
creating static library build/spork/json.a...
creating native module build/spork/zip.so...
compiling deps/miniz/miniz.c to build/deps___miniz___miniz.static.o...
creating static library build/spork/zip.a...
running test/suite-cc.janet ...
test suite test/suite-cc.janet finished in 0.001 seconds - 12 of 12 tests passed.
running test/suite-crc.janet ...
test suite test/suite-crc.janet finished in 0.000 seconds - 7 of 7 tests passed.
running test/suite-cron.janet ...
test suite test/suite-cron.janet finished in 0.001 seconds - 5 of 5 tests passed.
running test/suite-fmt.janet ...
test suite test/suite-fmt.janet finished in 0.000 seconds - 7 of 7 tests passed.
running test/suite-json.janet ...
test suite test/suite-json.janet finished in 0.001 seconds - 34 of 34 tests passed.
running test/suite-math.janet ...
test suite test/suite-math.janet finished in 0.418 seconds - 354 of 354 tests passed.
running test/suite-mdz.janet ...
test suite test/suite-mdz.janet finished in 0.000 seconds - 35 of 35 tests passed.
running test/suite-misc.janet ...
test suite test/suite-misc.janet finished in 0.000 seconds - 9 of 9 tests passed.
running test/suite-pgp.janet ...
test suite test/suite-pgp.janet finished in 0.000 seconds - 10 of 10 tests passed.
running test/suite-randgen.janet ...
test suite test/suite-randgen.janet finished in 0.009 seconds - 26 of 26 tests passed.
running test/suite-zip.janet ...
test suite test/suite-zip.janet finished in 0.000 seconds - 1 of 1 tests passed.
running test/suite0002.janet ...

The line that seems to stall(?) is this one.

This was reproduced using Ubuntu 22.04.4 and Void Linux (latest?).

Also, I tried with a system install as well as a PREFIX=$HOME/.local install with the same results.

Will do a bit more investigation.

sogaiu commented 4 months ago

Taking a hint from this comment, I gave the mentioned two commits:

The former (8c0d65c) did not lead to a stall, but the latter (5f2e287) did.

sogaiu commented 4 months ago

Closing this as the latest commit e2a8951 for Janet at the time of this writing doesn't exhibit this issue locally.