Date: Sun, 7 Aug 2005 21:59:13 +0200 From: Antoine Pelisse <apelisse@gmail.com> To: freebsd-current@freebsd.org Subject: Fix for some stress panics Message-ID: <61c7468305080712591f8c7fda@mail.gmail.com>
next in thread | raw e-mail | index | archive | help
http://people.freebsd.org/~pho/stress/log/cons149.html http://people.freebsd.org/~pho/stress/log/cons130.html I've been working on this panic today (the two are obviously=20 the same) and here is a patch to fix it: --- sys/kern/kern_proc.c.orig Mon Apr 18 04:10:36 2005 +++ sys/kern/kern_proc.c Sun Aug 7 21:18:03 2005 @@ -884,10 +884,8 @@ _PHOLD(p); FOREACH_THREAD_IN_PROC(p, td) { fill_kinfo_thread(td, &kinfo_proc); - PROC_UNLOCK(p); error =3D SYSCTL_OUT(req, (caddr_t)&kinfo_proc, sizeof(kinfo_proc)); - PROC_LOCK(p); if (error) break; } As a matter of fact, if td is removed from the list through thread_unlink= =20 while the mutex is released and the next thread is removed just after, the FOREAC= H=20 is looping through an unlinked list where the td_ksegrp has been set to NUL= L=20 by thread_exit. If we absolutely have to release the lock, then it's probably safer to chec= k=20 if=20 td_ksegroup !=3D NULL in the fill_kinfo_thread function. Regards,=20 Antoine Pelisse.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?61c7468305080712591f8c7fda>