Monday, December 7, 2015

So, here is my string dump for x64 in windbg

Based on this and that.

$$>a<"c:\_install\dumpstringtofolder.txt" 000007feed816500 1000 c:\temp\stringtest

and the script:

$$ Dumps the managed strings to a file
$$ Platform x64
$$ First argument is the string method table pointer
$$ Second argument is the Min size of the string that needs to be used filter
$$ the strings
$$ Third is the path of the file
.foreach ($string {!dumpheap -short -mt ${$arg1}  -min ${$arg2}})
{
r@$t0=  poi(${$string}+8)*2
.writemem ${$arg3}${$string}.txt ${$string}+c L? @$t0
}

The only other thing I needed this time is this on one of the strings:

!gcroot 0000000100e769f0

To see:

   ->  0000000180006d08 System.Web.Caching.CacheMultiple
            ->  00000001800069c8 System.Web.Caching.CacheCommon
            ->  00000001800034a8 System.Web.RequestTimeoutManager
....
            ->  00000004021b5740 System.Web.SessionState.InProcSessionState
            ->  00000004021b5288 System.Web.SessionState.SessionStateItemCollection
....
            ->  0000000289779a58 ASP.ordercomposer_orderedit_aspx
            ->  000000018c14fe38 XYZ.Ordering.Modules.OrderingViewStatePresister

So this time the root of the problem was in keeping viewstate in the session and not really purging not needed view state away. This was one of the legacy apps and reminded everyone the old none-tasty view state solution from MS :). Viva MVC and looking forward the day with no legacy ASP.NET apps we need to support :)!

No comments: