Re: pthread-mutex debugging (PR#44387)

Frank Wille <[email protected]>
Newsgroups gmane.os.netbsd.ports.powerpc
Organization Privates Internet Ostwestfalen/Lippe e.V.
Message-ID <[email protected]>
On Sat, 22 Sep 2012 21:20:13 +0200
Frank Wille <[email protected]> wrote:

> I could now isolate the problem on sys/kern/kern_mutex.c. It was
> sufficient to compile kern_mutex.c with -DFULL to make the problem
> disappear. The rest of the kernel was compiled without DIAGNOSTIC.

As we are unable to solve this critical bug I would suggest to do
something like the following temporary workaround in kern_mutex.c
for 6.0:

--- kern_mutex.c.orig   2012-10-13 20:22:43.000000000 +0200
+++ kern_mutex.c        2012-10-13 20:24:14.000000000 +0200
@@ -66,7 +66,8 @@
  * more than an splraiseipl() and splx() pair.
  */
 
-#if defined(DIAGNOSTIC) || defined(MULTIPROCESSOR) || defined(LOCKDEBUG)
+#if defined(DIAGNOSTIC) || defined(MULTIPROCESSOR) || defined(LOCKDEBUG) \
+    || defined(__powerpc__)
 #define        FULL
 #endif

This makes sure that PPC always uses real spin mutexes, and the problems
are gone.


I would also like to know if PR #44387 affects ibm4xx and booke as well,
or is it an oea-only problem? Unfortunately I have only oea-machines
here (and a not-yet-supported 440).

-- 
Frank Wille
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.