From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: ludo@gnu.org (Ludovic =?iso-8859-1?Q?Court=E8s?=) Newsgroups: gmane.lisp.guile.devel,gmane.lisp.guile.bugs Subject: Re: [bug #33996] 2.0.2: Crash related to ports and threads Date: Sun, 21 Aug 2011 15:22:52 +0200 Message-ID: <87r54ex5jn.fsf@gnu.org> References: <20110812-094212.sv11689.31911@savannah.gnu.org> <871uwjhxi2.fsf@pobox.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Trace: dough.gmane.org 1313932994 20125 80.91.229.12 (21 Aug 2011 13:23:14 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Sun, 21 Aug 2011 13:23:14 +0000 (UTC) Cc: bug-guile@gnu.org To: guile-devel@gnu.org Original-X-From: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Sun Aug 21 15:23:10 2011 Return-path: Envelope-to: guile-devel@m.gmane.org Original-Received: from lists.gnu.org ([140.186.70.17]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1Qv7za-00044q-BS for guile-devel@m.gmane.org; Sun, 21 Aug 2011 15:23:10 +0200 Original-Received: from localhost ([::1]:59676 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Qv7zZ-0008B3-Ls for guile-devel@m.gmane.org; Sun, 21 Aug 2011 09:23:09 -0400 Original-Received: from eggs.gnu.org ([140.186.70.92]:47973) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Qv7zX-0008Am-FQ for guile-devel@gnu.org; Sun, 21 Aug 2011 09:23:08 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Qv7zW-00041y-9N for guile-devel@gnu.org; Sun, 21 Aug 2011 09:23:07 -0400 Original-Received: from lo.gmane.org ([80.91.229.12]:41744) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Qv7zW-00041s-4L for guile-devel@gnu.org; Sun, 21 Aug 2011 09:23:06 -0400 Original-Received: from list by lo.gmane.org with local (Exim 4.69) (envelope-from ) id 1Qv7zT-00042s-Ud for guile-devel@gnu.org; Sun, 21 Aug 2011 15:23:03 +0200 Original-Received: from reverse-83.fdn.fr ([80.67.176.83]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sun, 21 Aug 2011 15:23:03 +0200 Original-Received: from ludo by reverse-83.fdn.fr with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sun, 21 Aug 2011 15:23:03 +0200 X-Injected-Via-Gmane: http://gmane.org/ Original-Followup-To: gmane.lisp.guile.devel Original-Lines: 19 Original-X-Complaints-To: usenet@dough.gmane.org X-Gmane-NNTP-Posting-Host: reverse-83.fdn.fr User-Agent: Gnus/5.110018 (No Gnus v0.18) Emacs/24.0.50 (gnu/linux) X-URL: http://www.fdn.fr/~lcourtes/ X-Revolutionary-Date: 4 Fructidor an 219 de la =?iso-8859-1?Q?R=E9volution?= X-PGP-Key-ID: 0xEA52ECF4 X-PGP-Key: http://www.fdn.fr/~lcourtes/ludovic.asc X-PGP-Fingerprint: 83C4 F8E5 10A3 3B4C 5BEA D15D 77DD 95E2 EA52 ECF4 X-OS: x86_64-unknown-linux-gnu Cancel-Lock: sha1:owwhYkhNNSZ2CiDizp1JHoT0wj8= X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-Received-From: 80.91.229.12 X-BeenThere: guile-devel@gnu.org X-Mailman-Version: 2.1.14 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-bounces+guile-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.lisp.guile.devel:12711 gmane.lisp.guile.bugs:5790 Archived-At: Hi! Andy Wingo skribis: > Oh dear, this is a nasty one. The issue is that Guile's ports are not > threadsafe. I hadn't thought about this one... > > I am adding guile-devel to the Cc for input. Any fix to this will be > pretty big, I think. I think that the right fix here is probably what > Glibc does; see `info libc "Streams and Threads"` for the full details. Indeed, it would probably need per-port mutexes, making I/O primitives thread-safe by default, and perhaps providing unlocked variants like libc does. Putting our fat mutexes on a diet seems like a prerequisite... Thanks, Ludo’.