Source-Changes-D archive

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

Re: CVS commit: src/sys



On Fri, Nov 20, 2009 at 03:36:36AM +0000, Mindaugas Rasiukevicius wrote:
> In fact, I am not convinced that such IPL tracking is very useful - we have
> reduced amount of IPLs, which is much simpler model than we used to have, and
> the problem you were recently debugging was miss-interpretation of certain
> spin-mutex behaviour.

You have not described the bug itself, or the cause of the bug, but the
cause of the difficulty in finding the cause of the bug. :-) And you're
doing so with the benefit of hindsight.

The bug was a panic, "cpu_switchto: switching above IPL_SCHED (8)", that
typically occurred in the tty code.  The reason was not clear until
evidence provided by SPLDEBUG pointed to a shortcut/optimization of spin
mutexes that made my new code interact with tty locking in unexpected
ways.

After painstakingly debugging a program, I find that it is easy to say,
"The answer is obvious, now.  It should have been obvious all along.  It
will be obvious the next time, for sure."  I am tempted to delete all of
the instrumentation.  But then I am just as ill-prepared for the next
"obvious" bug, and so are the developers who I work with.

SPLDEBUG is single-purpose.  It also has some bugs, which I am happy to
describe.  But let's keep it until we come up with something better.

Dave

-- 
David Young             OJC Technologies
dyoung%ojctech.com@localhost      Urbana, IL * (217) 278-3933


Home | Main Index | Thread Index | Old Index