vs-threading icon indicating copy to clipboard operation
vs-threading copied to clipboard

!dumpasync Failed to parse the output of !do 0000000000000000: Invalid parameter 0000000000000000

Open ghost opened this issue 7 years ago • 6 comments

Bug description

0:000> !dumpasync
Failed to parse the output of !do 0000000000000000: Invalid parameter 0000000000000000

Failed to parse the output of !do 0000000000000000: Invalid parameter 0000000000000000

Failed to parse the output of !do 0000000000000000: Invalid parameter 0000000000000000

Failed to parse the output of !do 0000000000000000: Invalid parameter 0000000000000000

Failed to parse the output of !do 0000000000000000: Invalid parameter 0000000000000000

Failed to parse the output of !do 0000000000000000: Invalid parameter 0000000000000000

[actual stacks]

Repro steps

I can provide a dump internally if needed.

Expected behavior

The actual task "stacks"

Actual behavior

Failed to parse the output of !do 0000000000000000: Invalid parameter 0000000000000000

  • Version used: v15.8.168.release.zip
  • Application (if applicable): windbg

Additional context

ghost avatar Oct 11 '18 21:10 ghost

With verbose output:

Execute command: !C:\Windows\Microsoft.NET\Framework64\v4.0.30319\SOS.dll.do 000000e46210a330
Name:        System.Threading.Tasks.UnwrapPromise`1[[System.Threading.Tasks.VoidTaskResult, mscorlib]]
MethodTable: 00007ffd5d00a4d8
EEClass:     00007ffd5ca5fff0
Size:        80(0x50) bytes
File:        C:\Windows\Microsoft.Net\assembly\GAC_64\mscorlib\v4.0_4.0.0.0__b77a5c561934e089\mscorlib.dll
Fields:
              MT    Field   Offset                 Type VT     Attr            Value Name
00007ffd5d059180  4001a20       38         System.Int32  1 instance                0 m_taskId
00007ffd5d056e10  4001a21        8        System.Object  0 instance 0000000000000000 m_action
00007ffd5d056e10  4001a22       10        System.Object  0 instance 0000000000000000 m_stateObject
00007ffd5d038278  4001a23       18 ...sks.TaskScheduler  0 instance 0000000000000000 m_taskScheduler
00007ffd5d049d00  4001a24       20 ...eading.Tasks.Task  0 instance 0000000000000000 m_parent
00007ffd5d059180  4001a25       3c         System.Int32  1 instance         33555456 m_stateFlags
00007ffd5d056e10  4001a38       28        System.Object  0 instance 0000000000000000 m_continuationObject
00007ffd5d03afd0  4001a3d       30 ...tingentProperties  0 instance 0000000000000000 m_contingentProperties
00007ffd5d059180  4001a1e      f40         System.Int32  1   shared           static s_taskIdCounter
                                 >> Domain:Value  000000e452fc08a0:416591 <<
00007ffd5d04e018  4001a1f      ea0 ...Tasks.TaskFactory  0   shared           static s_factory
                                 >> Domain:Value  000000e452fc08a0:000000e454b4f598 <<
00007ffd5d056e10  4001a39      ea8        System.Object  0   shared           static s_taskCompletionSentinel
                                 >> Domain:Value  000000e452fc08a0:000000e454b4f5c0 <<
00007ffd5d040b50  4001a3a      f44       System.Boolean  1   shared           static s_asyncDebuggingEnabled
                                 >> Domain:Value  000000e452fc08a0:0 <<
00007ffd5c9445a8  4001a3b      eb0 ....Task, mscorlib]]  0   shared           static s_currentActiveTasks
                                 >> Domain:Value  000000e452fc08a0:000000e454b4f5d8 <<
00007ffd5d056e10  4001a3c      eb8        System.Object  0   shared           static s_activeTasksLock
                                 >> Domain:Value  000000e452fc08a0:000000e454b4f628 <<
00007ffd5d018d98  4001a3e      ec0 ...bject, mscorlib]]  0   shared           static s_taskCancelCallback
                                 >> Domain:Value  000000e452fc08a0:000000e454b4f640 <<
00007ffd5d018ed8  4001a3f      ec8 ...rties, mscorlib]]  0   shared           static s_createContingentProperties
                                 >> Domain:Value  000000e452fc08a0:000000e454b4f680 <<
00007ffd5d049d00  4001a40      ed0 ...eading.Tasks.Task  0   shared           static s_completedTask
                                 >> Domain:Value  000000e452fc08a0:0000000000000000 <<
00007ffd5d018f70  4001a41      ed8 ....Task, mscorlib]]  0   shared           static s_IsExceptionObservedByParentPredicate
                                 >> Domain:Value  000000e452fc08a0:000000e454b4f6d8 <<
00007ffd5d044938  4001a42      ee0 ...g.ContextCallback  0   shared           static s_ecCallback
                                 >> Domain:Value  000000e452fc08a0:000000e454b66038 <<
00007ffd5d019000  4001a43      ee8 ...bject, mscorlib]]  0   shared           static s_IsTaskContinuationNullPredicate
                                 >> Domain:Value  000000e452fc08a0:000000e454b4f718 <<
00007ffd5d049d00  4001a1c       28 ...eading.Tasks.Task  0   shared         TLstatic t_currentTask
    >> Thread:Value 14a4:0000000000000000 14e4:000000e462109c18 1594:0000000000000000 15fc:000000e46210b198 1600:000000e46210b678 c70:0000000000000000 <<
00007ffd5d004198  4001a1d       30 ....Tasks.StackGuard  0   shared         TLstatic t_stackGuard
    >> Thread:Value 14a4:0000000000000000 14e4:000000e454c09d48 1594:000000e462a64ca0 15fc:0000000000000000 1600:0000000000000000 c70:000000e403e80720 <<
00007ffd5d04d7b8  40019e3       40 ...ks.VoidTaskResult  1 instance 000000e46210a370 m_result
00007ffd5db59ee0  40019e4        0 ...esult, mscorlib]]  0   shared           static s_Factory
                                 >> Domain:Value dynamic statics NYI 000000e452fc08a0:NotInit  <<
00007ffd5db0d6e0  40019e5        8 ...lib]], mscorlib]]  0   shared           static TaskWhenAnyCast
                                 >> Domain:Value dynamic statics NYI 000000e452fc08a0:NotInit  <<
00007ffd5d058838  4001a75       44          System.Byte  1 instance                1 _state
00007ffd5d040b50  4001a76       45       System.Boolean  1 instance                1 _lookForOce

Execute command: !C:\Windows\Microsoft.NET\Framework64\v4.0.30319\SOS.dll.do 0000000000000000
Invalid parameter 0000000000000000

Failed to parse the output of !do 0000000000000000: Invalid parameter 0000000000000000

Execute command: !C:\Windows\Microsoft.NET\Framework64\v4.0.30319\SOS.dll.do 0000000000000000
Invalid parameter 0000000000000000

Failed to parse the output of !do 0000000000000000: Invalid parameter 0000000000000000

ghost avatar Oct 11 '18 21:10 ghost

I'm not sure this windbg extension has been vetted for 64-bit dumps. That might be what you're running into here.

AArnott avatar Oct 12 '18 01:10 AArnott

@AArnott, is there any progress? I am trying to use the latest stable version for analysis of 64 bit dump, but ran into something similar.

Actual behavior

0:000> .load SosThreadingTools_x64.dll
0:000> !dumpasync
e0434352 Exception in SosThreadingTools_x64.dumpasync debugger extension.
      PC: 00007ffc`a6b54c48  VA: 00000000`00000000  R/W: 80070002  Parameter: 00000000`00000000

Version used: v16.4.39 x64 Application (if applicable): WinDbg 10.0.18362.1 x64

0UserName avatar Jan 01 '20 11:01 0UserName

In my tests it works. But we're relying on private implementation details of the CLR in this windbg extension so there's never a guarantee that it works over time or with all inputs. If you can share a dump (privately) that I can try it with, or if you can debug through it yourself (seeing as the extension is OSS) and send a PR to fix it, we can make progress on this.

AArnott avatar Jan 03 '20 03:01 AArnott

Unfortunately, I can not share the dump, as this will be a violation. I will try to reproduce the situation on a test dump and maybe I'll try to debug the extension myself, but I have almost no experience with C ++ and understanding the extension 'bindings'. In any case, it will take me some time.

0UserName avatar Jan 06 '20 17:01 0UserName

There's no C++ here. The !dumpasync extension is written in C#. The bindings you don't need to worry about.

AArnott avatar Jan 06 '20 18:01 AArnott