NetBSD-Bugs archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: port-mips/52892: Tests hang on MIPS
The following reply was made to PR port-mips/52892; it has been noted by GNATS.
From: christos%zoulas.com@localhost (Christos Zoulas)
To: Andreas Gustafsson <gson%gson.org@localhost>
Cc: gnats-bugs%NetBSD.org@localhost
Subject: Re: port-mips/52892: Tests hang on MIPS
Date: Sun, 22 Apr 2018 12:13:01 -0400
On Apr 22, 5:29pm, gson%gson.org@localhost (Andreas Gustafsson) wrote:
-- Subject: Re: port-mips/52892: Tests hang on MIPS
| Christos Zoulas wrote:
| > Can you try to always set errno to EAGAIN after cv_wait_sig()
| > returns?
|
| My other method of reproducing the hang took a bit longer than
| expected, so in the meantime, I ended up running this test as
| requested after all. I applied the following patch to
| 2018.04.20.11.31.54 sources:
|
| --- src/sys/kern/kern_lwp.c.orig 2017-12-02 22:51:22.000000000 +0000
| +++ src/sys/kern/kern_lwp.c 2018-04-22 14:19:14.000000000 +0000
| @@ -646,8 +646,7 @@
| if (exiting) {
| KASSERT(p->p_nlwps > 1);
| error = cv_wait_sig(&p->p_lwpcv, p->p_lock);
| - if (error == 0)
| - error = EAGAIN;
| + error = EAGAIN;
| break;
| }
|
| With this patch, the hang still occurs, so it looks like the problem
| is with the part of kern_lwp.c 1.191 that replaces cv_wait() by
| cv_wait_sig(), not the part that changes the errno returned.
How about if we make cvs_wait_sig look like cv_wait?
But that might break go again..
christos
Index: kern_condvar.c
===================================================================
RCS file: /cvsroot/src/sys/kern/kern_condvar.c,v
retrieving revision 1.41
diff -u -r1.41 kern_condvar.c
--- kern_condvar.c 30 Jan 2018 07:52:22 -0000 1.41
+++ kern_condvar.c 22 Apr 2018 16:12:19 -0000
@@ -268,9 +268,10 @@
KASSERT(mutex_owned(mtx));
- cv_enter(cv, mtx, l);
+ CV_LOCKDEBUG_HANDOFF(l, cv);
error = sleepq_block(0, true);
- return cv_exit(cv, mtx, l, error);
+ mutex_enter(mtx);
+ return error;
}
/*
Home |
Main Index |
Thread Index |
Old Index