unofficial mirror of bug-guile@gnu.org 
 help / color / mirror / Atom feed
From: Linas Vepstas <linasvepstas@gmail.com>
To: 26711@debbugs.gnu.org
Subject: bug#26711: Example1 is buggy
Date: Sun, 30 Apr 2017 16:59:34 -0500	[thread overview]
Message-ID: <CAHrUA34dgQDbKvSMEDz-jtHXSvU_WcEa8dmd5Zsbs2Z7F8dq7g@mail.gmail.com> (raw)
In-Reply-To: <CAPLvL3_rXNC7L-vQ8ANsFsHqmW3mQPsga1LDsZf5czsJZU6QTA@mail.gmail.com>

[-- Attachment #1: Type: text/plain, Size: 650 bytes --]

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

[-- Attachment #2: Type: text/html, Size: 778 bytes --]

      reply	other threads:[~2017-04-30 21:59 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-04-29 11:16 bug#26711: Multithreading segfaults Jacek Swiergocki
2017-04-30 21:59 ` Linas Vepstas [this message]

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=CAHrUA34dgQDbKvSMEDz-jtHXSvU_WcEa8dmd5Zsbs2Z7F8dq7g@mail.gmail.com \
    --to=linasvepstas@gmail.com \
    --cc=26711@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).