-
Notifications
You must be signed in to change notification settings - Fork 280
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
only kernel stack frames reported inside orbstack docker container on macOS #170
Comments
Is the samples timeline and/or the flamegraph empty or are you missing symbols? If you see frames from your app without further information (symbols missing):
If that doesn't help, you can enable the "dev" mode by double-clicking on the icon on the left of "devfiler" menu entry. You then see some more menu items. Check if you get gRPC messages and that DB stats show entries for TraceEvents, Stacktraces etc and let us know what you see. |
tried with a UTM.app VM and same thing. then i tried the old devfiler 0.6.0 and it started showing a lot more data! it still has those build-id errors, so i will downgrade to 7d2285e for now EDIT: the old builds work in the VM but still not inside orbstack. will try inside docker in the VM next |
in UTM it works on the host:
but inside docker i get:
inside orbstack the kernel is newer:
|
The issue seems specific to running within a container. Only kernel activity is shown. Reproduced via |
Just to clarify, the profiler is a system-wide profiler, so it requires root privileges. Can you confirm that you run the docker container with |
Ideally, try running the docker container with something like
|
Yes I was using |
Thanks, with those options it works in docker on Ubuntu. I see all the information from the host too which isn't ideal, but better than nothing. In orbstack there's still only kernel-data, but I assume that's something specific to that environment. |
Thanks for testing.
That's exactly what the profiler has been designed for: getting all information from the host while doing continuous profiling. Filtering is assumed to be done on the backend or by the user interface. But if you think that limiting the view/collection of the profiler is a realistic use case, please open a separate issue with your ideas for discussion.
Maybe someone working on MacOS can chime in here. |
I meet a similar issue on container running on K8s. There is only kernel stack frames. The base image of the container is ubuntu. The agent can work in a VM environment. In the VM, I am able to see other frames, like Java or Python. I have grant the privileged to the container.
One thing to note is that the when the container is up and run ebpf-profiler for the first time, it will fail due to the below error
I fixed it by mount
I attach the log in attachment with option |
@leonard520 Regarding the "Failed to probe tracepoint": Can you please update to the latest ebpf-profiler? The tracepoint check has been dropped meanwhile. |
@rockdaboot Do you have any clue why there is only kernel stack frames in my container environment? Feel free to let me know if you want to me to try something. |
@leonard520 I assume that for some reason the unwinder runs into an error. Ideally, we could reproduce this somehow on amd64 (can you?). @fabled, maybe you can have look at the above |
@leonard520 I assume that you use devfiler for visualization. Can you run the profiler with |
@rockdaboot Today I reproduce the issue again for a longer time. I notice there are a lot of log like below I tried to do |
No this is not a problem. I made a test where I changed the code to look into |
@rockdaboot Thanks for the verification. I did another test in container and record the below things. I am wondering how the profiler list all the PIDs to trace.
Attach the full log for reference. |
@leonard520 If I understand correctly you're running the profiler in Kubernetes, right? In that case, you will need to ensure the following is set:
Specifically, setting |
@Gandem I think your answer clarified my confusion. Thank you very much. After trying to add your spec to my pod, I encountered this error.
I am wondering if it is related with the On the other hand, I’m also considering whether this approach has security risks. Sharing the same PID namespace with the host reduces isolation and increases the potential for container escape. |
I hit the same issue with orbstack. I suspect that issue is caused by the fact that:
The word "almost" seems to refer to the fact that the VMs seem to actually be containers of their own. At least this is what I'm looking for signs of this inside of the Orb VM:
In practice this means that the PIDs seen by the VM are not the same PIDs as seen by the kernel, which breaks the eBPF profiler. I tried working around this by running the profiler via Anyway, I ended up firing up a real linux VM in the cloud. If somebody still figures out a way to make OrbStack work, that'd be great, but for now it should probably be considered an unsupported environment. |
This is seems like OTLP profiling signal breakage (we're making lots of breaking changes). If you use the latest devfiler and compile an agent using 47e8410 it should work. |
i'm using orbstack on an arm64 mac to profile a linux app.
perf
works as expected and shows me native symbols from user-land activitybut in devfiler i'm not seeing much come through. it seems connected, there are no errors, but there is very little data. i see some kernel symbols.
how can i debug this further?
The text was updated successfully, but these errors were encountered: