All of lore.kernel.org
 help / color / mirror / Atom feed
From: Mathieu Desnoyers <mathieu.desnoyers@polymtl.ca>
To: Steven Rostedt <rostedt@goodmis.org>
Cc: LKML <linux-kernel@vger.kernel.org>, Ingo Molnar <mingo@elte.hu>,
	Thomas Gleixner <tglx@linutronix.de>,
	Peter Zijlstra <peterz@infradead.org>,
	"Paul E. McKenney" <paulmck@linux.vnet.ibm.com>,
	Andrew Morton <akpm@linux-foundation.org>,
	Linus Torvalds <torvalds@linux-foundation.org>
Subject: Re: Lockup in tracepoint unregister in sched switch ftrace plugin
Date: Tue, 21 Oct 2008 00:11:43 -0400	[thread overview]
Message-ID: <20081021041143.GC24142@Krystal> (raw)
In-Reply-To: <alpine.DEB.1.10.0810202336560.25193@gandalf.stny.rr.com>

* Steven Rostedt (rostedt@goodmis.org) wrote:
> 
> Mathieu,
> 
> I just downloaded the latest git repo from Linus's tree, and the 
> sched_switch start up test locks up. I traced it down to the first 
> unregister of a trace point. Here's the call path that I see.
> 
> kernel/trace/trace.c: register_tracer
> kernel/trace/trace_selftest.c: trace_selftest_startup_sched_switch
> kernel/trace/trace_sched_switch.c: sched_switch_trace_ctrl_update
>    " "  : stop_sched_trace
>    " "  : tracing_stop_cmdline_record
>    " "  : tracing_stop_sched_switch
>    " "  : tracing_sched_unregister
> 
>   which calls unregister_trace_sched_switch define as macro to:
> 
> kernel/tracepoint.c: tracepoint_probe_unregister
>    " "  : remove_tracepoint
> kernel/rcupdate.c: rcu_barrier_sched
>    " "  : _rcu_barrier
> 
> where it gets stuck at that "wait_for_completion".
> 
> I'm not sure if, because this is a scheduler trace point that we are 
> hitting some kind of race that is preventing the wait_for_completion to 
> finish, or what.
> 
> I'll look more at it tomorrow.
> 

Hi Steven,

Hrm, does this selftest execute early at boot-time ? If yes, and if
classic RCUs are not up yet at that point in bootup, then using
rcu_barrier() will not work well. Another thing to look into is to make
sure tracing_sched_unregister is never called with interrupts or
preemption off.

Mathieu

> -- Steve
> 
> 

-- 
Mathieu Desnoyers
OpenPGP key fingerprint: 8CD5 52C3 8E3C 4140 715F  BA06 3F25 A8FE 3BAE 9A68

  reply	other threads:[~2008-10-21  4:12 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-10-21  3:48 Lockup in tracepoint unregister in sched switch ftrace plugin Steven Rostedt
2008-10-21  4:11 ` Mathieu Desnoyers [this message]
2008-10-21  4:14 ` Steven Rostedt
2008-10-21 12:08   ` Ingo Molnar
2008-10-21 13:03     ` Steven Rostedt
2008-10-21 16:18   ` Paul E. McKenney

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20081021041143.GC24142@Krystal \
    --to=mathieu.desnoyers@polymtl.ca \
    --cc=akpm@linux-foundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=paulmck@linux.vnet.ibm.com \
    --cc=peterz@infradead.org \
    --cc=rostedt@goodmis.org \
    --cc=tglx@linutronix.de \
    --cc=torvalds@linux-foundation.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.