From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Neil Jerram Newsgroups: gmane.lisp.guile.devel Subject: Re: Hang in threads.test Date: Mon, 27 Sep 2010 21:58:27 +0100 Message-ID: <87zkv2rjik.fsf@ossau.uklinux.net> References: <87tylmrch6.fsf@ossau.uklinux.net> <87zkv94jf9.fsf@ossau.uklinux.net> <87y6asqe2i.fsf@ossau.uklinux.net> <874odf8p0u.fsf@gnu.org> <831833.70845.qm@web37905.mail.mud.yahoo.com> <87fwwv9uvq.fsf@gnu.org> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Trace: dough.gmane.org 1285621161 1078 80.91.229.12 (27 Sep 2010 20:59:21 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Mon, 27 Sep 2010 20:59:21 +0000 (UTC) Cc: guile-devel@gnu.org To: ludo@gnu.org (Ludovic =?utf-8?Q?Court=C3=A8s?=) Original-X-From: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Mon Sep 27 22:59:20 2010 Return-path: Envelope-to: guile-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1P0Kn7-0004qO-1c for guile-devel@m.gmane.org; Mon, 27 Sep 2010 22:59:17 +0200 Original-Received: from localhost ([127.0.0.1]:49177 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1P0Kn6-0000n0-Ij for guile-devel@m.gmane.org; Mon, 27 Sep 2010 16:59:16 -0400 Original-Received: from [140.186.70.92] (port=44777 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1P0Kmy-0000mr-3A for guile-devel@gnu.org; Mon, 27 Sep 2010 16:59:09 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1P0Kmw-00009D-Tu for guile-devel@gnu.org; Mon, 27 Sep 2010 16:59:07 -0400 Original-Received: from mail3.uklinux.net ([80.84.72.33]:38401) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1P0Kmw-0008WM-PM; Mon, 27 Sep 2010 16:59:06 -0400 Original-Received: from arudy (unknown [78.149.119.168]) by mail3.uklinux.net (Postfix) with ESMTP id 690CB1F695A; Mon, 27 Sep 2010 21:58:29 +0100 (BST) Original-Received: from neil-laptop (unknown [192.168.1.5]) by arudy (Postfix) with ESMTP id C361E3800B; Mon, 27 Sep 2010 21:58:30 +0100 (BST) In-Reply-To: <87fwwv9uvq.fsf@gnu.org> ("Ludovic =?utf-8?Q?Court=C3=A8s=22'?= =?utf-8?Q?s?= message of "Mon, 27 Sep 2010 15:30:17 +0200") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1 (gnu/linux) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.4-2.6 X-BeenThere: guile-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Developers list for Guile, the GNU extensibility library" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Errors-To: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.lisp.guile.devel:10965 Archived-At: --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable ludo@gnu.org (Ludovic Court=C3=A8s) writes: > Could you run the program that I posted and report back? That program runs fine for me - except only 100% because I have a single core. I also modified it to add continual thread creation and destruction (attached), and it was still fine. Any further ideas? I'll also continue playing with this... Neil --=-=-= Content-Type: text/x-csrc Content-Disposition: inline; filename=gctest.c #define GC_THREADS 1 #define GC_REDIRECT_TO_LOCAL 1 #include #include #include void *a; static void * alloc_thread (void *data) { while (1) a = GC_MALLOC_ATOMIC (123); return NULL; } static void * gc_thread (void *data) { while (1) GC_gcollect (); return NULL; } static void * creator_thread (void *data) { pthread_t child; pthread_create (&child, NULL, creator_thread, NULL); usleep (random() % 10000); return NULL; } int main (int argc, char *argv[]) { pthread_t alloc, gc; GC_INIT (); pthread_create (&alloc, NULL, alloc_thread, NULL); pthread_create (&gc, NULL, gc_thread, NULL); (void) creator_thread (NULL); while (1); return EXIT_SUCCESS; } --=-=-=--