Since quite long, there are irregular crashes in clause/2,3 that produce roughly the stack trace below (on platforms that support symbolic crash reports). The call to PL_unify_compound
inside decompile_head___LD
distinguished this thread. This crash happens regularly in SWISH. I’m keen to find it, but neither code review, nor the usual stack of tricks to reproduce it have been successful. If you have a program that sometimes shows this bug that is not a web server where we have to hope it will happen, please contact me.
Thanks --- Jan
Nov 27 10:53:08 swish swipl[28471]: [Thread 13 () at Sun Nov 27 10:53:08 2022] ../src/pl-gc.c:970: mark_variable___LD: Assertion failed: onStack(global, current)
Nov 27 10:53:08 swish swipl[28471]: C-stack trace labeled "assert_fail":
Nov 27 10:53:08 swish swipl[28471]: [0] save_backtrace() at /home/swish/src/swipl-devel/build/../src/os/pl-cstack.c:337 [0x7fc1cea44b98]
Nov 27 10:53:08 swish swipl[28471]: [1] __assert_fail() at /home/swish/src/swipl-devel/build/../src/pl-assert.c:103 [0x7fc1cea02f24]
Nov 27 10:53:08 swish swipl[28471]: [2] mark_variable___LD() at /home/swish/src/swipl-devel/build/../src/pl-gc.c:970 [0x7fc1cea6a49e]
Nov 27 10:53:08 swish swipl[28471]: [3] mark_term_refs() at /home/swish/src/swipl-devel/build/../src/pl-gc.c:1031 [0x7fc1cea9ef30]
Nov 27 10:53:08 swish swipl[28471]: [4] f_ensureStackSpace___LD() at /home/swish/src/swipl-devel/build/../src/pl-gc.c:4659 [0x7fc1cea9e690]
Nov 27 10:53:08 swish swipl[28471]: [5] PL_unify_compound() at /home/swish/src/swipl-devel/build/../src/pl-fli.c:2923 [0x7fc1cea92296]
Nov 27 10:53:09 swish swipl[28471]: [6] decompile_head___LD() at /home/swish/src/swipl-devel/build/../src/pl-comp.c:5316 (discriminator 1) [0x7fc1ce9b3538]
Nov 27 10:53:09 swish swipl[28471]: [7] decompile() at /home/swish/src/swipl-devel/build/../src/pl-comp.c:5515 [0x7fc1ce9b30aa]
Nov 27 10:53:09 swish swipl[28471]: [8] clause() at /home/swish/src/swipl-devel/build/../src/pl-comp.c:6595 [0x7fc1ce9b2e42]
Nov 27 10:53:09 swish swipl[28471]: [9] pl_clauseva_va() at /home/swish/src/swipl-devel/build/../src/pl-comp.c:6729 [0x7fc1cea9b522]
Nov 27 10:53:09 swish swipl[28471]: [10] PL_next_solution___LD() at /home/swish/src/swipl-devel/build/../src/pl-vmi.c:4794 [0x7fc1cea4f6c5]
Nov 27 10:53:09 swish swipl[28471]: [11] exception_hook___LD() at /home/swish/src/swipl-devel/build/../src/pl-wam.c:2204 [0x7fc1ce9988ce]
Nov 27 10:53:09 swish swipl[28471]: [12] callProlog() at /home/swish/src/swipl-devel/build/../src/pl-pro.c:468 [0x7fc1ceaa60ad]
Nov 27 10:53:09 swish swipl[28471]: [13] start_thread() at /home/swish/src/swipl-devel/build/../src/pl-thread.c:1954 [0x7fc1ce9f2751]
Nov 27 10:53:09 swish swipl[28471]: [14] start_thread() at /build/glibc-CVJwZb/glibc-2.27/nptl/pthread_create.c:463 [0x7fc1ccf556db]
Nov 27 10:53:09 swish swipl[28471]: [15] clone() at /build/glibc-CVJwZb/glibc-2.27/misc/../sysdeps/unix/sysv/linux/x86_64/clone.S:97 [0x7fc1ce6a161f]
Nov 27 10:53:09 swish swipl[28471]: [FATAL ERROR: at Sun Nov 27 10:53:09 2022
Nov 27 10:53:09 swish swipl[28471]: Received signal 6 (abrt) while in 3-th garbage collection]