Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 03 Mar 2004 21:33:26 +0100
From:      des@des.no (Dag-Erling =?iso-8859-1?q?Sm=F8rgrav?=)
To:        John Baldwin <jhb@FreeBSD.org>
Cc:        cvs-all@FreeBSD.org
Subject:   Re: cvs commit: src/sys/kern subr_sleepqueue.c
Message-ID:  <xzpeks9isbt.fsf@dwp.des.no>
In-Reply-To: <200403031435.23839.jhb@FreeBSD.org> (John Baldwin's message of "Wed, 3 Mar 2004 14:35:23 -0500")
References:  <200403021502.i22F28vF032585@repoman.freebsd.org> <200403021708.43422.jhb@FreeBSD.org> <xzpk722vgbe.fsf@dwp.des.no> <200403031435.23839.jhb@FreeBSD.org>

next in thread | previous in thread | raw e-mail | index | archive | help
--=-=-=
Content-Type: text/plain; charset=iso-8859-1
Content-Transfer-Encoding: quoted-printable

John Baldwin <jhb@FreeBSD.org> writes:
> Now realize that p_sigacts is a refcount'd struct shared between rfork'd=
=20
> processes (i.e. Linux threads).  The sleep's don't actually get woken up =
via=20
> a wakeup, they get woken up via a signal, so the wait channel is really a=
=20
> dummy.  Try changing those three msleep's to sleep on &ps and &p->p_sigac=
ts=20
> and see if that fixes the panic.

well, I still have subr_sleepqueue.c 1.1, but with the changes you
suggest I no longer see the "Mismatches locks" message.  Patch
attached (has style issues though).

DES
--=20
Dag-Erling Sm=F8rgrav - des@des.no


--=-=-=
Content-Type: text/x-patch
Content-Disposition: attachment; filename=kern_sig.diff

Index: sys/kern/kern_sig.c
===================================================================
RCS file: /home/ncvs/src/sys/kern/kern_sig.c,v
retrieving revision 1.271
diff -u -r1.271 kern_sig.c
--- sys/kern/kern_sig.c	27 Feb 2004 18:52:43 -0000	1.271
+++ sys/kern/kern_sig.c	3 Mar 2004 19:58:31 -0000
@@ -925,7 +925,7 @@
 		hz = 0;
 
 	td->td_waitset = &waitset;
-	error = msleep(ps, &p->p_mtx, PPAUSE|PCATCH, "sigwait", hz);
+	error = msleep(&ps, &p->p_mtx, PPAUSE|PCATCH, "sigwait", hz);
 	td->td_waitset = NULL;
 	if (error == 0) /* surplus wakeup ? */
 		error = EINTR;
@@ -1153,7 +1153,7 @@
 	SIG_CANTMASK(mask);
 	td->td_sigmask = mask;
 	signotify(td);
-	while (msleep(p->p_sigacts, &p->p_mtx, PPAUSE|PCATCH, "pause", 0) == 0)
+	while (msleep(&p->p_sigacts, &p->p_mtx, PPAUSE|PCATCH, "pause", 0) == 0)
 		/* void */;
 	PROC_UNLOCK(p);
 	/* always return EINTR rather than ERESTART... */
@@ -1189,7 +1189,7 @@
 	SIG_CANTMASK(mask);
 	SIGSETLO(td->td_sigmask, mask);
 	signotify(td);
-	while (msleep(p->p_sigacts, &p->p_mtx, PPAUSE|PCATCH, "opause", 0) == 0)
+	while (msleep(&p->p_sigacts, &p->p_mtx, PPAUSE|PCATCH, "opause", 0) == 0)
 		/* void */;
 	PROC_UNLOCK(p);
 	/* always return EINTR rather than ERESTART... */

--=-=-=--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?xzpeks9isbt.fsf>