-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
Unable to capture dumps from containers based on sample images #4271
Comments
@jander-msft - Can you take a look and determine what the underlying issue is? |
@dotnet/dotnet-diag, do you know if there is a way to preserve the createdump executable when publish ing applications as single file executables? It seems this is either trimmed out or excluded automatically, which means we cannot capture dumps of single file applications. |
Single file hasn't supported createdump based dumps yet. Createdump not existing in the published output is expected right now |
Seems like dotnet/runtime#68676 is tracking this capability for .NET 8. @mthalman, is there a need to have the samples to publish as single file? It's not obvious to me why taking the extra step to make the application single file in a container would have any benefit over just self-contained and trimmed. |
I thought there was something about trimming that made single file publishing the better option but I could be wrong. Adding @richlander for his take. |
I think the main difference between single-file publishing and non-single-file publishing is that single-file will produce a self-extracting executable (which is easier to acquire) whereas non-single-file publishing will publish the files to output directory from which all files need to be copied. Trimming should work in both cases. The other thought I had was that maybe single-file would reduce the image size because all of the runtime and application files are compressed into a single compression container. It seems that this is the case in absolute terms:
The single file image is 2.8% smaller. I'm not sure if this is significant savings. Assuming that demonstration of acquisition of a single file (which is technically not the case today since the app image is copying everything in the output directory, which includes pdbs, json files, and the If the small size reduction is the most significant difference between single-file vs non-single-file in terms of capabilities or other measurable aspects that the samples are trying to achieve, I would like to posit that the sample images should remove single-file publishing in favor of preserving diagnostics capabilities (in this particular case, dump collection). When dotnet/runtime#68676 is completed, then the samples can add back the single-file publishing usage, barring any other regression of diagnostic capabilities. |
[Triage] @jander-msft - Can you validate that the single file deployment is indeed the culprit here? There was a switch from Debian to Alpine so it'd be good to just ensure that's not a factor in this as well. Assuming the single file deployment is the sole factor here, we need to address the fact that our guidance states that single-file deployment is the way to go for trimming scenarios and that doesn't align with the available tools (createdump) available for the container. It's just fundamentally incompatible. To address this, we should update the sample Dockerfile to not enable single-file deployment. |
There are 2 cases where PublishSingleFile helps:
When I was experimenting with the different app settings in a very basic Minimal API ASP.NET Core app, here were the numbers I found:
|
That, but also the single file host doesn't include the DAC or DBI |
I've validated that I am able to capture dumps from the Alpine aspnetcore slim image with the changes that are made in #4534 |
Describe the Bug
Using diagnostic tooling to capture dumps from containers that are running the sample images fail with error message "Problem launching createdump (may not have execute permissions): execve(./createdump) FAILED No such file or directory"
Steps to Reproduce
Bug logged from customer: dotnet/dotnet-monitor#2932
Using
dotnet-dump
will have this issue too.Other Information
This appears to have regressed when the samples were changed from Debian to Alpine and trimming was introduced: f55f6c8#diff-a4b03be896dbf59bfab94d8ecb7216f2f7fedd1ff7feb4ba17a8fee9e1b53dba
The text was updated successfully, but these errors were encountered: