server: add --enable-core-dump flag#15245
Conversation
This ensures Envoy can core dump when the dumpability bit might have been unset (e.g.: running inside a container with fewer capabilities than the ones Envoy itself has). Fixes envoyproxy#15242. Signed-off-by: Raul Gutierrez Segales <rgs@pinterest.com>
|
I've got |
Signed-off-by: Raul Gutierrez Segales <rgs@pinterest.com>
|
@rgs1 can you open an issue or add in the existing issue a Windows label so that we know that we have to implement this feature on windows |
What's the exact problem for Windows? Afaik Windows doesn't have capabilities nor a dumpability bit... |
Which makes me wonder if we should hide via ifdefs the cc: @mattklein123 for thoughts |
Signed-off-by: Raul Gutierrez Segales <rgs@pinterest.com>
We have flag that is not working for one platform so we should probably document it. Additionally windows can generate memory dumps from failing applications https://docs.microsoft.com/en-us/windows/client-management/generate-kernel-or-complete-crash-dump (the same applies for user mode applications) edit: I am not sure if it makes sense to push this functionality to envoy codebase or to the docker image ( see docs). IMHO the latter makes sense more to me but either one should be doable |
Yeah I agree, I actually wonder if we should hide the flag entirely from platforms for which it isn't implemented.
Ok, but is this already working out of the box for Windows or is there anything else to be done? In fairness, this
You are talking about the Windows case not this PR for the Linux case? |
Windows case |
Signed-off-by: Raul Gutierrez Segales <rgs@pinterest.com>
mattklein123
left a comment
There was a problem hiding this comment.
Yeah I agree that if an option only applies to certain platforms we should document it as such and only expose it on those platforms, optimally without a ton of different ifdefs (e.g. using platform capabilities). Thanks for working on this.
/wait
* fix/improve cli doc * introduce linux/platform_impl.cc for Linux specific prctl calls * enabling core dump now happens in MainCommonBase instead of InstanceImpl, because we need access to PlatformImpl * also, move PlatformImpl from MainCommon to MainCommonBase * added some bazel helpers to distinguish Linux from the rest of Posix Signed-off-by: Raul Gutierrez Segales <rgs@pinterest.com>
Signed-off-by: Raul Gutierrez Segales <rgs@pinterest.com>
Signed-off-by: Raul Gutierrez Segales <rgs@pinterest.com>
Signed-off-by: Raul Gutierrez Segales <rgs@pinterest.com>
Signed-off-by: Raul Gutierrez Segales <rgs@pinterest.com>
Signed-off-by: Raul Gutierrez Segales <rgs@pinterest.com>
Signed-off-by: Raul Gutierrez Segales <rgs@pinterest.com>
This should fix the coverage issue and catch any regressions if our kernel friends were to ever break prctl(). Signed-off-by: Raul Gutierrez Segales <rgs@pinterest.com>
Signed-off-by: Raul Gutierrez Segales <rgs@pinterest.com>
* check that enableCoreDump() was called * check the logs for the expected warn entry Signed-off-by: Raul Gutierrez Segales <rgs@pinterest.com>
Signed-off-by: Raul Gutierrez Segales <rgs@pinterest.com>
This probably is enough and we don't need to additionally use `config_settings_group` to group things further. Signed-off-by: Raul Gutierrez Segales <rgs@pinterest.com>
Signed-off-by: Raul Gutierrez Segales <rgs@pinterest.com>
|
/retest |
|
Retrying Azure Pipelines: |
|
/retest |
|
Retrying Azure Pipelines: |
Signed-off-by: Raul Gutierrez Segales <rgs@pinterest.com>
Signed-off-by: Raul Gutierrez Segales <rgs@pinterest.com>
Signed-off-by: Raul Gutierrez Segales <rgs@pinterest.com>
mattklein123
left a comment
There was a problem hiding this comment.
Thanks LGTM with small comment.
/wait
Signed-off-by: Raul Gutierrez Segales <rgs@pinterest.com>
This ensures Envoy can core dump when the dumpability bit might have
been unset (e.g.: running inside a container with fewer capabilities
than the ones Envoy itself has).
Fixes #15242.
Signed-off-by: Raul Gutierrez Segales rgs@pinterest.com