-
Notifications
You must be signed in to change notification settings - Fork 67
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[BUG] fail to unwind stack trace, lose data in one thread #2060
Comments
@kakkoyun @javierhonduco Hi could you take a look at this? Thanks There might be two issues:
|
We could simplify the reproduction by one thread only.
and we got this in sudo cat /sys/kernel/debug/tracing/trace_pipe
|
Thanks for opening this issue. Will take a look over the next few days. |
I meet a similar problem in ubuntu 22.04 as well. I try to disable swap for a process with cgroup v2 like the following: cgcreate -g memory:parca
cd /sys/fs/cgroup/parca/ && echo 0 > memory.swap.max
cgexec -g memory:parca <comm> more symbols are resolved after disabling swap, but I can still see errors for the above process
|
More symbols are resolved or more stacks are unwound and sent to the server? Thanks for trying disabling SWAP! Could you try running https://github.com/javierhonduco/bookmark on your machine while your applications is running and send the statistics belonging to your process' main executable and dynamic libraries? Sorry that I don't provide good instructions on how to install it or run it yet, but |
it's weird that the symbol resolution becomes as poor as it used to be with another a few runs...
|
Two thoughts, your program is totally reasonable and on my system it has perfectly valid DWARF information. I run Fedora 38 with clang++ version
Also got no errors, and the profile looks reasonable to me (minus symbolization). Of course, this depends on a system-to-systems basis depending on what pages might be already present in memory or not |
@dreamerlzl will take a closer look at these metrics next week, thanks for gathering them :) |
update: with another environment, the symbol resolution looks fine here and no "rip should not be zero" for the simple example. and the bookmark looks like this(without disabling swap):
environment:
|
Could you also provide the info per physical page just for the stack memory mapping for the process that fails with |
|
It's strange that the problem can always be reproduced on an AWS bare metal with ubuntu 22.04.3 but not in a VM(with the same bare metal). Could it be the case that hardware security makes a difference? |
The latest update is this issue seems to be related to some security enhancements we patched on ubuntu. Still trying to identify the specific change. |
Oh interesting, let us know as you learn more! (FYI Javier is on PTO this and next week) |
@joeyleeeeeee97 Let us know what you find out. One more thing that could potentially be useful here would be the output of |
@javierhonduco On my side it's 266: (85) call bpf_probe_read_user#-69216 for parca-agent commit: 1a09d01 BTW, I still suspect the hardware plays a role here. This problem only occurs on physical host but not VM of the same OS |
Hi @dreamerlzl, I no longer work at Polar Signals and I am no longer contributing to this project. Feel free to contact another maintainer |
Wish you all the best! Thank you for all your work to open-source world. |
Describe the bug
Run a simple cpp demo, but failing to parse symbols and failing to get profiling info from one thread.
I am build the agent and parca server from the latest main branch.
To Reproduce
clang++ -g -o jjjttt main.cpp -lpthread
./jjjttt
Expected behavior
Profiling with all symobls.
Screenshots or Profiles (using https://pprof.me)
Only one thread is proflied...
The other thread has
Logs
sudo cat /sys/kernel/debug/tracing/trace_pipe
agent log no obvious error.
parca server log(some symbols are missing as well)
Has
storage symbolization request failed" err="fetching metadata: debuginfo metadata not found"
and
ErrUnknownPC
Software (please complete the following information):
parca-agent --version
]parca --version
]Workload (please complete the following information):
Environment (please complete the following information):
cat /etc/*-release
]DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=22.04
DISTRIB_CODENAME=jammy
DISTRIB_DESCRIPTION="Ubuntu 22.04.3 LTS"
PRETTY_NAME="Ubuntu 22.04.3 LTS"
NAME="Ubuntu"
VERSION_ID="22.04"
VERSION="22.04.3 LTS (Jammy Jellyfish)"
VERSION_CODENAME=jammy
ID=ubuntu
ID_LIKE=debian
HOME_URL="https://www.ubuntu.com/"
SUPPORT_URL="https://help.ubuntu.com/"
BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/"
PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy"
UBUNTU_CODENAME=jammy
uname -r
]5.15.0-78-generic
uname -m
]x86_64
kubectl --version
]no
no
Additional context
The text was updated successfully, but these errors were encountered: