Why locals and parameters show no data on the stackframe when using sos.dll to debug .net app?

StackOverflow https://stackoverflow.com/questions/23543365

  •  18-07-2023
  •  | 
  •  

سؤال

My .net 4 asp.net application is processing a request, but the request is timeout, so I get a dump and try to debug the live app online( revised: just analyse the dump file, not attatch to the live process of the app.). I find a thread that consumes the request costs 1 min 5 sec. I go through the stack of that thread. I want to try to find out the parameters and local variables, but the command output shows no data, only some of the local variables have value. May I know why this happened? the method 'FilterEntity' calls 'Concat', the 'Concat' is not returned. So I assume that the locals of 'FilterEntity' must be there. Where am I wrong?

I have the source code. I know this piece of code is very slow is because there is a very big string like '...AEc3988sfdfJDelxn...' to be concated with ',' repeatly in a loop.

I want to find the real big string, the evidence of the root cause.

!clrstack -a:

00000000741ebe10 000007feeffa1ff0 System.String.Concat(System.String, System.String, System.String)
    PARAMETERS:
        str0 = <no data>
        str1 = <no data>
        str2 = <no data>
    LOCALS:
        <no data>
        <no data>

00000000741ebed0 000007ff0080e918 Business.FilterDataProcess.FilterEntity(Request, Entity)
    PARAMETERS:
        Request = <no data>
        Entity = <no data>
    LOCALS:
        <no data>
        <no data>
        <no data>
        <no data>
        <no data>
        <no data>
        <no data>
        <no data>
        <no data>
        <no data>
        <no data>
        <no data>
        <no data>
        <no data>
        <no data>
        <no data>
        <no data>
        <no data>
        <no data>
        <no data>
        <no data>
        <no data>
        0x00000000741ec160 = 0x000000078b27a018
        <no data>
هل كانت مفيدة؟

المحلول

The problem is that you're debugging optimized code. In this case, tracking info for parameters and locals is not generated by the jitter. To disable optimization to make debugging easier, see the following: Making an Image Easier to Debug

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top