Tabling: Core dump

While looking at XSB interned terms;
with the following program:

:- table bas/2.
bas --> "b".
bas --> bas, "a".

And the following query:

2 ?- length(As,10 000),maplist(=(0'a),As), time(bas([0'b|As],A)).
% 120,064 inferences, 2.702 CPU in 2.706 seconds (100% CPU, 44431 Lips)
As = A, A = [97, 97, 97, 97, 97, 97, 97, 97, 97|...] ;
[Thread 1 (main) at Wed Jun 19 22:16:03 2019] ../src/pl-gc.c:936: mark_variable: Asserti
on failed: onStack(global, current)
C-stack trace labeled "assert_fail":
  [0] save_backtrace() at :? [0x7f62eae4aadf]
  [1] __assert_fail() at ??:? [0x7f62eae7f1c6]
  [2] mark_variable() at :? [0x7f62eaede96f]
  [3] garbageCollect() at :? [0x7f62eaee35d2]
  [4] makeMoreStackSpace() at :? [0x7f62eaee4d60]
  [5] trie_gen() at :? [0x7f62eae7a274]
  [6] pl_tbl_answer_update_dl2_va.lto_priv.0() at :? [0x7f62eae7a474]
  [7] PL_next_solution() at ??:? [0x7f62eaf075bc]
  [8] query_loop() at :? [0x7f62eaecc192]
  [9] prologToplevel() at :? [0x7f62eaecc26b]
  [10] PL_toplevel() at ??:? [0x7f62eaf18cae]
  [11] swipl(+0x1075) [0x5600d6a4b075]
  [12] __libc_start_main() at ??:? [0x7f62eac36ee3]
  [13] swipl(+0x10be) [0x5600d6a4b0be]
[FATAL ERROR: at Wed Jun 19 22:16:03 2019
        Received signal 6 (abrt) while in 3-th garbage collection]
[1]    15779 abort (core dumped)  swipl

We get a core dump by pressing ; after the first answer.

1 Like

You’re doing well :slight_smile: Thanks. I’ll try to fix it today (as well as the other one). It will take some time before tabling reaches the level of integration, stability and scalability of the rest of the system :frowning: