NetBSD Problem Report #44387
From www@NetBSD.org Fri Jan 14 16:47:24 2011
Received: from mail.netbsd.org (mail.netbsd.org [188.8.131.52])
by www.NetBSD.org (Postfix) with ESMTP id DD10E63B883
for <gnats-bugs@gnats.NetBSD.org>; Fri, 14 Jan 2011 16:47:23 +0000 (UTC)
Date: Fri, 14 Jan 2011 16:47:22 +0000 (UTC)
Subject: some pthread mutex tests fail on ppc platforms
>Synopsis: some pthread mutex tests fail on ppc platforms
>Arrival-Date: Fri Jan 14 16:50:00 +0000 2011
>Last-Modified: Mon Feb 21 21:45:01 +0000 2011
>Originator: Jeff Rizzo
NetBSD powerbookg4 5.99.43 NetBSD 5.99.43 (GENERIC) #1: Fri Jan 14 08:25:34 PST 2011 firstname.lastname@example.org:/Users/riz/Documents/code/netbsd/obj/sys/arch/macppc/compile/GENERIC macppc
Using a kernel that is *not* build with "options DIAGNOSTIC", the regression tests in
/usr/tests/lib/libpthread/t_mutex fail on various powerpc platforms. The failing test basically creates two threads which each increment a variable which is protected by a mutex; when it fails (it doesn't fail 100% of the time), it looks like both threads are in "parked" state. (I have also seen one thread parked and one in iowait)
I confirmed this on two different macppc boxes I have, and I have at least one test run from an ofppc box running 5.99.42 (without DIAGNOSTIC).
For whatever reason, building the kernel with DIAGNOSTIC seems to hide the problem. I have not yet determined why; no additional output is available.
In case it matters: one machine has a PPC 7400, one has a 7447, and one has a 750CX CPU.
On a machine with a GENERIC kernel:
powerbookg4:riz /usr/tests/lib/libpthread> ./t_mutex mutex2
1: Mutex-test 2
1: Thread 0xffe00000
2: Second thread (0xefa00000). Count is 10000000
Sometimes it does not hang - frequency of hang seems to vary by machine and kernel. You may also wish to run the entire pthread test suite from that directory with "atf-run | atf-report". It will take about 10 minutes (because of the mutex test hangs).
From: "Jeff Rizzo" <email@example.com>
Subject: PR/44387 CVS commit: src/tests/lib/libpthread
Date: Mon, 21 Feb 2011 21:43:42 +0000
Module Name: src
Committed By: riz
Date: Mon Feb 21 21:43:41 UTC 2011
mutex2/mutex3 are expected to fail on powerpc because of
XXX the ugly sleep at the end is because ATF will mark an un-triggered
race condition (ie, the test passes unexpectedly) as a test failure otherwise.
To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/tests/lib/libpthread/t_mutex.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
$NetBSD: query-full-pr,v 1.39 2013/11/01 18:47:49 spz Exp $
$NetBSD: gnats_config.sh,v 1.8 2006/05/07 09:23:38 tsutsui Exp $
Copyright © 1994-2007
The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.