# Tabling: Core dump

**URL:** <https://swi-prolog.discourse.group/t/tabling-core-dump/839>\
**Category:** Help!\
**Created:** [June 20, 2019, 2:24am UTC](https://swi-prolog.discourse.group/t/tabling-core-dump/839 "2019-06-20T02:24:53Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![swi](https://avatars.discourse-cdn.com/v4/letter/s/51bf81/32.png) [@swi](https://swi-prolog.discourse.group/u/swi)\
**Post date:** [June 20, 2019, 2:24am UTC](https://swi-prolog.discourse.group/t/tabling-core-dump/839/1 "2019-06-20T02:24:53Z")

</div>

While looking at [XSB interned terms](http://xsb.sourceforge.net/manual1/manual1.pdf#subsection.5.2.2);  
with the following program:

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

```

And the following query:

```prolog
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.

---

<div class="post-metadata">

**Author:** ![jan](https://yyz2.discourse-cdn.com/free1/user_avatar/swi-prolog.discourse.group/jan/32/4_2.png) [@jan](https://swi-prolog.discourse.group/u/jan)\
**Post date:** [June 20, 2019, 7:32am UTC](https://swi-prolog.discourse.group/t/tabling-core-dump/839/2 "2019-06-20T07:32:02Z")

</div>

You’re doing well 🙂 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 ☹
