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.devel Subject: Re: Cygwin port of Guile 2.2 Date: Mon, 17 Apr 2017 10:04:42 +0200 Message-ID: <878tmz7945.fsf@pobox.com> References: <874ly49l54.fsf@joshua.spikycactus.dnsalias.com> <87lgr38jzd.fsf@pobox.com> <87pogft8c2.fsf@priss.frightenedpiglet.com> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Trace: blaine.gmane.org 1492416310 24966 195.159.176.226 (17 Apr 2017 08:05:10 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Mon, 17 Apr 2017 08:05:10 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1 (gnu/linux) Cc: guile-devel@gnu.org To: Derek Upham Original-X-From: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Mon Apr 17 10:05:02 2017 Return-path: Envelope-to: guile-devel@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 1d01ef-0006IJ-QM for guile-devel@m.gmane.org; Mon, 17 Apr 2017 10:05:02 +0200 Original-Received: from localhost ([::1]:35298 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1d01el-0001QQ-9n for guile-devel@m.gmane.org; Mon, 17 Apr 2017 04:05:07 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:39866) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1d01eg-0001QA-Lm for guile-devel@gnu.org; Mon, 17 Apr 2017 04:05:03 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1d01ed-0006JA-Hv for guile-devel@gnu.org; Mon, 17 Apr 2017 04:05:02 -0400 Original-Received: from pb-sasl1.pobox.com ([64.147.108.66]:58079 helo=sasl.smtp.pobox.com) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1d01ed-0006H9-Cz for guile-devel@gnu.org; Mon, 17 Apr 2017 04:04:59 -0400 Original-Received: from sasl.smtp.pobox.com (unknown [127.0.0.1]) by pb-sasl1.pobox.com (Postfix) with ESMTP id 0B9507932D; Mon, 17 Apr 2017 04:04:55 -0400 (EDT) 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:content-transfer-encoding; s=sasl; bh=g+7COJYvM/76 GrcPm4yWNcGsx+4=; b=OnkxNIKENstfmp6TnP/8I7wVud7UUV2+O/TfkpUT5cDZ tJd4hYPjU8OH+G8FGamGJ4DP1kNzMuKBe5eDMyXxeKxwliZYu9FXc/6MMIvqmI3D CxnEKJnTlYSuyslLlAojDc3xpDGEjK1mVyERvnOHJzU9UrLeW0Kf629sJooM3pg= 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:content-transfer-encoding; q=dns; s=sasl; b=LC42ox m0skpxnwu+qvQZURdeDiHgMvvPJ9d017LAN62+Yi7SJfGTfXBaZERF9+VkkV+fSQ Vc5b1ArysrpcVR9PPUhyp6+A6gTGIqqJCqx9hFPkmO6MUBqjRnx2vtChviRw0cyy AScnfSAWRxkPBTcEWAGVyfXfY3FZTOwC7K9mY= Original-Received: from pb-sasl1.nyi.icgroup.com (unknown [127.0.0.1]) by pb-sasl1.pobox.com (Postfix) with ESMTP id E6B357932B; Mon, 17 Apr 2017 04:04:54 -0400 (EDT) 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-sasl1.pobox.com (Postfix) with ESMTPSA id A074D79325; Mon, 17 Apr 2017 04:04:53 -0400 (EDT) In-Reply-To: <87pogft8c2.fsf@priss.frightenedpiglet.com> (Derek Upham's message of "Fri, 14 Apr 2017 06:41:33 -0700") X-Pobox-Relay-ID: 8A0CC940-2344-11E7-8BB9-07D2064AB293-02397024!pb-sasl1.pobox.com X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 64.147.108.66 X-BeenThere: guile-devel@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: "Developers list for Guile, the GNU extensibility library" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Original-Sender: "guile-devel" Xref: news.gmane.org gmane.lisp.guile.devel:19111 Archived-At: On Fri 14 Apr 2017 15:41, Derek Upham writes: > There=E2=80=99s the finalizer thread, but there=E2=80=99s also the signal= delivery > thread. The =E2=80=9Csigaction=E2=80=9D code ensures that signal deliver= y thread is > running. And note that =E2=80=9Cprimitive-fork=E2=80=9D is supposed to d= isplay a > warning if you are forking with outstanding threads, but it explicitly > ignores the signal delivery thread during its check. Yep, though the signal delivery thread doesn't run unless you have installed a signal handler. I think currently the combination of signals + guile-with-threads + primitive-fork (rather than open-process) isn't supported. It warns in 2.2 but the situation was the same in 2.0. I am not sure how it can be made to work (though I did try!) and would be interested to see your fix :) > I have found that what actually hangs after a fork are the mutexes > supporting the threads: they are kernel-level resources, referenced by > ID, and end up being shared between parent and child. Which ones, precisely? > I don=E2=80=99t think there=E2=80=99s any safe way to restore the finaliz= er thread and > support SCSH-style (begin ...) process forms. Shutting down the > finalizer thread is the best we can do. The finalizer thread should be restored as needed, the next time GC calls notify_finalizers_to_run. I think also that if you are most interested in a system in which primitive-fork plays a large role, then probably you want a Guile without threads (including the GC mark threads). Threads + fork is not a recipe for success :) Andy