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
/dump fails with "WriteDumpAsync failed - HRESULT: 0x00000000" #1783
Comments
relevant sidecar log: {"Timestamp":"2022-04-20T18:11:05.7739180Z","EventId":1,"LogLevel":"Error","Category":"Microsoft.Diagnostics.Monitoring.WebApi.Controllers.DiagController","Message":"Request failed.","Exception":"Microsoft.Diagnostics.NETCore.Client.ServerErrorException: WriteDumpAsync failed - HRESULT: 0x00000000 at Microsoft.Diagnostics.NETCore.Client.DiagnosticsClient.ValidateResponseMessage(IpcMessage responseMessage, String operationName, ValidateResponseOptions options) at Microsoft.Diagnostics.NETCore.Client.DiagnosticsClient.WriteDumpAsync(DumpType dumpType, String dumpPath, Boolean logDumpGeneration, CancellationToken token) at Microsoft.Diagnostics.Monitoring.WebApi.DumpService.DumpAsync(IEndpointInfo endpointInfo, DumpType mode, CancellationToken token) in /_/src/Microsoft.Diagnostics.Monitoring.WebApi/DumpService.cs:line 77 at Microsoft.Diagnostics.Monitoring.WebApi.Controllers.DiagController.\u003C\u003Ec__DisplayClass15_0.\u003C\u003CCaptureDump\u003Eb__0\u003Ed.MoveNext() in /_/src/Microsoft.Diagnostics.Monitoring.WebApi/Controllers/DiagController.cs:line 216 --- End of stack trace from previous location --- at Microsoft.Diagnostics.Monitoring.WebApi.Controllers.DiagController.\u003C\u003Ec__DisplayClass31_0.\u003C\u003CInvokeForProcess\u003Eb__0\u003Ed.MoveNext() in /_/src/Microsoft.Diagnostics.Monitoring.WebApi/Controllers/DiagController.cs:line 680 --- End of stack trace from previous location --- at Microsoft.Diagnostics.Monitoring.WebApi.Controllers.DiagController.\u003C\u003Ec__DisplayClass33_0\u00601.\u003C\u003CInvokeForProcess\u003Eb__0\u003Ed.MoveNext() in /_/src/Microsoft.Diagnostics.Monitoring.WebApi/Controllers/DiagController.cs:line 712 --- End of stack trace from previous location --- at Microsoft.Diagnostics.Monitoring.WebApi.Controllers.DiagControllerExtensions.InvokeService[T](ControllerBase controller, Func\u00601 serviceCall, ILogger logger) in /_/src/Microsoft.Diagnostics.Monitoring.WebApi/Controllers/DiagControllerExtensions.cs:line 57","State":{"Message":"Request failed.","{OriginalFormat}":"Request failed."},"Scopes":[{"Message":"SpanId:e67598eb6a7d0998, TraceId:67bda82851289b252c2915565df8ca04, ParentId:0000000000000000","SpanId":"e67598eb6a7d0998","TraceId":"67bda82851289b252c2915565df8ca04","ParentId":"0000000000000000"},{"Message":"ConnectionId:0HMH2V000RF45","ConnectionId":"0HMH2V000RF45"},{"Message":"RequestPath:/dump RequestId:0HMH2V000RF45:00000002","RequestId":"0HMH2V000RF45:00000002","RequestPath":"/dump"},{"Message":"Microsoft.Diagnostics.Monitoring.WebApi.Controllers.DiagController.CaptureDump (Microsoft.Diagnostics.Monitoring.WebApi)","ActionId":"4228df93-4446-4861-9999-4af625ba6659","ActionName":"Microsoft.Diagnostics.Monitoring.WebApi.Controllers.DiagController.CaptureDump (Microsoft.Diagnostics.Monitoring.WebApi)"},{"Message":"ArtifactType:dump","ArtifactType":"dump"}]} |
@dotnet/dotnet-diag, could someone help investigate this issue? The diagnostic command response says it failed but HRESULT is S_OK. Relevant line where this exception occurs in the client library: https://github.com/dotnet/diagnostics/blob/028e7abb5c46a085f3abf0a2080850b4f3e2b11a/src/Microsoft.Diagnostics.NETCore.Client/DiagnosticsClient/DiagnosticsClient.cs#L574 |
Thank you @jander-msft |
Thank you @tommcdon. createdump output
I verified pod had SYS_PTRACE capability: securityContext:
capabilities:
add:
- SYS_PTRACE I also tried adding seccompProfile:
type: Unconfined explicitly but no change. I see similar issues at dotnet/runtime#13687 but appears they were resolved by adding the security context I tried adding. I'm not very familiar with linux memory permissions / kubernetes, are there other requirements? I didn't see anything in examples / documentation. Considering this works locally running under WSL2/podman I may just need to open a ticket with our kubernetes vendor (vmware). |
I've worked through the initial issue (hosts had /proc/sys/kernel/yama/ptrace_scope at 1) but now getting:
Hosts are running on photon os, are there any details on what linux functionality is missing / not implemented? |
The failure is likely coming from this code, so either a call to pread64 or a call to process_vm_readv. .NET doesn't include PhotonOS as a supported distribution as far as I am aware, but we can often accept a PR if you want to do the work to make some additional accomodations. |
This looks like dotnet/runtime#67544 |
I'll close this, appears related to linked fix (or other photon os specific issue) and not specific to dotnet monitor tooling itself. |
Description
When attempting to take a full dump by navigating to /dump endpoint (with defaults) the following error message is returned:
Only mention I see of this error is in #1216 but I've verified folder exists and is writable:
Configuration
Pod with process running RHEL UBI8 (registry.access.redhat.com/ubi8/dotnet-60-runtime:6.0-5)
Sidecar (ms provided container)
/info:
Configured with defaults other than "--no-auth" arg and DOTNETMONITOR_Urls and DOTNETMONITOR_Storage__DumpTempFolder env vars set.
Other information
The text was updated successfully, but these errors were encountered: