unofficial mirror of bug-guile@gnu.org 
 help / color / mirror / Atom feed
From: Linas Vepstas <linasvepstas@gmail.com>
To: 25386@debbugs.gnu.org
Subject: bug#25386: calling gc too often triggers a crash
Date: Sun, 8 Jan 2017 15:55:38 -0600	[thread overview]
Message-ID: <CAHrUA35MhXt_wt_ECj9bfoCF7-rWaG=9OVonqTdo379i6JO+kQ@mail.gmail.com> (raw)
In-Reply-To: <CAHrUA36ZAxeC1nYZQfTLBXGDK1XciNHkEafPuQ+VqzZXASOwcw@mail.gmail.com>

Since above works so swimmingly in the bove example, I tried it in a
production system.  Calling gc shortly before thread exit results in a
crash, always the same crash, always in under 20 minutes:

guile: hashtab.c:137: vacuum_weak_hash_table: Assertion `removed <= len'
failed.
Aborted

again, this is for guile -v
guile (GNU Guile) 2.0.11
Packaged by Debian (2.0.11-deb+1-10)

Perhaps this is fixed in 2.0.13 ???

guile: hashtab.c:137: vacuum_weak_hash_table: Assertion `removed <= len' failed.

Thread 1416 "guile" received signal SIGABRT, Aborted.
[Switching to Thread 0x7ffe7b7fe700 (LWP 29883)]
0x00007ffff749e428 in __GI_raise (sig=sig@entry=6)
    at ../sysdeps/unix/sysv/linux/raise.c:54
54      ../sysdeps/unix/sysv/linux/raise.c: No such file or directory.
(gdb) bt
#0  0x00007ffff749e428 in __GI_raise (sig=sig@entry=6)
    at ../sysdeps/unix/sysv/linux/raise.c:54
#1  0x00007ffff74a002a in __GI_abort () at abort.c:89
#2  0x00007ffff7496bd7 in __assert_fail_base (fmt=<optimized out>,
    assertion=assertion@entry=0x7ffff7b5f7a2 "removed <= len",
    file=file@entry=0x7ffff7b5f798 "hashtab.c", line=line@entry=137,
    function=function@entry=0x7ffff7b5ff60 "vacuum_weak_hash_table")
    at assert.c:92
#3  0x00007ffff7496c82 in __GI___assert_fail (
    assertion=0x7ffff7b5f7a2 "removed <= len",
    file=0x7ffff7b5f798 "hashtab.c", line=137,
    function=0x7ffff7b5ff60 "vacuum_weak_hash_table") at assert.c:101
#4  0x00007ffff7ac3108 in ?? ()
   from /usr/lib/x86_64-linux-gnu/libguile-2.0.so.22
#5  0x00007ffff7ac31af in ?? ()
   from /usr/lib/x86_64-linux-gnu/libguile-2.0.so.22
#6  0x00007ffff7ac5b1c in scm_c_hook_run ()
   from /usr/lib/x86_64-linux-gnu/libguile-2.0.so.22
#7  0x00007ffff7207ff5 in GC_try_to_collect_inner ()
   from /usr/lib/x86_64-linux-gnu/libgc.so.1
#8  0x00007ffff72082aa in GC_try_to_collect_general ()
   from /usr/lib/x86_64-linux-gnu/libgc.so.1
#9  0x00007ffff720838d in GC_gcollect ()
   from /usr/lib/x86_64-linux-gnu/libgc.so.1
#10 0x00007ffff7ab9109 in scm_gc ()
   from /usr/lib/x86_64-linux-gnu/libguile-2.0.so.22
#11 0x00007ffff7b3402b in ?? ()
   from /usr/lib/x86_64-linux-gnu/libguile-2.0.so.22
#12 0x00007ffff7aab107 in scm_call_1 ()
   from /usr/lib/x86_64-linux-gnu/libguile-2.0.so.22
#13 0x00007ffff7b34093 in ?? ()
   from /usr/lib/x86_64-linux-gnu/libguile-2.0.so.22
#14 0x00007ffff7aab21e in scm_call_3 ()
   from /usr/lib/x86_64-linux-gnu/libguile-2.0.so.22
#15 0x00007ffff7b34093 in ?? ()
   from /usr/lib/x86_64-linux-gnu/libguile-2.0.so.22
#16 0x00007ffff7aab283 in scm_call_4 ()
   from /usr/lib/x86_64-linux-gnu/libguile-2.0.so.22
#17 0x00007fffefb90d79 in
opencog::SchemeEval::do_eval(std::__cxx11::basic_string<char,
std::char_traits<char>, std::allocator<char> > const&) (
    this=0x7ffe74000980, expr=...)
    at /home/ubuntu/src/atomspace/opencog/guile/SchemeEval.cc:564
#18 0x00007fffefb90e2a in opencog::SchemeEval::c_wrap_eval(void*) (
    p=0x7ffe74000980)
    at /home/ubuntu/src/atomspace/opencog/guile/SchemeEval.cc:493
#19 0x00007ffff7aa158a in ?? ()
   from /usr/lib/x86_64-linux-gnu/libguile-2.0.so.22
#20 0x00007ffff7b34093 in ?? ()
   from /usr/lib/x86_64-linux-gnu/libguile-2.0.so.22
#21 0x00007ffff7aab283 in scm_call_4 ()
   from /usr/lib/x86_64-linux-gnu/libguile-2.0.so.22
#22 0x00007ffff7aa1d21 in ?? ()
   from /usr/lib/x86_64-linux-gnu/libguile-2.0.so.22
#23 0x00007ffff7aa1e05 in scm_c_with_continuation_barrier ()
   from /usr/lib/x86_64-linux-gnu/libguile-2.0.so.22
#24 0x00007ffff72198e7 in GC_call_with_gc_active ()
   from /usr/lib/x86_64-linux-gnu/libgc.so.1
#25 0x00007ffff7b21c01 in ?? ()
   from /usr/lib/x86_64-linux-gnu/libguile-2.0.so.22
#26 0x00007ffff7213952 in GC_call_with_stack_base ()
   from /usr/lib/x86_64-linux-gnu/libgc.so.1
#27 0x00007ffff7b21fe8 in scm_with_guile ()
   from /usr/lib/x86_64-linux-gnu/libguile-2.0.so.22
#28 0x00007fffefb90eae in
opencog::SchemeEval::eval_expr(std::__cxx11::basic_string<char,
std::char_traits<char>, std::allocator<char> > const&) (
    this=0x7ffe74000980, expr=...)
    at /home/ubuntu/src/atomspace/opencog/guile/SchemeEval.cc:465
#29 0x00007fffe386cc86 in opencog::GenericShell::eval_loop (
    this=0x7ffe4c001380)
    at /home/ubuntu/src/opencog/opencog/cogserver/shell/GenericShell.cc:446
#30 0x00007fffee768c80 in ?? () from /usr/lib/x86_64-linux-gnu/libstdc++.so.6
#31 0x00007ffff78396ba in start_thread (arg=0x7ffe7b7fe700)
    at pthread_create.c:333
#32 0x00007ffff756f82d in clone ()
    at ../sysdeps/unix/sysv/linux/x86_64/clone.S:109





  parent reply	other threads:[~2017-01-08 21:55 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-01-07 21:47 bug#25386: guile-2.0 and 2.2 thread leakage+crash; very simple test attached Linas Vepstas
2017-01-08  2:57 ` bug#25386: Manual gc helps Linas Vepstas
2017-01-08 14:57 ` bug#25386: test case update Linas Vepstas
2017-01-08 21:55 ` Linas Vepstas [this message]
2017-01-09  1:28 ` bug#25386: Please ignore previous stack trace Linas Vepstas
2017-01-11  6:14 ` bug#25386: This can be closed Linas Vepstas
2017-03-01 15:31   ` Andy Wingo

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/guile/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAHrUA35MhXt_wt_ECj9bfoCF7-rWaG=9OVonqTdo379i6JO+kQ@mail.gmail.com' \
    --to=linasvepstas@gmail.com \
    --cc=25386@debbugs.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).