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

Matthew Dillon dillon at apollo.backplane.com
Sat Jun 30 21:02:01 PDT 2007


:Thomas Nikolajsen <thomas.nikolajsen at 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






More information about the Bugs mailing list