kernel panic on HEAD from Oct. 4th sources

Simon 'corecode' Schubert corecode at fs.ei.tum.de
Mon Jan 7 16:22:20 PST 2008


Matthew Dillon wrote:
:Just got this, and it appears similar to the previous one:
:
:dumping to dev #da/0x20001, blockno 378927
:
:(kgdb) bt
:#7  0xc019b833 in fill_kinfo_proc (p=3D0xe8bd1ee0, kp=3D0xe926c628) at /usr=
:/src/sys/kern/kern_kinfo.c:97
:..
:
:This happened with the system doing some serious paging.  Sources are
:=66rom Dec. 6th.  kernel and vmcore available on leaf:~pavalos/crash/9/.
:
:--Peter
     I'll get it fixed.  More issues trying to get info on zombied 
     processes which are in a state of being torn down.

     In this case p->p_ucred is NULL.

     I'll do a run through of the procedure and fix this any other
     potential NULL dereferences that I see.
I think we should simply prevent these almost reaped processes from 
staying in the zombie list.  I suggest the attached fix (not yet tested).

cheers
  simon
Index: kern/kern_exit.c
===================================================================
RCS file: /home/repos/cvs/dragonfly/src/sys/kern/kern_exit.c,v
retrieving revision 1.86
diff -u -p -r1.86 kern_exit.c
--- kern/kern_exit.c	30 Aug 2007 20:41:00 -0000	1.86
+++ kern/kern_exit.c	8 Jan 2008 00:06:01 -0000
@@ -769,6 +769,13 @@ loop:
 			p->p_usched->heuristic_exiting(td->td_lwp, deadlp);
 			*/
 
+			/*
+			 * Finally finished with old proc entry.
+			 * Unlink it from its process group and free it.
+			 */
+			proc_remove_zombie(p);
+			leavepgrp(p);
+
 			/* Take care of our return values. */
 			*res = p->p_pid;
 			if (status)
@@ -806,13 +813,6 @@ loop:
 			if (p->p_args && --p->p_args->ar_ref == 0)
 				FREE(p->p_args, M_PARGS);
 
-			/*
-			 * Finally finished with old proc entry.
-			 * Unlink it from its process group and free it.
-			 */
-			proc_remove_zombie(p);
-			leavepgrp(p);
-
 			if (--p->p_sigacts->ps_refcnt == 0) {
 				kfree(p->p_sigacts, M_SUBPROC);
 				p->p_sigacts = NULL;




More information about the Bugs mailing list