Closed ocampeau closed 1 year ago
will this issue https://github.com/keyval-dev/opentelemetry-go-instrumentation/issues/36 could help you?
it needs /odigos-launcher/launch
to create some memory area for writing.
Oh my yes thank you! Sorry for not looking that up before. I will close this issue.
no worry 😄
Expected Behavior
I have a Go process running on my machine, which is a web server using
net/http
. The executable path is/home/ocampeau/hello
When I run the following command, I expect the tool to emit traces when an HTTP request is received by my process
Actual Behavior
Instead, I get a panic
Steps to Reproduce the Problem
sudo OTEL_TARGET_EXE=PATH_TO_EXECUTABLE ./kv-go-instrumentation
Additional Info
My guess is that there is a bug with the permission check of the memory mapping of the process.
When I inspect /proc/PID/maps, I see this:
It seems that the code segment referenced in the memory mapping of the process has READ and EXECUTABLE permissions, but not WRITE. In this case, the start address of the code segment would be
00400000
and the end address would be00612000
.When I update the following code to remove the check on the write permissions, the tool is indeed working as expected: