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

Re: [issue714] SMP kernel panic at boot: assertion: ((int)sr->sysid ..


From: Matthew Dillon <dillon@xxxxxxxxxxxxxxxxxxxx>
Date: Sat, 30 Jun 2007 21:00:45 -0700 (PDT)

:Thomas Nikolajsen <thomas.nikolajsen@mail.dk> added the comment:
:
:I looked into this: sprinkling kprintf's around:
:gd_sysid_alloc==1 and gd_cpuid==0 when sysres_init which panics is called.
:
:It turns out that problem is that ncpus isn't fixed for SMP:
:it's initialized to 1 and later changed to number of CPUs.
:(in /sys/platform/pc32/i386/mp_machdep.c)
:
:sysref_ctor is called once while ncpus==1.
:
:Simple fix (hack?) is to initialize ncpus to MAXCPU,
:and set ncpus* accordingly.
:
: -thomas

    Ok.  Lets find out where this is.  Add a conditional that
    checks for ncpus == 1 in sysref_ctor() and call db_print_backtrace();
    along with your kprintf.   Tell me what it says! e.g.

    sysref_ctor(...)
    {
	if (ncpus == 1) {
	    kprintf("ncpus is one!!!!\n");
	    db_print_backtrace();
	    /* Debugger("blah"); OPTIONAL (continue booting with 'cont') */
	}
    }

    I'm still coming up blanks.  I added a check for ncpus == 1 in
    sysref_ctor() on HEAD on my test box and it never gets hit.  Maybe
    your cvs repository is out of date or something... try cvsup'ing 
    directly from the master site or maybe even clean it all out and
    cvsup a fresh copy from the master site.

					-Matt




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