GNU bug report logs - #26711
Multithreading segfaults

Previous Next

Package: guile;

Reported by: Jacek Swiergocki <jswiergo <at> gmail.com>

Date: Sat, 29 Apr 2017 16:56:01 UTC

Severity: normal

Full log


Message #8 received at 26711 <at> debbugs.gnu.org (full text, mbox):

From: Linas Vepstas <linasvepstas <at> gmail.com>
To: 26711 <at> debbugs.gnu.org
Subject: Example1 is buggy
Date: Sun, 30 Apr 2017 16:59:34 -0500
[Message part 1 (text/plain, inline)]
Example1.cc is has a work-around -- main() needs to call scm_init_guile()
or scm_with_guile().  If this is done, the problem goes away.

The problem with example1 is that the first thread to initialize guile is
eventually destroyed. However, the first thread to call guile never ever
sets "needs_unregister" in libguile/threads.c and thus, bdwgc never finds
out that this thread no longer exists. Sooner or later, bdwgc touches this
non-existent thread, and crashes.

If its OK to initialize guile for the first time ever in a transient
thread, then there's a bug in guile; else there's a bug in the example.

I'm now looking into example2.

--linas
[Message part 2 (text/html, inline)]

This bug report was last modified 8 years and 130 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.