Sergei Shtylyov wrote:

The mainline code has the same TASKLET_STATE_SCHED but check and BUG, yet it didn't seem to give the trace -- I'll investigate today...

Is this during the boot cycle or attaching afterwards?

   The former -- it's caused by the 'kgdbwait' option.

Sergei,

I did not previously understand the test case, because you had not indicated that this was kgdboe with a kgdwait.

I inspected the code a bit, and you might consider trying the attached patches. The issue here is that the breakpoint will get scheduled multiple times because the check exception stack with the init is part of the breakpoint() routine. This is why you are seeing it on multiple CPUs. This check should be done in early or late init only, else you can have this sort of race condition. Another way to circumvent the problem is to have an atomic inc the breakpoint() routine and a dec in the tasklet, so you can defer a breakpoint by scheduling it, if can not be done immediately. The important part is to make sure the arch handlers were installed in the early init, which was clearly broken.

The attached changes do not implement the inc and dec I mentioned earlier. As a result this possibly breaks the rs232 early debug or pushes it off to be a late_init, but the correct sequence of setting up the die notification will happen on kgdboe for sure.

Perhaps you can experiment a bit further, and report back as I do not have your exact setup with SMP on x86_64 at the moment?

The patches attached have not been totally validated and are part of some continuing uprev work. I'll post final versions for review after I hear back about your results or setup a similar scenario of test equipment.

Thanks,
Jason.
-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Kgdb-bugreport mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/kgdb-bugreport

Reply via email to