RE: SMP problems with Thinkpad X60s

Jan Stoess <[email protected]> Fri, 11 Jul 2008 13:32:47 +0200
Newsgroups gmane.comp.micro-kernel.l4.l4ka.general
Message-ID <[email protected]>
> The latter seems to be the case, the failed assertion is in
> kernel/kdb/glue/v4-x86/prepost.cc, line 410, if I read the output
correctly.

Which is: 
    ASSERT(kdb_current_cpu == CONFIG_SMP_MAX_CPUS);

If that's correct, it may be a race condition that comes into my mind when
looking at that assertion: kdb_current_cpu stores the current CPU executing
within the KDB; all other CPUs are sleeping uninterruptibly waiting for a
broadcast NMI to either go on or try to enter KDB themselves (see
kdb_t::pre()). There might actually occur a race condition, because the CPU
leaving KDB first resets kdb_current_cpu, then uses an NMI broadcast to
inform other CPUs that they may go on or enter KDB, and finally verifies the
value of kdb_current_cpu. But meanwhile the value may have changed because
of another CPU instantly entering KDB again.

So Julian, can you please try to just comment out that assertion and tell us
if that helps? 

Thanks,
-Jan




--
Jan Stoess
System Architecture Group
University of Karlsruhe
Phone: +49 (721) 608-4056
Fax: +49 (721) 608-7664
eMail: [email protected]


> -----Original Message-----
> From: [email protected] [mailto:[email protected]
> karlsruhe.de] On Behalf Of Philipp Kupferschmied
> Sent: Friday, July 11, 2008 1:26 PM
> To: [email protected]
> Subject: SMP problems with Thinkpad X60s
> 
> > That looks to me like a failed assertion printed together with startup
code
> > of your rootserver. The gibberish probably comes from several cpus
printing
> > stuff on the screen simultaneously. Since L4 synchronizes console output
> > printed via L4_KDB_Printchar and friends, there's two options: i) you're
> > using your own print routines and those get messed up with L4's debug
> > output, or ii) the L4 ASSERTION fails somewhere in the KDB, and the
printf
> > synchronization fails as a fall-out.
> 
> The latter seems to be the case, the failed assertion is in
> kernel/kdb/glue/v4-x86/prepost.cc, line 410, if I read the output
correctly.
> 
> I have no idea why it fails, though.
> 
> Philipp
smime.p7s (application/x-pkcs7-signature, 3.1 KB) - not displayed