[unknown] frames when profilee quits before the profiler
- Dominant language
- C
- Stars
- 22.7k
- Forks
- 4.1k
- Avg merge
- 10d 4h
- Merged PRs (30d)
- 3
Description
It is reproducible with `offwaketime` and `offcputime` scripts. Other scripts I didn't test.
## Steps to reproduce *(in terms of terminal commands)*
```haskell
$ cat test.c
#include
void f() {
for (size_t i = 0; i < 5; ++i) {
sleep(1);
}
}
void g() {
f();
}
int main() {
g();
}
$ gcc test.c -o test -O0 -g3
$ ./test &; sudo /usr/share/bcc/tools/offwaketime -Up $(pgrep test)
[1] 127746
Tracing blocked time (us) by user off-CPU and waker stack... Hit Ctrl-C to end.
[1] + 127746 done ./test
^C
waker: swapper/3 0
-- --
b'[unknown]'
target: test 127746
3000441
```
### Expected
Stack something like
```haskell
waker: swapper/3 0
-- --
b'[f]'
b'[g]'
b'[main]'
target: test 127746
3000441
```
### Actual
Vast part of the stack is missing, and the one frame from userspace says `unknown` which doesn't match any actual function name.
## Version
* bcc: tested both with `0.13.0` and `0.14.0`
* kernel: tested with `5.4.28` and `5.6.4`
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.