Skip to content

Dump file not created when process crashes #104256

@AArnott

Description

@AArnott

Description

I have a particularly annoying bug that frequently crashes the test runner in Azure Pipelines but thus far hasn't repro'd locally on a dev box. I need a dump of the process to investigate, but no dump in produced.

Here is a sample crash.

In the cases I have, the crashes happen on linux. What additional steps must I take in my pipeline to get a dump collected?

.NET SDK 8.0.300
.NET 8.0.6

Reproduction Steps

The command that runs the test includes --blame-crash and other switches.
On Windows agents I also acquire procdump and set the PROCDUMP_PATH environment variable.

Expected behavior

A dump file that Azure Pipelines artifacts can collect.

Actual behavior

The dump fails to be collected.

[createdump] Gathering state for process 9534 dotnet
[createdump] Crashing thread 2616 signal 6 (0006)
[createdump] Target process is alive
The active test run was aborted. Reason: Test host process crashed : Unhandled exception. System.InvalidOperationException: The message pump in 'JsonRpcMessagePackLengthTests.JoinableTaskFactory_IntegrationBothSides_IntraProcess' isn't running any more.
   at Xunit.Sdk.UISynchronizationContext.Post(SendOrPostCallback d, Object state)
   at Microsoft.VisualStudio.Threading.JoinableTaskFactory.PostToUnderlyingSynchronizationContext(SendOrPostCallback callback, Object state)
   at Microsoft.VisualStudio.Threading.JoinableTaskFactory.PostToUnderlyingSynchronizationContextOrThreadPool(SingleExecuteProtector callback)
   at Microsoft.VisualStudio.Threading.JoinableTask.Post(SendOrPostCallback d, Object state, Boolean mainThreadAffinitized)
   at Microsoft.VisualStudio.Threading.JoinableTask.JoinableTaskSynchronizationContext.Post(SendOrPostCallback d, Object state)
   at System.Threading.Tasks.AwaitTaskContinuation.RunCallback(ContextCallback callback, Object state, Task& currentTask)
--- End of stack trace from previous location ---
   at System.Threading.Tasks.Task.<>c.<ThrowAsync>b__128_1(Object state)
   at System.Threading.QueueUserWorkItemCallback.Execute()
   at System.Threading.ThreadPoolWorkQueue.Dispatch()
   at System.Threading.PortableThreadPool.WorkerThread.WorkerThreadStart()
[createdump] Problem suspending threads: ptrace(ATTACH, 13331) FAILED No such process (3)
[createdump] Failure took 9ms

Regression?

Pretty sure, yes, since I have multiple times verified that dump collection works in the past. Probably the last time I verified this was on .NET 6.

Known Workarounds

No response

Configuration

No response

Other information

No response

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions