* [Bug runtime/25852] New: Avoid allocating the temp string buffer for kernel backtraces on the kernel stack
@ 2020-04-18 19:42 agentzh at gmail dot com
2020-09-28 21:13 ` [Bug runtime/25852] " agentzh at gmail dot com
0 siblings, 1 reply; 2+ messages in thread
From: agentzh at gmail dot com @ 2020-04-18 19:42 UTC (permalink / raw)
To: systemtap
https://sourceware.org/bugzilla/show_bug.cgi?id=25852
Bug ID: 25852
Summary: Avoid allocating the temp string buffer for kernel
backtraces on the kernel stack
Product: systemtap
Version: unspecified
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: runtime
Assignee: systemtap at sourceware dot org
Reporter: agentzh at gmail dot com
Target Milestone: ---
I've noted that for large -DMAXBACKTRACE=N values, the kernel module won't even
compile at all:
```
$ /opt/stap/bin/stap -DMAXBACKTRACE=80 -e 'probe oneshot { print_backtrace() }'
In file included from
/tmp/stap9dNBFe/stap_e6cbcb21af7634fac8b4ca07b2e07a58_1196_src.c:83:
/opt/stap/share/systemtap/runtime/stack.c: In function
‘_stp_stack_print_fallback.isra.0.constprop’:
/opt/stap/share/systemtap/runtime/stack.c:235:1: error: the frame size of 648
bytes is larger than 512 bytes [-Werror=frame-larger-than=]
235 | }
| ^
cc1: all warnings being treated as errors
make[1]: *** [scripts/Makefile.build:265:
/tmp/stap9dNBFe/stap_e6cbcb21af7634fac8b4ca07b2e07a58_1196_src.o] Error 1
make: *** [Makefile:1652: /tmp/stap9dNBFe] Error 2
WARNING: kbuild exited with status: 2
Pass 4: compilation failed. [man error::pass4]
```
This is due to the fact that in the stap runtime C function
`_stp_stack_print_fallback`, the local variable `unsigned long
entries[MAXBACKTRACE]` would take too much space on the kernel stack. Shall we
instead allocate this out of the stack, like in the ctx data structure?
--
You are receiving this mail because:
You are the assignee for the bug.
^ permalink raw reply [flat|nested] 2+ messages in thread
* [Bug runtime/25852] Avoid allocating the temp string buffer for kernel backtraces on the kernel stack
2020-04-18 19:42 [Bug runtime/25852] New: Avoid allocating the temp string buffer for kernel backtraces on the kernel stack agentzh at gmail dot com
@ 2020-09-28 21:13 ` agentzh at gmail dot com
0 siblings, 0 replies; 2+ messages in thread
From: agentzh at gmail dot com @ 2020-09-28 21:13 UTC (permalink / raw)
To: systemtap
https://sourceware.org/bugzilla/show_bug.cgi?id=25852
agentzh <agentzh at gmail dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |RESOLVED
Resolution|--- |DUPLICATE
--- Comment #1 from agentzh <agentzh at gmail dot com> ---
OK, this is duplicate with PR26673.
*** This bug has been marked as a duplicate of bug 26673 ***
--
You are receiving this mail because:
You are the assignee for the bug.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2020-09-28 21:13 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-04-18 19:42 [Bug runtime/25852] New: Avoid allocating the temp string buffer for kernel backtraces on the kernel stack agentzh at gmail dot com
2020-09-28 21:13 ` [Bug runtime/25852] " agentzh at gmail dot com
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 read-only IMAP folder(s) and NNTP newsgroup(s).