Re: [BUG] Stack overflow when running perf and function tracer

2020-10-30 Thread Thomas Gleixner
On Fri, Oct 30 2020 at 12:36, Thomas Gleixner wrote: > On Fri, Oct 30 2020 at 11:32, Peter Zijlstra wrote: > So the real question is what else is on that stack which blows it up > close to 4k? Btw, it would be massively helpful for this kind of crash > to print the actual stack depth per entry in t

Re: [BUG] Stack overflow when running perf and function tracer

2020-10-30 Thread Thomas Gleixner
On Fri, Oct 30 2020 at 11:32, Peter Zijlstra wrote: > On Fri, Oct 30, 2020 at 11:26:01AM +0100, Thomas Gleixner wrote: > >> > The only thing I can come up with in a hurry is that that dummy_iregs >> > thing really should be static. That's 168 bytes of stack out the window >> > right there. >> >> W

Re: [BUG] Stack overflow when running perf and function tracer

2020-10-30 Thread Peter Zijlstra
On Fri, Oct 30, 2020 at 11:26:01AM +0100, Thomas Gleixner wrote: > > The only thing I can come up with in a hurry is that that dummy_iregs > > thing really should be static. That's 168 bytes of stack out the window > > right there. > > What's worse is perf_sample_data which is 384 bytes and is 64

Re: [BUG] Stack overflow when running perf and function tracer

2020-10-30 Thread Thomas Gleixner
On Fri, Oct 30 2020 at 10:00, Peter Zijlstra wrote: > On Fri, Oct 30, 2020 at 12:27:22AM -0400, Steven Rostedt wrote: >> I found a bug in the recursion protection that prevented function >> tracing from running in NMI context. Applying this fix to 5.9 worked >> fine (tested by running perf record a

Re: [BUG] Stack overflow when running perf and function tracer

2020-10-30 Thread Peter Zijlstra
On Fri, Oct 30, 2020 at 12:27:22AM -0400, Steven Rostedt wrote: > I found a bug in the recursion protection that prevented function > tracing from running in NMI context. Applying this fix to 5.9 worked > fine (tested by running perf record and function tracing at the same > time). But when I appli

[BUG] Stack overflow when running perf and function tracer

2020-10-29 Thread Steven Rostedt
I found a bug in the recursion protection that prevented function tracing from running in NMI context. Applying this fix to 5.9 worked fine (tested by running perf record and function tracing at the same time). But when I applied the patch to 5.10-rc1, it blew up with a stack overflow: perf: inter