unofficial mirror of bug-guile@gnu.org 
 help / color / mirror / Atom feed
From: Andy Wingo <wingo@pobox.com>
To: Wilhelm Schuster <wilhelm@wilhelm.re>
Cc: 21587@debbugs.gnu.org
Subject: bug#21587: Mac: Segfault when unloading shared object linked to libguile
Date: Fri, 24 Jun 2016 14:32:48 +0200	[thread overview]
Message-ID: <87h9cig427.fsf@pobox.com> (raw)
In-Reply-To: <986070ee429f12db07fc88613be335a5@wilhelm.re> (Wilhelm Schuster's message of "Tue, 29 Sep 2015 20:21:29 +0200")

On Tue 29 Sep 2015 20:21, Wilhelm Schuster <wilhelm@wilhelm.re> writes:

> The basic run down: When I try to unload (using dlclose() ) a shared
> object that is linked to libguile after calling scm_init_guile() OR
> scm_with_guile(), a Segfault is triggered.

Hummmmmmmmmmmm!  Well, so this is quite tricky.  Loading Guile loads
Guile which might start threads (some helper threads behind the scenes
for finalization (see section on scm_set_automatic_finalization_enabled
in tha manual), perhaps a thread to listen for signals, and then the
garbage collector that we use (libgc) might start parallel marking
threads (though you can control that parameter too).

Guile doesn't really provide an interface to allow it to shut down
cleanly and I don't know if it can.  (I guess it could.)  However it
would take quite some amount of work and I don't see us doing it any
time soon.  In any case simply trying to dlclose() is never likely to
work, as you aren't synchronizing with Guile itself.

Sorry for the bad news!

Andy





  parent reply	other threads:[~2016-06-24 12:32 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-09-29 18:21 bug#21587: Mac: Segfault when unloading shared object linked to libguile Wilhelm Schuster
2015-09-29 18:25 ` Wilhelm Schuster
2016-06-24 12:32 ` Andy Wingo [this message]
2017-02-28 14:29   ` 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=87h9cig427.fsf@pobox.com \
    --to=wingo@pobox.com \
    --cc=21587@debbugs.gnu.org \
    --cc=wilhelm@wilhelm.re \
    /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).