spk121 / guile-gi

Bindings for GObject Introspection and libgirepository for Guile
GNU General Public License v3.0
58 stars 7 forks source link

test/task.scm failure: "return pointer from a task run in thread" apparent PASS but actually crash the test suite #109

Open Jehan opened 3 years ago

Jehan commented 3 years ago

When running make test, it fails when in task.scm:

PASS: test/task.scm - return pointer from a task run in thread
/bin/sh: line 5: 26445 Segmentation fault      (core dumped) ./tools/uninstalled-test-env ./libtool -dlopen ./libguile-gi.la -dlopen ./test/libeverything-1.0.la -dlopen ./test/libmarshall-1.0.la -dlopen ./test/libextra-1.0.la --mode=execute /usr/bin/guile2.2 --no-auto-compile /home/jehan/dev/src/guile-gi/build-aux/test-driver.scm --test-name "$f" --log-file $b.log --trs-file $b.trs --color-tests "$am__color_tests" --enable-hard-errors "$am__enable_hard_errors" --expect-failure "$am__expect_failure" -- "$tst"
make[3]: *** [Makefile:2057: test/task.log] Error 139
make[3]: Leaving directory '/home/jehan/.local/share/crossroad/artifacts/native/gimp/guile-gi'
make[2]: *** [Makefile:2039: check-TESTS] Error 2
make[2]: Leaving directory '/home/jehan/.local/share/crossroad/artifacts/native/gimp/guile-gi'
make[1]: *** [Makefile:2248: check-am] Error 2
make[1]: Leaving directory '/home/jehan/.local/share/crossroad/artifacts/native/gimp/guile-gi'
make: *** [Makefile:2250: check] Error 2

The file task.log (attached) doesn't give much information other than the fact it seems to crash after outputting the contents of the ""cancel task and check cancellable"" test. If I remove this test, it fails on every next one, and even if I remove all the last test (just keeping (test-end "task") in the end), it still crashes.

Actually it turns out that the real culprit is the last to pass: "return pointer from a task run in thread". If I only remove this test, the whole test suite passes.

LordYuuma commented 3 years ago

Hmm, could it be, that some process is not cleaned up correctly? Try displaying the current process ID before and after "return pointer from task run in thread". If they're equal, everything should fine. If they're not, or the latter display is executed twice, we have an error.