From owner-freebsd-current Tue Nov 13 19:11:21 2001 Delivered-To: freebsd-current@freebsd.org Received: from motgate.mot.com (motgate.mot.com [129.188.136.100]) by hub.freebsd.org (Postfix) with ESMTP id 72AB637B405 for ; Tue, 13 Nov 2001 19:11:17 -0800 (PST) Received: [from pobox4.mot.com (pobox4.mot.com [10.64.251.243]) by motgate.mot.com (motgate 2.1) with ESMTP id UAA09031 for ; Tue, 13 Nov 2001 20:11:16 -0700 (MST)] Received: [from latour.rsch.comm.mot.com (latour.rsch.comm.mot.com [145.1.80.116]) by pobox4.mot.com (MOT-pobox4 2.0) with ESMTP id UAA12086 for ; Tue, 13 Nov 2001 20:11:16 -0700 (MST)] Received: (from rittle@localhost) by latour.rsch.comm.mot.com (8.11.6/8.11.4) id fAE3BFX14844; Tue, 13 Nov 2001 21:11:15 -0600 (CST) (envelope-from rittle) Date: Tue, 13 Nov 2001 21:11:15 -0600 (CST) From: Loren James Rittle Message-Id: <200111140311.fAE3BFX14844@latour.rsch.comm.mot.com> To: current@freebsd.org In-reply-to: (message from Daniel Eischen on Sat, 10 Nov 2001 10:09:14 -0500 (EST)) Subject: Re: Report on FreeBSD 4.4 pthread implementation verses boehm-gc Reply-To: rittle@labs.mot.com References: Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG In article , Daniel Eischen writes: > [ Followups to -current ] >> [...] However, this work has uncovered either a rare race condition >> in the 4.X pthread implementation (also seen on a current 5.0 >> system) or a bad assumption in the GC signal code (abstracted >> below). [...] > Try the following patch; this is to -current, you'll have to massage > it a bit for -stable (Hint: s/curthread/_thread_run/ in -stable). I have added Daniel's patch to my 4.4-STABLE tree (converting it as he suggested) and rebuilt libc_r.so.4. I can confirm (1) that the test case I posted now operates fine; (2) that the hack to ignore the spurious EINTR return from pthread_join() in boehm-gc is no longer required; and (3) that the more complex test case runs, on average, about 200-400 complete test cycles without deadlock compared to the past rate of deadlock of approximately 1 out of every 6-12 cycles. The rarer deadlock is still being investigated but it looks like a different problem than that addressed by Daniel's patch. I will post another test case or more information (to -hackers) once I have it. Great work Daniel. I (and future libjava users) thank you. Regards, Loren To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message