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

北慕城南 提交于 2019-12-11 03:25:55

问题


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>

回答1:


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



来源:https://stackoverflow.com/questions/23543365/why-locals-and-parameters-show-no-data-on-the-stackframe-when-using-sos-dll-to-d

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!