Re: bug: ftrace & lockdep badness

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Steven Rostedt
Date: Wednesday, November 5, 2008 - 9:04 am

On Wed, 5 Nov 2008, Heiko Carstens wrote:


[...]


[...]


Yes, this does seem to be the case.

Perhaps Peter or Ingo can come up with some ideas on how to solve this. 
Let me try to rephrase the problem.

In __local_bh_disable() we call add_preempt_count(SOFTIRQ_OFFSET)

in add_preempt_count (in sched.c)

  preempt_count() += val;
  if (preempt_count() == val)
	trace_preempt_off(...)

in trace_preempt_off we record into the ring buffer. But the ring buffer 
will call spin_lock_irqsave (it use to be raw_spin_lock, where this was 
not an issue). Note, there is development to make the ring buffer 
lockless, but until that time, we need to come up with a real solution.

Now we enter the lockdep code, but we are not in a full state transition 
and we get a WARN_ON triggered by the lockdep code (have SOFTIRQ_OFFSET 
set but we did not yet tell lockdep we are in a softirq).

This is the type of problems we deal with when we have the tracer tracing 
lockdep code at the same time the lockdep code is checking the tracer.

-- Steve
--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
bug: ftrace & lockdep badness, Heiko Carstens, (Wed Nov 5, 5:37 am)
Re: bug: ftrace & lockdep badness, Steven Rostedt, (Wed Nov 5, 6:07 am)
Re: bug: ftrace & lockdep badness, Steven Rostedt, (Wed Nov 5, 9:04 am)
Re: bug: ftrace & lockdep badness, Ingo Molnar, (Wed Nov 5, 9:30 am)
Re: bug: ftrace & lockdep badness, Steven Rostedt, (Wed Nov 5, 9:47 am)
Re: bug: ftrace & lockdep badness, Frédéric Weisbecker, (Wed Nov 5, 10:01 am)
Re: bug: ftrace & lockdep badness, Ingo Molnar, (Wed Nov 5, 10:08 am)
Re: bug: ftrace & lockdep badness, Steven Rostedt, (Wed Nov 5, 10:13 am)