From: Masami Hiramatsu (Google) <mhiramat@kernel.org>
To: Masami Hiramatsu (Google) <mhiramat@kernel.org>
Cc: Mark Brown <broonie@kernel.org>,
Steven Rostedt <rostedt@goodmis.org>,
Peter Zijlstra <peterz@infradead.org>,
Ingo Molnar <mingo@kernel.org>,
x86@kernel.org, Jinchao Wang <wangjinchao600@gmail.com>,
Mathieu Desnoyers <mathieu.desnoyers@efficios.com>,
Thomas Gleixner <tglx@linutronix.de>,
Borislav Petkov <bp@alien8.de>,
Dave Hansen <dave.hansen@linux.intel.com>,
"H . Peter Anvin" <hpa@zytor.com>,
Alexander Shishkin <alexander.shishkin@linux.intel.com>,
Ian Rogers <irogers@google.com>,
linux-kernel@vger.kernel.org, linux-trace-kernel@vger.kernel.org,
linux-doc@vger.kernel.org, linux-perf-users@vger.kernel.org,
linux-arm-kernel@lists.infradead.org, Aishwarya.TCV@arm.com
Subject: Re: [PATCH v5 6/8] selftests: tracing: Add a basic testcase for wprobe
Date: Tue, 28 Oct 2025 08:42:22 +0900 [thread overview]
Message-ID: <20251028084222.a3c1ae97d125d9bd88fc565b@kernel.org> (raw)
In-Reply-To: <20251027224347.4c887cc956df63602f377550@kernel.org>
On Mon, 27 Oct 2025 22:43:47 +0900
Masami Hiramatsu (Google) <mhiramat@kernel.org> wrote:
> On Fri, 24 Oct 2025 22:31:06 +0100
> Mark Brown <broonie@kernel.org> wrote:
>
> > On Tue, Sep 23, 2025 at 10:17:47AM +0900, Masami Hiramatsu (Google) wrote:
> > > From: Masami Hiramatsu (Google) <mhiramat@kernel.org>
> > >
> > > Add 'add_remove_wprobe.tc' testcase for testing wprobe event that
> > > tests adding and removing operations of the wprobe event.
> >
> > Since this series has landed in -next we've been seeing hangs on a range
> > of arm64 platforms running the ftrace tests, it looks like it's all of
> > them. Unfortunately the systems lock up with no output as soon as they
> > start trying to do something with wprobes:
> >
> > # ok 19 Generic dynamic event - add/remove kprobe events
> > # ok 20 Generic dynamic event - add/remove synthetic events
> > # ok 21 Generic dynamic event - add/remove tracepoint probe events
> > # ok 22 Generic dynamic event - add/remove tracepoint probe events on module
> > # ok 23 Generic dynamic event - add/remove/test uprobe events
> >
> > the next test being add_remove_wprobe.tc, which doesn't seem to
> > complete. Full log (for what little it's worth):
> >
> > https://lava.sirena.org.uk/scheduler/job/2000440#L1860
> >
> > I turned on -vvv logging and that generated the rather spectacularly
> > more verbose:
> >
> > https://lava.sirena.org.uk/scheduler/job/2000676/log_file/plain
> >
> > (in a somewhat processed format unfortunately.). Looking at that log I
> > do notice a bunch of "unexpected operators" reported by the shell, these
> > systems are running dash not bash, though that doesn't seem related. It
> > looks like the script hangs in reset_trigger_file while grepping the
> > trigger files rather than actually trying to do the test.
> >
> > Sorry about the delay in reporting this.
>
> OK, eventually, I confirmed it is stopped on enabling wprobe
>
> + . /mnt/ftrace/test.d/dynevent/add_remove_wprobe.tc
> + echo 0
> + echo
> + TARGET=jiffies
> + echo 'w:my_wprobe w@jiffies'
> + grep -q my_wprobe dynamic_events
> + '[' 0 -ne 0 ]
> + test -d events/wprobes/my_wprobe
> + '[' 0 -ne 0 ]
> + echo 1
>
Interestingly, this stops in the cpu_function_call(). It does not call
__perf_install_in_context().
~ # cd /sys/kernel/tracing/
/sys/kernel/tracing # echo 'w:my_wprobe w@jiffies' >> dynamic_events
/sys/kernel/tracing # echo 1 > events/wprobes/my_wprobe/enable
[ 54.942288] trace_wprobe: enable_trace_wprobe called
[ 54.945306] trace_wprobe: trying to register wprobes
[ 54.947367] trace_wprobe: __register_trace_wprobe called
[ 54.949586] trace_wprobe: registering wprobe at addr: 0xffffb6ce429fb200, len: 4, type: 2
[ 54.951639] Creating wide hw breakpoint on CPU 0
[ 54.966390] Creating kernel counter on CPU 0 for event type 5
[ 54.967758] perf_install_in_context: event 00000000736da1d9 ctx 000000005d4db900 cpu 0
[ 54.972015] perf_install_in_context2: event 00000000736da1d9 ctx set to 000000005d4db900
[ 54.976697] cpu_function_call: calling function on CPU 0, func: __perf_install_in_context+0x0/0x2c8
What happen if the cpu calls function on itself by
smp_call_function_single() on arm64?
smp_call_function_single(this_cpu, remote_function, &data, 1);
Thank you,
--
Masami Hiramatsu (Google) <mhiramat@kernel.org>
next prev parent reply other threads:[~2025-10-27 23:42 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-09-23 1:16 [PATCH v5 0/8] tracing: wprobe: Add wprobe for watchpoint Masami Hiramatsu (Google)
2025-09-23 1:16 ` [PATCH v5 1/8] tracing: wprobe: Add watchpoint probe event based on hardware breakpoint Masami Hiramatsu (Google)
2025-10-01 0:30 ` Masami Hiramatsu
2025-09-23 1:17 ` [PATCH v5 2/8] x86/hw_breakpoint: Unify breakpoint install/uninstall Masami Hiramatsu (Google)
2025-09-23 1:17 ` [PATCH v5 3/8] x86/hw_breakpoint: Add arch_reinstall_hw_breakpoint Masami Hiramatsu (Google)
2025-09-23 1:17 ` [PATCH v5 4/8] HWBP: Add modify_wide_hw_breakpoint_local() API Masami Hiramatsu (Google)
2025-09-23 1:17 ` [PATCH v5 5/8] tracing: wprobe: Add wprobe event trigger Masami Hiramatsu (Google)
2025-09-23 1:17 ` [PATCH v5 6/8] selftests: tracing: Add a basic testcase for wprobe Masami Hiramatsu (Google)
2025-10-24 21:31 ` Mark Brown
2025-10-27 2:29 ` Masami Hiramatsu
2025-10-27 13:43 ` Masami Hiramatsu
2025-10-27 23:42 ` Masami Hiramatsu [this message]
2025-10-28 1:55 ` Masami Hiramatsu
2025-10-28 15:42 ` Masami Hiramatsu
2025-10-29 2:43 ` Masami Hiramatsu
2025-10-29 8:20 ` Masami Hiramatsu
2025-10-30 0:09 ` Masami Hiramatsu
2025-11-12 12:15 ` Mark Brown
2025-11-12 13:30 ` Masami Hiramatsu
2025-09-23 1:17 ` [PATCH v5 7/8] selftests: tracing: Add syntax " Masami Hiramatsu (Google)
2025-09-23 1:18 ` [PATCH v5 8/8] selftests: ftrace: Add wprobe trigger testcase Masami Hiramatsu (Google)
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=20251028084222.a3c1ae97d125d9bd88fc565b@kernel.org \
--to=mhiramat@kernel.org \
--cc=Aishwarya.TCV@arm.com \
--cc=alexander.shishkin@linux.intel.com \
--cc=bp@alien8.de \
--cc=broonie@kernel.org \
--cc=dave.hansen@linux.intel.com \
--cc=hpa@zytor.com \
--cc=irogers@google.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-doc@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-perf-users@vger.kernel.org \
--cc=linux-trace-kernel@vger.kernel.org \
--cc=mathieu.desnoyers@efficios.com \
--cc=mingo@kernel.org \
--cc=peterz@infradead.org \
--cc=rostedt@goodmis.org \
--cc=tglx@linutronix.de \
--cc=wangjinchao600@gmail.com \
--cc=x86@kernel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).