From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Andy Wingo Newsgroups: gmane.lisp.guile.bugs Subject: bug#21587: Mac: Segfault when unloading shared object linked to libguile Date: Tue, 28 Feb 2017 15:29:31 +0100 Message-ID: <87innumlro.fsf@pobox.com> References: <986070ee429f12db07fc88613be335a5@wilhelm.re> <87h9cig427.fsf@pobox.com> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: blaine.gmane.org 1488293827 12488 195.159.176.226 (28 Feb 2017 14:57:07 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Tue, 28 Feb 2017 14:57:07 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1 (gnu/linux) Cc: 21587-done@debbugs.gnu.org To: Wilhelm Schuster Original-X-From: bug-guile-bounces+guile-bugs=m.gmane.org@gnu.org Tue Feb 28 15:57:02 2017 Return-path: Envelope-to: guile-bugs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cijD3-0002ZP-7s for guile-bugs@m.gmane.org; Tue, 28 Feb 2017 15:57:01 +0100 Original-Received: from localhost ([::1]:33580 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cijD7-00033w-Jp for guile-bugs@m.gmane.org; Tue, 28 Feb 2017 09:57:05 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:39562) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ciin0-000613-3x for bug-guile@gnu.org; Tue, 28 Feb 2017 09:30:07 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ciimw-0004E7-Vs for bug-guile@gnu.org; Tue, 28 Feb 2017 09:30:06 -0500 Original-Received: from debbugs.gnu.org ([208.118.235.43]:32825) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1ciimw-0004Dx-Sk for bug-guile@gnu.org; Tue, 28 Feb 2017 09:30:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1ciimw-0008Hb-Nn for bug-guile@gnu.org; Tue, 28 Feb 2017 09:30:02 -0500 Resent-From: Andy Wingo Original-Sender: "Debbugs-submit" Resent-To: bug-guile@gnu.org Resent-Date: Tue, 28 Feb 2017 14:30:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: cc-closed 21587 X-GNU-PR-Package: guile X-GNU-PR-Keywords: Mail-Followup-To: 21587@debbugs.gnu.org, wingo@pobox.com, wilhelm@wilhelm.re Original-Received: via spool by 21587-done@debbugs.gnu.org id=D21587.148829218531775 (code D ref 21587); Tue, 28 Feb 2017 14:30:02 +0000 Original-Received: (at 21587-done) by debbugs.gnu.org; 28 Feb 2017 14:29:45 +0000 Original-Received: from localhost ([127.0.0.1]:59255 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ciimf-0008GR-8g for submit@debbugs.gnu.org; Tue, 28 Feb 2017 09:29:45 -0500 Original-Received: from pb-sasl2.pobox.com ([64.147.108.67]:59065 helo=sasl.smtp.pobox.com) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ciimd-0008GI-4J for 21587-done@debbugs.gnu.org; Tue, 28 Feb 2017 09:29:43 -0500 Original-Received: from sasl.smtp.pobox.com (unknown [127.0.0.1]) by pb-sasl2.pobox.com (Postfix) with ESMTP id D31C15F2FA; Tue, 28 Feb 2017 09:29:39 -0500 (EST) DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=pobox.com; h=from:to:cc :subject:references:date:in-reply-to:message-id:mime-version :content-type; s=sasl; bh=ijE+ZBhNvBZkKip4eElRhodsW0Q=; b=eT9wRo I1Dd4gCRdc+7K3PaoxYLJMnNTzAL/F9mLRTi6obXqPJ/we3hH14hZe2WbdgzIrnm iJzn9qCHou9H7R/4i0Mg0LPgi6CZZwyURrfE9fOQLRM5TRsUqcseP21sIgnpmyv2 5xuqjR2fYHj3AZ87sPnYcJrisRHW9ti6/hbII= DomainKey-Signature: a=rsa-sha1; c=nofws; d=pobox.com; h=from:to:cc :subject:references:date:in-reply-to:message-id:mime-version :content-type; q=dns; s=sasl; b=yXTXGFH7Gtx40l2v02gGInFUTF6bHInZ RFT6HZEjM4yR91y7SW+gEOy+3FjgD2ICCGImGWpHFmfwdT2fFDzwHmNnb2k9o7IC 3PVjRn5bLJUqB3+39X/9sPoSof/YjbBUCTmJu/ZACFOMDWAjFaXeFA+Kc5mATdyK EbRu9H2HuRg= Original-Received: from pb-sasl2.nyi.icgroup.com (unknown [127.0.0.1]) by pb-sasl2.pobox.com (Postfix) with ESMTP id C4BF65F2F9; Tue, 28 Feb 2017 09:29:39 -0500 (EST) Original-Received: from clucks (unknown [88.160.190.192]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by pb-sasl2.pobox.com (Postfix) with ESMTPSA id E70625F2F8; Tue, 28 Feb 2017 09:29:38 -0500 (EST) In-Reply-To: <87h9cig427.fsf@pobox.com> (Andy Wingo's message of "Fri, 24 Jun 2016 14:32:48 +0200") X-Pobox-Relay-ID: 560F9A3E-FDC2-11E6-9BF8-6141F2301B6D-02397024!pb-sasl2.pobox.com X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.43 X-BeenThere: bug-guile@gnu.org List-Id: "Bug reports for GUILE, GNU's Ubiquitous Extension Language" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-guile-bounces+guile-bugs=m.gmane.org@gnu.org Original-Sender: "bug-guile" Xref: news.gmane.org gmane.lisp.guile.bugs:8583 Archived-At: Closing as not-a-bug given discussion below. Please reply if you have additional comments/etc. Thanks. Andy On Fri 24 Jun 2016 14:32, Andy Wingo writes: > On Tue 29 Sep 2015 20:21, Wilhelm Schuster 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