-
Notifications
You must be signed in to change notification settings - Fork 1
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
[PROF-10045] uploader: fix segfault on failure to init datadog uploader #26
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
when we fail to initialize the datadog symbol uploader, we set the uploader to nil, which will cause a panic later on when handling a new executable for symbol upload. this sets the uploader to symbolication.NewNoopUploader() when the datadog uploader is set up, but fails to be initialized.
r1viollet
approved these changes
Jun 25, 2024
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Thanks for addressing this so fast
Gandem
added a commit
that referenced
this pull request
Jun 25, 2024
* symbolication: support uploading local symbols remotely * readme: document experimental local symbol upload * symbolication: remove noisy error log when we only filter out fs.ErrNotExist, we get frequent failures in the local development environment with the following error: /proc/<pid>/root// is a directory we seem to think that /proc/<pid>/root// is a executable path, this happens for short-lived runc processes where /proc/<pid>/maps has "/" as the pathname for the runc executable itself. so when we try to open the elf file, we first try to read it from /proc/<pid>/map_files and (as the process is short lived) when this fails, we try to open /proc/<pid>/root// which fails with a "is a directory" error instead of fs.ErrNotExist to fix this, we just ignore all errors returned by GetElf() and only log them for debug purposes. https://github.com/elastic/otel-profiling-agent/blob/0945fe6/libpf/process/process.go#L221-L239 * uploader: fix segfault on failure to init datadog uploader (#26) when we fail to initialize the datadog symbol uploader, we set the uploader to nil, which will cause a panic later on when handling a new executable for symbol upload. this sets the uploader to symbolication.NewNoopUploader() when the datadog uploader is set up, but fails to be initialized.
Gandem
added a commit
that referenced
this pull request
Jun 26, 2024
* symbolication: support uploading local symbols remotely * readme: document experimental local symbol upload * symbolication: remove noisy error log when we only filter out fs.ErrNotExist, we get frequent failures in the local development environment with the following error: /proc/<pid>/root// is a directory we seem to think that /proc/<pid>/root// is a executable path, this happens for short-lived runc processes where /proc/<pid>/maps has "/" as the pathname for the runc executable itself. so when we try to open the elf file, we first try to read it from /proc/<pid>/map_files and (as the process is short lived) when this fails, we try to open /proc/<pid>/root// which fails with a "is a directory" error instead of fs.ErrNotExist to fix this, we just ignore all errors returned by GetElf() and only log them for debug purposes. https://github.com/elastic/otel-profiling-agent/blob/0945fe6/libpf/process/process.go#L221-L239 * uploader: fix segfault on failure to init datadog uploader (#26) when we fail to initialize the datadog symbol uploader, we set the uploader to nil, which will cause a panic later on when handling a new executable for symbol upload. this sets the uploader to symbolication.NewNoopUploader() when the datadog uploader is set up, but fails to be initialized.
Gandem
added a commit
that referenced
this pull request
Jun 26, 2024
* symbolication: support uploading local symbols remotely * readme: document experimental local symbol upload * symbolication: remove noisy error log when we only filter out fs.ErrNotExist, we get frequent failures in the local development environment with the following error: /proc/<pid>/root// is a directory we seem to think that /proc/<pid>/root// is a executable path, this happens for short-lived runc processes where /proc/<pid>/maps has "/" as the pathname for the runc executable itself. so when we try to open the elf file, we first try to read it from /proc/<pid>/map_files and (as the process is short lived) when this fails, we try to open /proc/<pid>/root// which fails with a "is a directory" error instead of fs.ErrNotExist to fix this, we just ignore all errors returned by GetElf() and only log them for debug purposes. https://github.com/elastic/otel-profiling-agent/blob/0945fe6/libpf/process/process.go#L221-L239 * uploader: fix segfault on failure to init datadog uploader (#26) when we fail to initialize the datadog symbol uploader, we set the uploader to nil, which will cause a panic later on when handling a new executable for symbol upload. this sets the uploader to symbolication.NewNoopUploader() when the datadog uploader is set up, but fails to be initialized.
Gandem
added a commit
that referenced
this pull request
Jun 27, 2024
* symbolication: support uploading local symbols remotely * readme: document experimental local symbol upload * symbolication: remove noisy error log when we only filter out fs.ErrNotExist, we get frequent failures in the local development environment with the following error: /proc/<pid>/root// is a directory we seem to think that /proc/<pid>/root// is a executable path, this happens for short-lived runc processes where /proc/<pid>/maps has "/" as the pathname for the runc executable itself. so when we try to open the elf file, we first try to read it from /proc/<pid>/map_files and (as the process is short lived) when this fails, we try to open /proc/<pid>/root// which fails with a "is a directory" error instead of fs.ErrNotExist to fix this, we just ignore all errors returned by GetElf() and only log them for debug purposes. https://github.com/elastic/otel-profiling-agent/blob/0945fe6/libpf/process/process.go#L221-L239 * uploader: fix segfault on failure to init datadog uploader (#26) when we fail to initialize the datadog symbol uploader, we set the uploader to nil, which will cause a panic later on when handling a new executable for symbol upload. this sets the uploader to symbolication.NewNoopUploader() when the datadog uploader is set up, but fails to be initialized.
Gandem
added a commit
that referenced
this pull request
Jun 28, 2024
* symbolication: support uploading local symbols remotely * readme: document experimental local symbol upload * symbolication: remove noisy error log when we only filter out fs.ErrNotExist, we get frequent failures in the local development environment with the following error: /proc/<pid>/root// is a directory we seem to think that /proc/<pid>/root// is a executable path, this happens for short-lived runc processes where /proc/<pid>/maps has "/" as the pathname for the runc executable itself. so when we try to open the elf file, we first try to read it from /proc/<pid>/map_files and (as the process is short lived) when this fails, we try to open /proc/<pid>/root// which fails with a "is a directory" error instead of fs.ErrNotExist to fix this, we just ignore all errors returned by GetElf() and only log them for debug purposes. https://github.com/elastic/otel-profiling-agent/blob/0945fe6/libpf/process/process.go#L221-L239 * uploader: fix segfault on failure to init datadog uploader (#26) when we fail to initialize the datadog symbol uploader, we set the uploader to nil, which will cause a panic later on when handling a new executable for symbol upload. this sets the uploader to symbolication.NewNoopUploader() when the datadog uploader is set up, but fails to be initialized.
Gandem
added a commit
that referenced
this pull request
Jun 28, 2024
* symbolication: support uploading local symbols remotely * readme: document experimental local symbol upload * symbolication: remove noisy error log when we only filter out fs.ErrNotExist, we get frequent failures in the local development environment with the following error: /proc/<pid>/root// is a directory we seem to think that /proc/<pid>/root// is a executable path, this happens for short-lived runc processes where /proc/<pid>/maps has "/" as the pathname for the runc executable itself. so when we try to open the elf file, we first try to read it from /proc/<pid>/map_files and (as the process is short lived) when this fails, we try to open /proc/<pid>/root// which fails with a "is a directory" error instead of fs.ErrNotExist to fix this, we just ignore all errors returned by GetElf() and only log them for debug purposes. https://github.com/elastic/otel-profiling-agent/blob/0945fe6/libpf/process/process.go#L221-L239 * uploader: fix segfault on failure to init datadog uploader (#26) when we fail to initialize the datadog symbol uploader, we set the uploader to nil, which will cause a panic later on when handling a new executable for symbol upload. this sets the uploader to symbolication.NewNoopUploader() when the datadog uploader is set up, but fails to be initialized.
Gandem
added a commit
that referenced
this pull request
Jun 28, 2024
* symbolication: support uploading local symbols remotely * readme: document experimental local symbol upload * symbolication: remove noisy error log when we only filter out fs.ErrNotExist, we get frequent failures in the local development environment with the following error: /proc/<pid>/root// is a directory we seem to think that /proc/<pid>/root// is a executable path, this happens for short-lived runc processes where /proc/<pid>/maps has "/" as the pathname for the runc executable itself. so when we try to open the elf file, we first try to read it from /proc/<pid>/map_files and (as the process is short lived) when this fails, we try to open /proc/<pid>/root// which fails with a "is a directory" error instead of fs.ErrNotExist to fix this, we just ignore all errors returned by GetElf() and only log them for debug purposes. https://github.com/elastic/otel-profiling-agent/blob/0945fe6/libpf/process/process.go#L221-L239 * uploader: fix segfault on failure to init datadog uploader (#26) when we fail to initialize the datadog symbol uploader, we set the uploader to nil, which will cause a panic later on when handling a new executable for symbol upload. this sets the uploader to symbolication.NewNoopUploader() when the datadog uploader is set up, but fails to be initialized.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
when we fail to initialize the datadog symbol uploader, we set the uploader to nil, which will cause a panic later on when handling a new executable for symbol upload.
this sets the uploader to
symbolication.NewNoopUploader()
when the datadog uploader is set up, but fails to be initialized.