-
Notifications
You must be signed in to change notification settings - Fork 350
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
dotnet-dump on Debian 9 fails with Core dump generation FAILED #449
Comments
You shouldn't need sudo/superuser unless the app was launched as root or another user (and maybe not even then). Including the rest of the diagnostic team @dotnet/dotnet-diag to see if there is anything obvious. |
The process I'm trying to dotnet-dump is running as another user. |
In the case of a different use, this could be explained by the permissions on the pipe. After all, the pipe is created with user rights. @josalem. As for the createdump failure regarding access violation, I wonder if we have permissions to trace a different process and write them to a file. Does this repro with any app you're trying to dump as a different user? |
The box I was attempting to do a dump on was a production service. I'll try to repro with a smaller app testing when running as a service user vs the same user. |
Ok I can confirm dumping the service as the same user works but fails with |
After running: $ sudo -H -u myserviceuser bash -c '/opt/dotnet/tools/dotnet-dump collect -p 19668' It does bypass the |
Oh hmm running
On the hello world app produces the same error. Could this be a path or permission thing related to loading some files that dotnet-dump needs? |
That's a possibility, although sounds a bit hard to believe. The runtime will try to do the dumping using a binary that's expected to be side by side with the runtime. It sounds possible the path could mess this up. Also, is the runtime deployed in any special way? Is the service a self-contained app? |
Ok so here's a better layout of my result as to control my rambling:
|
We used to deploy this application as a self-contained app but have recently switched to the cross platform version and are running it with However with having the same results with a helloworld app I don't think this matters. |
The helloworld app for reference (in F#):
|
Oh, ok i think I found the issue with the MyServiceUser/MyServiceUser scenario. I was running the dump from my user folder and since
So moving to |
I guess this now is just more of a user experience/documentation issue.
|
|
I'm adding a --diag option to dotnet-dump collect so the dump creation logging is displayed. Unfortunately it is on the target process console like the above |
Issue: dotnet#406 Add --diag option to dotnet-dump collect to help diagnose issues like dotnet#449 and others. Update FAQ.
Even if we only get an HRESULT back from the runtime, we could still check known problematic conditions in advance? In the cases here I think we know what the current user id is, and we know where we are requesting to write the dump. If that user id doesn't have write access to that location we could generate a informative error message about that in dotnet-dump without having asked the runtime to do any work. |
Thanks to all you for getting back to me so quickly and letting me bounce ideas off you! |
@TheAngryByrd thanks for all the feedback :) it's hard to imagine all the different setups people may have and it's hard to document these scenarios if we don't hear of their existence in the wild. Hope your scenario got unblocked, and lets us know if you need any help with other bugs or behaviors you think should be documented. |
Moving to 5.0 to track this portion of the issue:
This part is done:
|
I created this issue about better error messaging: https://github.com/dotnet/diagnostics/issues/733. Changing the to use the temp directory is too much of a breaking change. |
Hopefully I have addressed your concerns. |
So I'm getting two errors in the context of running dotnet-dump on Debian 9. This is a VM and not a docker container.
The first is a permission error.
To which the answer is to always sudo right? but after I run that I get "Core dump generation FAILED"
General info:
The text was updated successfully, but these errors were encountered: