DragonFly bugs List (threaded) for 2007-10
DragonFly BSD
DragonFly bugs List (threaded) for 2007-10
[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]

Re: kernel panic on HEAD from Oct. 4th sources


From: Matthew Dillon <dillon@xxxxxxxxxxxxxxxxxxxx>
Date: Wed, 17 Oct 2007 14:40:07 -0700 (PDT)

:2007/10/16, Peter Avalos <pavalos@theshell.com>:
:> Just had this one last night:
:>
:> Fatal trap 12: page fault while in kernel mode
:[...]
:> #7  0xc018cb85 in fill_kinfo_proc (p=0xe8c21ba0, kp=0xec319628) at /usr/src/sys/kern/kern_kinfo.c:66
:
:It looks like p->p_pgrp == NULL.
:
:p_pgrp is checked against NULL in several other places in the kernel
:(and in fbsd too), so a fix could be to do the same in
:fill_kinfo_proc().
:
:However, I don't understand how p_pgrp can be NULL.  AFAIU, it is
:inherited from the parent process and set to NULL only when the
:process is about to die (leaveprgp() called from kern_wait() just
:before deleting the proc structure).  Could there be some race
:condition?

    I thought I fixed that one.

    Yes, kinfo_proc can race against an exiting process.  An exiting process
    will be in a partially deallocated state and p_pgrp could very well be
    NULL as of the moment kinfo_proc tries to access it.

					-Matt
					Matthew Dillon 
					<dillon@backplane.com>



[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]