<output id="qn6qe"></output>

    1. <output id="qn6qe"><tt id="qn6qe"></tt></output>
    2. <strike id="qn6qe"></strike>

      亚洲 日本 欧洲 欧美 视频,日韩中文字幕有码av,一本一道av中文字幕无码,国产线播放免费人成视频播放,人妻少妇偷人无码视频,日夜啪啪一区二区三区,国产尤物精品自在拍视频首页,久热这里只有精品12

      Windbg分析高內(nèi)存占用問(wèn)題

      1. 問(wèn)題簡(jiǎn)介

      最近產(chǎn)品發(fā)布大版本補(bǔ)丁更新,一商超客戶升級(jí)后,反饋系統(tǒng)經(jīng)常奔潰,導(dǎo)致超市的收銀系統(tǒng)無(wú)法正常收銀,現(xiàn)場(chǎng)排隊(duì)付款的顧客更是抱怨聲聲。為了緩解現(xiàn)場(chǎng)的情況, 客戶都是手動(dòng)回收IIS應(yīng)用程序池才能解決。
      現(xiàn)場(chǎng)排隊(duì)情況

      這樣的后果是很嚴(yán)重的,接到反饋,第一時(shí)間想到的是加內(nèi)存吧,這樣最快。但是客戶從8G-->16G-->32G,只是延長(zhǎng)了每次奔潰的時(shí)間,但是并沒(méi)有解決系統(tǒng)卡頓的問(wèn)題。到這里,也基本猜測(cè)了問(wèn)題所在了,肯定是什么東西一直在吃內(nèi)存且得不到釋放。這種問(wèn)題,也就只能打Dump分析了。

      2. 打Dump

      遠(yuǎn)程客戶應(yīng)用服務(wù)器,32G內(nèi)存占用已經(jīng)消耗了78%,而現(xiàn)場(chǎng)已經(jīng)反饋收銀系統(tǒng)接近奔潰了,要求先強(qiáng)制回收內(nèi)存。反正也要奔潰了,先打Dump再說(shuō)吧。
      (PS:打Dump會(huì)掛起進(jìn)程,導(dǎo)致應(yīng)用無(wú)法響應(yīng)!而打Dump的耗時(shí),也是根據(jù)當(dāng)時(shí)進(jìn)程的內(nèi)存占用有關(guān),內(nèi)存占用越大,耗時(shí)越久。)
      打開(kāi)任務(wù)管理器,選擇對(duì)應(yīng)的IIS進(jìn)程,右鍵創(chuàng)建轉(zhuǎn)儲(chǔ)文件(Dump)。
      打Dump

      結(jié)果,Dump文件是生成的,結(jié)果當(dāng)分析的時(shí)候,發(fā)現(xiàn)Windbg提示Dump無(wú)效。說(shuō)明Dump文件創(chuàng)建的有問(wèn)題。觀察任務(wù)管理器,發(fā)現(xiàn)內(nèi)存占用一下就降下來(lái)了,原來(lái)是之前的進(jìn)程直接奔潰了,重啟了一個(gè)W3WP進(jìn)程。

      既然直接從任務(wù)管理器無(wú)法創(chuàng)建,就使用第三方工具收集Dump吧。經(jīng)過(guò)Goggle,找到一款很好用的Dump收集工具ProcDump,是一個(gè)命令行應(yīng)用,其主要用途是監(jiān)視應(yīng)用程序的CPU或內(nèi)存峰值并在峰值期間生成Dump。

      因?yàn)槭歉邇?nèi)存占用問(wèn)題,我們使用以下命令來(lái)抓取dump:
      (PS:可以使用進(jìn)程名稱,也可以使用進(jìn)程ID來(lái)指定要?jiǎng)?chuàng)建Dump的進(jìn)程。當(dāng)有多個(gè)相同名稱的進(jìn)程時(shí),必須使用進(jìn)程ID來(lái)指定!)

      procdump w3wp -m 20480 -o D:\Dumps (當(dāng)內(nèi)存超過(guò)20G時(shí)抓取一個(gè)w3wp進(jìn)程的MiniDump)

      上面就是我踩得第一個(gè)坑,因?yàn)槟J(rèn)抓取的是MiniDump,很快就抓下來(lái),文件也很小,正在我得意的時(shí)候,Windbg加載Dump分析的時(shí)候,發(fā)現(xiàn)包含的信息很少,根本無(wú)法進(jìn)行進(jìn)一步的分析。

      調(diào)整創(chuàng)建Dump的命令,添加-ma參數(shù)即可創(chuàng)建完整Dump。

      procdump w3wp -ma -m 20480 -o D:\Dumps (當(dāng)內(nèi)存超過(guò)20G時(shí)抓取一個(gè)w3wp進(jìn)程的完整Dump)

      結(jié)果再一次,當(dāng)內(nèi)存占用到達(dá)20G,占比80%的時(shí)候,Dump再次創(chuàng)建失敗,提示:Procdump Error writing dump file。再一次感覺(jué)到絕望。不過(guò)至少有錯(cuò)誤提示,Google一把,果然存在天涯淪落人。Procdump Error writing dump file: 0x80070005 Error 0x80070005 (-2147024891): Access is denied。大致的意思是說(shuō),當(dāng)90S內(nèi)Dump文件沒(méi)有成功創(chuàng)建的話(也就意外這w3wp進(jìn)程被掛起了90s),IIS檢測(cè)到w3wp進(jìn)程掛起超過(guò)90s沒(méi)有響應(yīng)就會(huì)終止進(jìn)程,重現(xiàn)創(chuàng)建一個(gè)新的進(jìn)程。好嘛,真是處處是坑。

      這個(gè)坑,也讓我開(kāi)始真正停下來(lái)思考問(wèn)題。羅馬不是一日建成的,內(nèi)存也不是一下?lián)伪摹?/strong>我干嘛死腦筋非要到內(nèi)存占用超過(guò)80%才去打Dump呢呢呢???!

      煥然大悟,如醍醐灌頂。

      procdump w3wp -ma -m 8000 -o D:\Dumps (當(dāng)內(nèi)存超過(guò)8000M時(shí)抓取一個(gè)w3wp進(jìn)程的完整Dump,并輸出到D:\Dumps文件夾)

      此時(shí)內(nèi)存占用在40%左右,這次Dump終于成功創(chuàng)建了。

      3..分析Dump

      分析Dump,上WinDbg。如果對(duì)WinDbg不理解,可以看我這篇WinDbg學(xué)習(xí)筆記

      接下來(lái)就是一通命令亂敲,我盡量解釋清晰。

      0:000> !dumpheap -stat //檢查當(dāng)前所有托管類型的統(tǒng)計(jì)信息
      ....
      00007ffdb9387a98   777101     69462436 System.Char[]
      00007ffdb938c988   588917    115563505 System.Byte[]
      00007ffdb9389220  1026406    119828936 System.Int32[]
      00007ffdb93516a8   663559    128819040 System.Collections.Generic.Dictionary`2+Entry[[System.String, mscorlib],[System.Object, mscorlib]][]
      00000218c6c30a80  6436865    197832116      Free
      00007ffdae9cc240    23171    273333144 System.Collections.Generic.HashSet`1+Slot[[System.String, mscorlib]][]
      00007ffdb9391f28 13885170    333244080 System.Boolean
      00007ffd5c24a068 14003455    560138200 Kingdee.BOS.JSON.JSONArray
      00007ffdb9386fc0 14373648   1393615400 System.Object[]
      00007ffdb9386948 76146065   4000287202 System.String
      Total 138435970 objects
      

      使用dumpheap -stat命令查看當(dāng)前所有托管類型的統(tǒng)計(jì)信息。從輸出的結(jié)果來(lái)看:

      1. 其中占用內(nèi)存最多當(dāng)屬System.String類型,接近4G的大小(是不是很吃驚?!)。
      2. 其次System.Object[]類型占有1.3G大小。
      3. Kingdee.BOS.JSON.JSONArray類型也大概占用了560M。

      我們首先來(lái)分析占用最多的System.String類型,看看有什么發(fā)現(xiàn)。

      0:000> !dumpheap -mt 00007ffdb9386948 -min 200 //查看200byte以上的string
      Address               MT     Size
      ...
      0000021bcbaf5158 00007ffdb9386948     1140
      0000021d375d1038 00007ffdb9386948   149698     
      0000021d375f5920 00007ffdb9386948   149698     
      0000021d3765b138 00007ffdb9386948   149706     
      0000021d37f739c8 00007ffdb9386948   217120     
      0000021d37fa8a08 00007ffdb9386948   190162     
      0000021d38047330 00007ffdb9386948  1224698     
      0000021d3829d348 00007ffdb9386948  1224698     
      0000021d386bd678 00007ffdb9386948  2610994     
      0000021d38bb8500 00007ffdb9386948  2610994     
      
      
      Statistics:
                    MT    Count    TotalSize Class Name
      00007ffdb9386948    10991     76632628 System.String
      Total 10991 objects
      

      從上面的輸出可以發(fā)現(xiàn):

      1. 單個(gè)System.String類型最大占用2M以上。
      2. 超過(guò)200byte的字節(jié)的大小的System.String總大小也不過(guò)76M。(所以我們也不必深究大的String對(duì)象。)

      那我們索性挑一個(gè)小點(diǎn)的對(duì)象來(lái)看看存儲(chǔ)的是什么字符串,來(lái)滿足一下我們的好奇心。

      0.000> !do 0000021bcbaf5158 //使用!do命令查看一個(gè)對(duì)象的內(nèi)容
      Name:        System.String
      MethodTable: 00007ffdb9386948
      EEClass:     00007ffdb8c850e0
      Size:        1140(0x474) bytes
      File:        C:\Windows\Microsoft.Net\assembly\GAC_64\mscorlib\v4.0_4.0.0.0__b77a5c561934e089\mscorlib.dll
      String:      5b13710029d012False2052_T_BD_MATERIAL_MATERIAL.FAuxPropertyIdFBaseUnitIdFCategoryIDFChargeIDFCheckIncomingFDefaultVendorFErpClsIDFInvPtyIdFIsAffectPlanFIsAffectPlan1FIsBatchManageFIsComControlFIsEnableFIsEnable1FIsExpParToFlotFIsInventoryFIsPRFIsReturnMaterialFIsSourceControlFIsVmiBusinessFNameFNumberFPlanModeFPurchasePriceUnitIdFPurchaseUnitIdFPurPriceURNomFPurPriceURNumFPurURNomFPurURNumFReceiveAdvanceDaysFReceiveDelayDaysFReceiveMaxScaleFReceiveMinScaleFSalePriceUnitIdFSaleUnitIdFSpecificationFStockIdFStockPlaceIdFStoreUnitIDFTaxTypeFUseOrgId111193
      Fields:
                    MT    Field   Offset                 Type VT     Attr            Value Name
      00007ffdb9389288  400026f        8         System.Int32  1 instance              557 m_stringLength
      00007ffdb9387b00  4000270        c          System.Char  1 instance               35 m_firstChar
      00007ffdb9386948  4000274       90        System.String  0   shared           static Empty
                                       >> Domain:Value  00000218c6c4d220:NotInit  0000021d52d81840:NotInit  <<
      

      似乎是基礎(chǔ)資料字段信息。那接下來(lái)使用!gcroot命令查看其對(duì)應(yīng)的GC根,看看到底是什么對(duì)象持有其引用,導(dǎo)致占用內(nèi)存得不到釋放。

      0:000> !gcroot 0000021bcbaf5158 //使用!gcroot 查看一個(gè)對(duì)象的gc根
      HandleTable:
          00000218c6ff15e8 (pinned handle)
          -> 0000021cc75ebe68 System.Object[]
          -> 0000021bc7629a10 Kingdee.BOS.Cache.KCacheManagerFactory
          -> 0000021bc7629ab8 System.Collections.Generic.Dictionary`2[[System.String, mscorlib],[Kingdee.BOS.Cache.AbstractKCacheManager, Kingdee.BOS]]
          -> 0000021c4da6fa48 System.Collections.Generic.Dictionary`2+Entry[[System.String, mscorlib],[Kingdee.BOS.Cache.AbstractKCacheManager, Kingdee.BOS]][]
          -> 00000218c83861b8 Kingdee.BOS.Cache.KCacheManager
          -> 00000218c8386630 Kingdee.BOS.Cache.ECache.ECacheManager
          -> 00000218c83866e8 System.Collections.Concurrent.ConcurrentDictionary`2[[System.String, mscorlib],[System.Collections.Generic.HashSet`1[[System.String, mscorlib]], System.Core]]
          -> 0000021bcbae0c70 System.Collections.Concurrent.ConcurrentDictionary`2+Tables[[System.String, mscorlib],[System.Collections.Generic.HashSet`1[[System.String, mscorlib]], System.Core]]
          -> 0000021bcbad0128 System.Collections.Concurrent.ConcurrentDictionary`2+Node[[System.String, mscorlib],[System.Collections.Generic.HashSet`1[[System.String, mscorlib]], System.Core]][]
          -> 0000021bcbb34bf8 System.Collections.Concurrent.ConcurrentDictionary`2+Node[[System.String, mscorlib],[System.Collections.Generic.HashSet`1[[System.String, mscorlib]], System.Core]]
          -> 0000021bcbada790 System.Collections.Concurrent.ConcurrentDictionary`2+Node[[System.String, mscorlib],[System.Collections.Generic.HashSet`1[[System.String, mscorlib]], System.Core]]
          -> 0000021a49766460 System.Collections.Generic.HashSet`1[[System.String, mscorlib]]
          -> 00000219540976b0 System.Collections.Generic.HashSet`1+Slot[[System.String, mscorlib]][]
          -> 0000021bcbaf5158 System.String
      
      Found 1 unique roots (run '!GCRoot -all' to see all roots).
      

      從以上輸出可以看出:

      1. 該String類型被一個(gè)Hashset所持有。
      2. Cache關(guān)鍵字可以看出該String類型是被緩存所持有。

      分析到這里,我們大致可以得出一個(gè)結(jié)論:

      String類型占用4G內(nèi)存,絕大多數(shù)是由緩存所占用,才導(dǎo)致String類型得不到釋放。

      那我們是不是可以猜測(cè)內(nèi)存占用持續(xù)走高是不是被緩存撐爆的呢?

      帶著這個(gè)疑問(wèn)我們來(lái)繼續(xù)分析下Kingdee.BOS.JSON.JSONArray類型。

      0:000> !dumpheap -mt 00007ffd5c24a068 //輸出托管堆上的所有JSONArray對(duì)象
               Address               MT     Size
      ....
      0000021975972b48 00007ffd5c24a068       40     
      00000218c933f060 00007ffd5c24a068       40     
      00000218c7605990 00007ffd5c24a068       40     
      00000218c7605af0 00007ffd5c24a068       40     
      00000218c7605c50 00007ffd5c24a068       40     
      00000218c7605e18 00007ffd5c24a068       40     
      00000218c7605fa0 00007ffd5c24a068       40     
      00000218c7606198 00007ffd5c24a068       40     
      00000218c7606338 00007ffd5c24a068       40     
      00000218c76064b0 00007ffd5c24a068       40     
      User interrupt.
      

      從輸出結(jié)果來(lái)看:

      1. 滿屏都是40byte的JSONArray。只能使用Ctrl+Break命令中止輸出。

      但為了保險(xiǎn)期間,我們來(lái)驗(yàn)證下有沒(méi)有100byte以上的JSONArray

      0:000> !dumpheap -mt 00007ffd5c24a068 -min 100
               Address               MT     Size
      
      Statistics:
                    MT    Count    TotalSize Class Name
      Total 0 objects
      

      這時(shí)我們可以大膽猜測(cè)所有的JSONArray對(duì)象都是40byte。從而可以得出另一個(gè)猜測(cè)占用560M內(nèi)存的JSONArray,都具有相似的對(duì)象結(jié)構(gòu)。接下來(lái)我們來(lái)驗(yàn)證這個(gè)猜測(cè)。隨機(jī)選擇幾個(gè)對(duì)象,看看其內(nèi)容具體是什么。

      0:000> !DumpObj /d 0000021975972b48  //查看第一個(gè)JSONArray
      Name:        System.Object[]
      MethodTable: 00007ffdb9386fc0
      EEClass:     00007ffdb8d4aa00
      Size:        88(0x58) bytes
      Array:       Rank 1, Number of elements 8, Type CLASS (Print Array)
      Fields:
      None
      

      從輸出可以看出:

      1. JSONArray實(shí)質(zhì)是System.Object[]類型。
      2. 對(duì)應(yīng)的MethodTable: 00007ffdb9386fc0

      如果你記性好的話,我們應(yīng)當(dāng)還記得占用內(nèi)存第二多的就是這個(gè)System.Object[]類型,占用1.3G。翻到上面,你可以發(fā)現(xiàn)其MethodTable和上面的統(tǒng)計(jì)信息是一致的。
      (PS:到這里我們是不是可以猜測(cè):System.Object[]占用的內(nèi)存無(wú)法釋放,就是由于被JSONArray持有引用導(dǎo)致的呢?

      既然是數(shù)組,就使用!DumpArray 命令來(lái)解開(kāi)數(shù)組的面紗。

      0:000> !DumpArray /d 0000021975972b48 
      Name:        System.Object[]
      MethodTable: 00007ffdb9386fc0
      EEClass:     00007ffdb8d4aa00
      Size:        88(0x58) bytes
      Array:       Rank 1, Number of elements 8, Type CLASS
      Element Methodtable: 00007ffdb9386f28
      [0] 0000021975972a08
      [1] 0000021975972a70
      [2] 0000021975972a40
      [3] 0000021ac75e87b8
      [4] 0000021975972b10
      [5] 0000021975972ba0
      [6] null
      [7] null
      0:000> !DumpObj /d 0000021975972a08
      Name:        System.String
      MethodTable: 00007ffdb9386948
      EEClass:     00007ffdb8c850e0
      Size:        54(0x36) bytes
      File:        C:\Windows\Microsoft.Net\assembly\GAC_64\mscorlib\v4.0_4.0.0.0__b77a5c561934e089\mscorlib.dll
      String:      555d8ca25a6261
      Fields:7
                    MT    Field   Offset                 Type VT     Attr            Value Name
      00007ffdb9389288  400026f        8         System.Int32  1 instance               14 m_stringLength
      00007ffdb9387b00  4000270        c          System.Char  1 instance               35 m_firstChar
      00007ffdb9386948  4000274       90        System.String  0   shared           static Empty
                                       >> Domain:Value  00000218c6c4d220:NotInit  0000021d52d81840:NotInit  <<
      

      從以上輸出可以看出,其共有8個(gè)子項(xiàng),我們?cè)匐S機(jī)挑幾個(gè)子項(xiàng)看看是什么內(nèi)容。

      0:000> !DumpObj /d 0000021975972a70
      Name:        System.String
      MethodTable: 00007ffdb9386948
      EEClass:     00007ffdb8c850e0
      Size:        42(0x2a) bytes
      File:        C:\Windows\Microsoft.Net\assembly\GAC_64\mscorlib\v4.0_4.0.0.0__b77a5c561934e089\mscorlib.dll
      String:      FHTZDLB
      Fields:
                    MT    Field   Offset                 Type VT     Attr            Value Name
      00007ffdb9389288  400026f        8         System.Int32  1 instance                8 m_stringLength
      00007ffdb9387b00  4000270        c          System.Char  1 instance               50 m_firstChar
      00007ffdb9386948  4000274       90        System.String  0   shared           static Empty
                                       >> Domain:Value  00000218c6c4d220:NotInit  0000021d52d81840:NotInit  <<
      0:000> !DumpObj /d 0000021975972a40
      Name:        System.String
      MethodTable: 00007ffdb9386948
      EEClass:     00007ffdb8c850e0
      Size:        42(0x2a) bytes
      File:        C:\Windows\Microsoft.Net\assembly\GAC_64\mscorlib\v4.0_4.0.0.0__b77a5c561934e089\mscorlib.dll
      String:      發(fā)貨通知單列表
      Fields:
                    MT    Field   Offset                 Type VT     Attr            Value Name
      00007ffdb9389288  400026f        8         System.Int32  1 instance                8 m_stringLength
      00007ffdb9387b00  4000270        c          System.Char  1 instance             6279 m_firstChar
      00007ffdb9386948  4000274       90        System.String  0   shared           static Empty
                                       >> Domain:Value  00000218c6c4d220:NotInit  0000021d52d81840:NotInit  <<
      

      我們可以看到一個(gè)字符串內(nèi)容是FHTZDLB,另一個(gè)是發(fā)貨通知單列表。看到這,我立馬就條件反射的想到,這不就是我們的菜單信息嘛。為了驗(yàn)證我的想法,連續(xù)查看幾個(gè)JSONArray,都是相似的內(nèi)容。

      這時(shí),我們繼續(xù)發(fā)揚(yáng)敢猜敢做的精神。是不是內(nèi)存被菜單緩存撐爆的?!

      為了驗(yàn)證這一猜測(cè),我們繼續(xù)從Dump中尋找佐證。使用~* e!clrstack來(lái)看看所有線程的調(diào)用堆棧吧。

      0:000> ~* e!clrstack
      OS Thread Id: 0x11dc (0)
      Unable to walk the managed stack. The current thread is likely not a 
      managed thread. You can run !threads to get a list of managed threads in
      the process
      Failed to start stack walk: 80070057
      OS Thread Id: 0x2b2c (28)
              Child SP               IP Call Site
      00000076cff7ecc8 00007ffdca2e6bf4 [HelperMethodFrame_1OBJ: 00000076cff7ecc8] System.Threading.WaitHandle.WaitMultiple(System.Threading.WaitHandle[], Int32, Boolean, Boolean)
      00000076cff7ee00 00007ffdb91af67c System.Threading.WaitHandle.WaitAny(System.Threading.WaitHandle[], Int32, Boolean) [f:\dd\ndp\clr\src\BCL\system\threading\waithandle.cs @ 454]
      00000076cff7ee60 00007ffdb201b2fb System.Net.TimerThread.ThreadProc()
      00000076cff7ef10 00007ffdb915ca72 System.Threading.ExecutionContext.RunInternal(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object, Boolean) [f:\dd\ndp\clr\src\BCL\system\threading\executioncontext.cs @ 954]
      00000076cff7efe0 00007ffdb915c904 System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object, Boolean) [f:\dd\ndp\clr\src\BCL\system\threading\executioncontext.cs @ 902]
      00000076cff7f010 00007ffdb915c8c2 System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object) [f:\dd\ndp\clr\src\BCL\system\threading\executioncontext.cs @ 891]
      00000076cff7f060 00007ffdb9196472 System.Threading.ThreadHelper.ThreadStart() [f:\dd\ndp\clr\src\BCL\system\threading\thread.cs @ 111]
      00000076cff7f2b8 00007ffdbb4f6793 [GCFrame: 00000076cff7f2b8] 
      00000076cff7f608 00007ffdbb4f6793 [DebuggerU2MCatchHandlerFrame: 00000076cff7f608] 
      00000076cff7f798 00007ffdbb4f6793 [ContextTransitionFrame: 00000076cff7f798] 
      00000076cff7f9c8 00007ffdbb4f6793 [DebuggerU2MCatchHandlerFrame: 00000076cff7f9c8] 
      
      OS Thread Id: 0x1bd4 (133)
              Child SP               IP Call Site
      GetFrameContext failed: 1
      0000000000000000 0000000000000000 
      OS Thread Id: 0x1a98 (134)
              Child SP               IP Call Site
      00000076dbdbcc88 00007ffdca2e6124 [InlinedCallFrame: 00000076dbdbcc88] .SNIReadSyncOverAsync(SNI_ConnWrapper*, SNI_Packet**, Int32)
      00000076dbdbcc88 00007ffdaaaf5dd4 [InlinedCallFrame: 00000076dbdbcc88] .SNIReadSyncOverAsync(SNI_ConnWrapper*, SNI_Packet**, Int32)
      00000076dbdbcc60 00007ffdaaaf5dd4 DomainNeutralILStubClass.IL_STUB_PInvoke(SNI_ConnWrapper*, SNI_Packet**, Int32)
      00000076dbdbcd10 00007ffdaab08fe3 SNINativeMethodWrapper.SNIReadSyncOverAsync(System.Runtime.InteropServices.SafeHandle, IntPtr ByRef, Int32)
      00000076dbdbcd70 00007ffdaabe0ae0 System.Data.SqlClient.TdsParserStateObject.ReadSniSyncOverAsync()
      00000076dbdbcdd0 00007ffdaabe09dd System.Data.SqlClient.TdsParserStateObject.TryReadNetworkPacket()
      00000076dbdbce10 00007ffdaabdf7f5 System.Data.SqlClient.TdsParserStateObject.TryPrepareBuffer()
      00000076dbdbce50 00007ffdaabdfa0e System.Data.SqlClient.TdsParserStateObject.TryReadByte(Byte ByRef)
      00000076dbdbce90 00007ffdaabc7daa System.Data.SqlClient.TdsParser.TryRun(System.Data.SqlClient.RunBehavior, System.Data.SqlClient.SqlCommand, System.Data.SqlClient.SqlDataReader, System.Data.SqlClient.BulkCopySimpleResultSet, System.Data.SqlClient.TdsParserStateObject, Boolean ByRef)
      00000076dbdbcff0 00007ffdaabbb3c7 System.Data.SqlClient.SqlDataReader.TryConsumeMetaData()
      00000076dbdbd050 00007ffdaabb8325 System.Data.SqlClient.SqlDataReader.get_MetaData()
      00000076dbdbd0a0 00007ffdaab3be73 System.Data.SqlClient.SqlCommand.FinishExecuteReader(System.Data.SqlClient.SqlDataReader, System.Data.SqlClient.RunBehavior, System.String, Boolean, Boolean)
      00000076dbdbd110 00007ffdaab3b75f System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(System.Data.CommandBehavior, System.Data.SqlClient.RunBehavior, Boolean, Boolean, Int32, System.Threading.Tasks.Task ByRef, Boolean, Boolean, System.Data.SqlClient.SqlDataReader, Boolean)
      00000076dbdbd1f0 00007ffdaab3a763 System.Data.SqlClient.SqlCommand.RunExecuteReader(System.Data.CommandBehavior, System.Data.SqlClient.RunBehavior, Boolean, System.String, System.Threading.Tasks.TaskCompletionSource`1, Int32, System.Threading.Tasks.Task ByRef, Boolean ByRef, Boolean, Boolean)
      00000076dbdbd2c0 00007ffdaab3a49b System.Data.SqlClient.SqlCommand.RunExecuteReader(System.Data.CommandBehavior, System.Data.SqlClient.RunBehavior, Boolean, System.String)
      00000076dbdbd360 00007ffdaab35cc6 System.Data.SqlClient.SqlCommand.ExecuteReader(System.Data.CommandBehavior, System.String)
      00000076dbdbd3f0 00007ffd5c517ead Kingdee.BOS.App.Data.AbstractDatabase.DoExecuteReader(System.Data.Common.DbCommand, System.Data.CommandBehavior)
      00000076dbdbd450 00007ffd5c515ebb Kingdee.BOS.App.Data.AbstractDatabase.ExecuteReader(System.Data.Common.DbCommand, System.Collections.Generic.IEnumerable`1, System.Data.CommandBehavior, Boolean)
      00000076dbdbd4d0 00007ffd5c4fd6f2 Kingdee.BOS.App.Data.AbstractDatabase.ExecuteReader(System.Data.Common.DbCommand, System.Collections.Generic.IEnumerable`1, System.Data.CommandBehavior)
      00000076dbdbd500 00007ffd5c4e31b1 Kingdee.BOS.App.Data.DBUtils.ExecuteReader(Kingdee.BOS.Context, System.String, System.Collections.Generic.IEnumerable`1, System.Data.CommandType, System.Data.CommandBehavior, Boolean)
      00000076dbdbd570 00007ffd5c51d2a7 Kingdee.BOS.App.Data.DBUtils.ExecuteReader(Kingdee.BOS.Context, System.String, System.Collections.Generic.IEnumerable`1, System.Data.CommandType, Boolean)
      00000076dbdbd5b0 00007ffd5c51d2fc Kingdee.BOS.App.Data.DBUtils.ExecuteReader(Kingdee.BOS.Context, System.String, System.Data.CommandType, Boolean)
      00000076dbdbd5e0 00007ffd5c51d341 Kingdee.BOS.App.Data.DBUtils.ExecuteReader(Kingdee.BOS.Context, System.String)
      00000076dbdbd610 00007ffd5ca5a5d4 Kingdee.BOS.App.Core.MainConsole.MainConsoleServer.GetSearchMenuData(Kingdee.BOS.Context, System.String, System.Collections.Generic.HashSet`1 ByRef, System.Collections.Generic.HashSet`1 ByRef)
      00000076dbdbd7d0 00007ffd5ca58164 Kingdee.BOS.App.Core.MainConsole.MainConsoleServer.GetMenuArrayForCache(Kingdee.BOS.Context)
      00000076dbdbda78 00007ffdbb4f6793 [DebuggerU2MCatchHandlerFrame: 00000076dbdbda78] 
      00000076dbdbddb8 00007ffdbb4f6793 [HelperMethodFrame_PROTECTOBJ: 00000076dbdbddb8] System.RuntimeMethodHandle.InvokeMethod(System.Object, System.Object[], System.Signature, Boolean)
      00000076dbdbdf30 00007ffdb914b690 System.Reflection.RuntimeMethodInfo.UnsafeInvokeInternal(System.Object, System.Object[], System.Object[]) [f:\dd\ndp\clr\src\BCL\system\reflection\methodinfo.cs @ 761]
      00000076dbdbdfa0 00007ffdb9142922 System.Reflection.RuntimeMethodInfo.Invoke(System.Object, System.Reflection.BindingFlags, System.Reflection.Binder, System.Object[], System.Globalization.CultureInfo) [f:\dd\ndp\clr\src\BCL\system\reflection\methodinfo.cs @ 735]
      00000076dbdbe020 00007ffdb9143f22 System.Reflection.MethodBase.Invoke(System.Object, System.Object[]) [f:\dd\ndp\clr\src\BCL\system\reflection\methodbase.cs @ 211]
      00000076dbdbe060 00007ffd5c61990c Microsoft.Practices.Unity.InterceptionExtension.InterceptingRealProxy+c__DisplayClass1.b__0(Microsoft.Practices.Unity.InterceptionExtension.IMethodInvocation, Microsoft.Practices.Unity.InterceptionExtension.GetNextInterceptionBehaviorDelegate)
      00000076dbdbe160 00007ffd5c619477 Microsoft.Practices.Unity.InterceptionExtension.PolicyInjectionBehavior+c__DisplayClass1.b__0(Microsoft.Practices.Unity.InterceptionExtension.IMethodInvocation, Microsoft.Practices.Unity.InterceptionExtension.GetNextHandlerDelegate)
      00000076dbdbe200 00007ffd5c61cbc4 Kingdee.BOS.Cache.KCacheMethodCallHandler.Invoke(Microsoft.Practices.Unity.InterceptionExtension.IMethodInvocation, Microsoft.Practices.Unity.InterceptionExtension.GetNextHandlerDelegate)
      00000076dbdbe350 00007ffd5c61b10b Kingdee.BOS.Performance.Publisher.PerformanceCallHandler.Invoke(Microsoft.Practices.Unity.InterceptionExtension.IMethodInvocation, Microsoft.Practices.Unity.InterceptionExtension.GetNextHandlerDelegate)
      00000076dbdbe3e0 00007ffd5c61b10b Kingdee.BOS.Performance.Publisher.PerformanceCallHandler.Invoke(Microsoft.Practices.Unity.InterceptionExtension.IMethodInvocation, Microsoft.Practices.Unity.InterceptionExtension.GetNextHandlerDelegate)
      00000076dbdbe470 00007ffd5c61b10b Kingdee.BOS.Performance.Publisher.PerformanceCallHandler.Invoke(Microsoft.Practices.Unity.InterceptionExtension.IMethodInvocation, Microsoft.Practices.Unity.InterceptionExtension.GetNextHandlerDelegate)
      00000076dbdbe500 00007ffd5c61936d Microsoft.Practices.Unity.InterceptionExtension.HandlerPipeline.Invoke(Microsoft.Practices.Unity.InterceptionExtension.IMethodInvocation, Microsoft.Practices.Unity.InterceptionExtension.InvokeHandlerDelegate)
      00000076dbdbe590 00007ffd5c618999 Microsoft.Practices.Unity.InterceptionExtension.PolicyInjectionBehavior.Invoke(Microsoft.Practices.Unity.InterceptionExtension.IMethodInvocation, Microsoft.Practices.Unity.InterceptionExtension.GetNextInterceptionBehaviorDelegate)
      00000076dbdbe620 00007ffd5c61845d Microsoft.Practices.Unity.InterceptionExtension.InterceptionBehaviorPipeline.Invoke(Microsoft.Practices.Unity.InterceptionExtension.IMethodInvocation, Microsoft.Practices.Unity.InterceptionExtension.InvokeInterceptionBehaviorDelegate)
      00000076dbdbe6b0 00007ffd5c617002 Microsoft.Practices.Unity.InterceptionExtension.InterceptingRealProxy.Invoke(System.Runtime.Remoting.Messaging.IMessage)
      00000076dbdbe790 00007ffdb911190c System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(System.Runtime.Remoting.Proxies.MessageData ByRef, Int32) [f:\dd\ndp\clr\src\BCL\system\runtime\remoting\realproxy.cs @ 823]
      00000076dbdbe980 00007ffdbb4f4a02 [TPMethodFrame: 00000076dbdbe980] Kingdee.BOS.Contracts.IMainConsoleServer.GetMenuArrayForCache(Kingdee.BOS.Context)
      00000076dbdbec00 00007ffdb91ad436 System.Threading.Tasks.Task.Execute() [f:\dd\ndp\clr\src\BCL\system\threading\Tasks\Task.cs @ 2498]
      00000076dbdbec40 00007ffdb915ca72 System.Threading.ExecutionContext.RunInternal(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object, Boolean) [f:\dd\ndp\clr\src\BCL\system\threading\executioncontext.cs @ 954]
      00000076dbdbed10 00007ffdb915c904 System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object, Boolean) [f:\dd\ndp\clr\src\BCL\system\threading\executioncontext.cs @ 902]
      00000076dbdbed40 00007ffdb91ad6dc System.Threading.Tasks.Task.ExecuteWithThreadLocal(System.Threading.Tasks.Task ByRef) [f:\dd\ndp\clr\src\BCL\system\threading\Tasks\Task.cs @ 2827]
      00000076dbdbedf0 00007ffdb91acdf3 System.Threading.Tasks.Task.ExecuteEntry(Boolean) [f:\dd\ndp\clr\src\BCL\system\threading\Tasks\Task.cs @ 2767]
      00000076dbdbee30 00007ffdb9194882 System.Threading.ThreadPoolWorkQueue.Dispatch() [f:\dd\ndp\clr\src\BCL\system\threading\threadpool.cs @ 820]
      00000076dbdbf2c8 00007ffdbb4f6793 [DebuggerU2MCatchHandlerFrame: 00000076dbdbf2c8] 
      00000076dbdbf458 00007ffdbb4f6793 [ContextTransitionFrame: 00000076dbdbf458] 
      00000076dbdbf688 00007ffdbb4f6793 [DebuggerU2MCatchHandlerFrame: 00000076dbdbf688] 
      OS Thread Id: 0x153c (135)
              Child SP               IP Call Site
      GetFrameContext failed: 1
      0000000000000000 0000000000000000 
      OS Thread Id: 0x242c (136)
              Child SP               IP Call Site
      GetFrameContext failed: 1
      0000000000000000 0000000000000000 
      OS Thread Id: 0x153c (135)
              Child SP               IP Call Site
      GetFrameContext failed: 1
      0000000000000000 0000000000000000 
      OS Thread Id: 0x242c (136)
              Child SP               IP Call Site
      GetFrameContext failed: 1
      0000000000000000 0000000000000000 
      OS Thread Id: 0x2a04 (137)
              Child SP               IP Call Site
      00000076dbf7af08 00007ffdca2e6124 [InlinedCallFrame: 00000076dbf7af08] .SNIReadSyncOverAsync(SNI_ConnWrapper*, SNI_Packet**, Int32)
      00000076dbf7af08 00007ffdaaaf5dd4 [InlinedCallFrame: 00000076dbf7af08] .SNIReadSyncOverAsync(SNI_ConnWrapper*, SNI_Packet**, Int32)
      00000076dbf7aee0 00007ffdaaaf5dd4 DomainNeutralILStubClass.IL_STUB_PInvoke(SNI_ConnWrapper*, SNI_Packet**, Int32)
      00000076dbf7af90 00007ffdaab08fe3 SNINativeMethodWrapper.SNIReadSyncOverAsync(System.Runtime.InteropServices.SafeHandle, IntPtr ByRef, Int32)
      00000076dbf7aff0 00007ffdaabe0ae0 System.Data.SqlClient.TdsParserStateObject.ReadSniSyncOverAsync()
      00000076dbf7b050 00007ffdaabe09dd System.Data.SqlClient.TdsParserStateObject.TryReadNetworkPacket()
      00000076dbf7b090 00007ffdaabdf7f5 System.Data.SqlClient.TdsParserStateObject.TryPrepareBuffer()
      00000076dbf7b0d0 00007ffdaabdfa0e System.Data.SqlClient.TdsParserStateObject.TryReadByte(Byte ByRef)
      00000076dbf7b110 00007ffdaabc7daa System.Data.SqlClient.TdsParser.TryRun(System.Data.SqlClient.RunBehavior, System.Data.SqlClient.SqlCommand, System.Data.SqlClient.SqlDataReader, System.Data.SqlClient.BulkCopySimpleResultSet, System.Data.SqlClient.TdsParserStateObject, Boolean ByRef)
      00000076dbf7b270 00007ffdaabbb3c7 System.Data.SqlClient.SqlDataReader.TryConsumeMetaData()
      00000076dbf7b2d0 00007ffdaabb8325 System.Data.SqlClient.SqlDataReader.get_MetaData()
      00000076dbf7b320 00007ffdaab3be73 System.Data.SqlClient.SqlCommand.FinishExecuteReader(System.Data.SqlClient.SqlDataReader, System.Data.SqlClient.RunBehavior, System.String, Boolean, Boolean)
      00000076dbf7b390 00007ffdaab3b75f System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(System.Data.CommandBehavior, System.Data.SqlClient.RunBehavior, Boolean, Boolean, Int32, System.Threading.Tasks.Task ByRef, Boolean, Boolean, System.Data.SqlClient.SqlDataReader, Boolean)
      00000076dbf7b470 00007ffdaab3a763 System.Data.SqlClient.SqlCommand.RunExecuteReader(System.Data.CommandBehavior, System.Data.SqlClient.RunBehavior, Boolean, System.String, System.Threading.Tasks.TaskCompletionSource`1, Int32, System.Threading.Tasks.Task ByRef, Boolean ByRef, Boolean, Boolean)
      00000076dbf7b540 00007ffdaab3a49b System.Data.SqlClient.SqlCommand.RunExecuteReader(System.Data.CommandBehavior, System.Data.SqlClient.RunBehavior, Boolean, System.String)
      00000076dbf7b5e0 00007ffdaab35cc6 System.Data.SqlClient.SqlCommand.ExecuteReader(System.Data.CommandBehavior, System.String)
      00000076dbf7b670 00007ffd5c517ead Kingdee.BOS.App.Data.AbstractDatabase.DoExecuteReader(System.Data.Common.DbCommand, System.Data.CommandBehavior)
      00000076dbf7b6d0 00007ffd5c515ebb Kingdee.BOS.App.Data.AbstractDatabase.ExecuteReader(System.Data.Common.DbCommand, System.Collections.Generic.IEnumerable`1, System.Data.CommandBehavior, Boolean)
      00000076dbf7b750 00007ffd5c4fd6f2 Kingdee.BOS.App.Data.AbstractDatabase.ExecuteReader(System.Data.Common.DbCommand, System.Collections.Generic.IEnumerable`1, System.Data.CommandBehavior)
      00000076dbf7b780 00007ffd5c4e31b1 Kingdee.BOS.App.Data.DBUtils.ExecuteReader(Kingdee.BOS.Context, System.String, System.Collections.Generic.IEnumerable`1, System.Data.CommandType, System.Data.CommandBehavior, Boolean)
      00000076dbf7b7f0 00007ffd5c51d2a7 Kingdee.BOS.App.Data.DBUtils.ExecuteReader(Kingdee.BOS.Context, System.String, System.Collections.Generic.IEnumerable`1, System.Data.CommandType, Boolean)
      00000076dbf7b830 00007ffd5c61737a Kingdee.BOS.App.Data.DBUtils.ExecuteReader(Kingdee.BOS.Context, System.String, System.Collections.Generic.List`1)
      00000076dbf7b860 00007ffd5c8d2bd7 Kingdee.BOS.App.Core.UserParameterService.GetParamter(Kingdee.BOS.Context, Int64, System.String, System.String)
      00000076dbf7bb68 00007ffdbb4f6793 [DebuggerU2MCatchHandlerFrame: 00000076dbf7bb68] 
      00000076dbf7bea8 00007ffdbb4f6793 [HelperMethodFrame_PROTECTOBJ: 00000076dbf7bea8] System.RuntimeMethodHandle.InvokeMethod(System.Object, System.Object[], System.Signature, Boolean)
      00000076dbf7c020 00007ffdb914b690 System.Reflection.RuntimeMethodInfo.UnsafeInvokeInternal(System.Object, System.Object[], System.Object[]) [f:\dd\ndp\clr\src\BCL\system\reflection\methodinfo.cs @ 761]
      00000076dbf7c090 00007ffdb9142922 System.Reflection.RuntimeMethodInfo.Invoke(System.Object, System.Reflection.BindingFlags, System.Reflection.Binder, System.Object[], System.Globalization.CultureInfo) [f:\dd\ndp\clr\src\BCL\system\reflection\methodinfo.cs @ 735]
      00000076dbf7c110 00007ffdb9143f22 System.Reflection.MethodBase.Invoke(System.Object, System.Object[]) [f:\dd\ndp\clr\src\BCL\system\reflection\methodbase.cs @ 211]
      00000076dbf7c150 00007ffd5c61990c Microsoft.Practices.Unity.InterceptionExtension.InterceptingRealProxy+c__DisplayClass1.b__0(Microsoft.Practices.Unity.InterceptionExtension.IMethodInvocation, Microsoft.Practices.Unity.InterceptionExtension.GetNextInterceptionBehaviorDelegate)
      00000076dbf7c250 00007ffd5c619477 Microsoft.Practices.Unity.InterceptionExtension.PolicyInjectionBehavior+c__DisplayClass1.b__0(Microsoft.Practices.Unity.InterceptionExtension.IMethodInvocation, Microsoft.Practices.Unity.InterceptionExtension.GetNextHandlerDelegate)
      00000076dbf7c2f0 00007ffd5c61cbc4 Kingdee.BOS.Cache.KCacheMethodCallHandler.Invoke(Microsoft.Practices.Unity.InterceptionExtension.IMethodInvocation, Microsoft.Practices.Unity.InterceptionExtension.GetNextHandlerDelegate)
      00000076dbf7c440 00007ffd5c61b10b Kingdee.BOS.Performance.Publisher.PerformanceCallHandler.Invoke(Microsoft.Practices.Unity.InterceptionExtension.IMethodInvocation, Microsoft.Practices.Unity.InterceptionExtension.GetNextHandlerDelegate)
      00000076dbf7c4d0 00007ffd5c61b10b Kingdee.BOS.Performance.Publisher.PerformanceCallHandler.Invoke(Microsoft.Practices.Unity.InterceptionExtension.IMethodInvocation, Microsoft.Practices.Unity.InterceptionExtension.GetNextHandlerDelegate)
      00000076dbf7c560 00007ffd5c61b10b Kingdee.BOS.Performance.Publisher.PerformanceCallHandler.Invoke(Microsoft.Practices.Unity.InterceptionExtension.IMethodInvocation, Microsoft.Practices.Unity.InterceptionExtension.GetNextHandlerDelegate)
      00000076dbf7c5f0 00007ffd5c61936d Microsoft.Practices.Unity.InterceptionExtension.HandlerPipeline.Invoke(Microsoft.Practices.Unity.InterceptionExtension.IMethodInvocation, Microsoft.Practices.Unity.InterceptionExtension.InvokeHandlerDelegate)
      00000076dbf7c680 00007ffd5c618999 Microsoft.Practices.Unity.InterceptionExtension.PolicyInjectionBehavior.Invoke(Microsoft.Practices.Unity.InterceptionExtension.IMethodInvocation, Microsoft.Practices.Unity.InterceptionExtension.GetNextInterceptionBehaviorDelegate)
      00000076dbf7c710 00007ffd5c61845d Microsoft.Practices.Unity.InterceptionExtension.InterceptionBehaviorPipeline.Invoke(Microsoft.Practices.Unity.InterceptionExtension.IMethodInvocation, Microsoft.Practices.Unity.InterceptionExtension.InvokeInterceptionBehaviorDelegate)
      00000076dbf7c7a0 00007ffd5c617002 Microsoft.Practices.Unity.InterceptionExtension.InterceptingRealProxy.Invoke(System.Runtime.Remoting.Messaging.IMessage)
      00000076dbf7c880 00007ffdb911190c System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(System.Runtime.Remoting.Proxies.MessageData ByRef, Int32) [f:\dd\ndp\clr\src\BCL\system\runtime\remoting\realproxy.cs @ 823]
      00000076dbf7ca70 00007ffdbb4f4a02 [TPMethodFrame: 00000076dbf7ca70] Kingdee.BOS.Contracts.IUserParameterService.GetParamter(Kingdee.BOS.Context, Int64, System.String, System.String)
      00000076dbf7ccf0 00007ffd5c8d28c5 Kingdee.BOS.App.Security.K3CloudLoginService.SetRegionInfo(Kingdee.BOS.Context, Kingdee.BOS.Contracts.IUserParameterService, Kingdee.BOS.Orm.DataEntity.DynamicObject)
      00000076dbf7cd70 00007ffd5c22b2e2 Kingdee.BOS.App.Security.K3DataCenterService.GetDataCenterContextByID(System.String)
      00000076dbf7cdc0 00007ffd5c227d97 Kingdee.BOS.App.Security.K3CloudLoginService+c__DisplayClass8.b__3(System.String)
      00000076dbf7cdf0 00007ffd5c228471 Kingdee.BOS.Core.Authentication.AbstractAuthService.LoadContext(Kingdee.BOS.Core.Authentication.LoadContextArg)
      00000076dbf7ce50 00007ffd5c226ed8 Kingdee.BOS.App.Security.K3CloudLoginService.Login(Kingdee.BOS.Performance.Common.PerformanceContext, Kingdee.BOS.Authentication.LoginInfo)
      00000076dbf7ced0 00007ffd5c20b5a9 Kingdee.BOS.ServiceHelper.LoginServiceHelper.Login(Kingdee.BOS.Performance.Common.PerformanceContext, System.String, Kingdee.BOS.Authentication.LoginInfo)
      00000076dbf7cf30 00007ffd5c20960f Kingdee.BOS.WebApi.ServicesStub.AuthService.ValidateLoginInfo(System.String, Kingdee.BOS.Authentication.LoginInfo)
      00000076dbf7d080 00007ffd5c20783c Kingdee.BOS.WebApi.ServicesStub.AuthService.ValidateUser(System.String, System.String, System.String, Int32)
      00000076dbf7d318 00007ffdbb4f6793 [DebuggerU2MCatchHandlerFrame: 00000076dbf7d318] 
      00000076dbf7d658 00007ffdbb4f6793 [HelperMethodFrame_PROTECTOBJ: 00000076dbf7d658] System.RuntimeMethodHandle.InvokeMethod(System.Object, System.Object[], System.Signature, Boolean)
      00000076dbf7d7d0 00007ffdb914b690 System.Reflection.RuntimeMethodInfo.UnsafeInvokeInternal(System.Object, System.Object[], System.Object[]) [f:\dd\ndp\clr\src\BCL\system\reflection\methodinfo.cs @ 761]
      00000076dbf7d840 00007ffdb9142922 System.Reflection.RuntimeMethodInfo.Invoke(System.Object, System.Reflection.BindingFlags, System.Reflection.Binder, System.Object[], System.Globalization.CultureInfo) [f:\dd\ndp\clr\src\BCL\system\reflection\methodinfo.cs @ 735]
      00000076dbf7d8c0 00007ffd5c206201 Kingdee.BOS.ServiceFacade.KDServiceFx.ServiceExecutor.Execute(Kingdee.BOS.ServiceFacade.KDServiceFx.KDServiceContext, Kingdee.BOS.ServiceFacade.KDServiceFx.ServiceType, System.String[], Kingdee.BOS.ServiceFacade.SerializerProxy, Kingdee.BOS.ServiceFacade.KDServiceFx.ServiceType)
      00000076dbf7d960 00007ffd5c203ea9 Kingdee.BOS.ServiceFacade.KDServiceFx.ExecuteServiceModule.OnProcess(Kingdee.BOS.ServiceFacade.KDServiceFx.KDServiceContext)
      00000076dbf7da00 00007ffd5c203ab8 Kingdee.BOS.ServiceFacade.KDServiceFx.ModulePipeline.ExcuteRequest(Kingdee.BOS.ServiceFacade.KDServiceFx.KDServiceContext)
      00000076dbf7da50 00007ffd5c20123e Kingdee.BOS.ServiceFacade.KDServiceFx.RequestExcuteRuntime.StartRequest(Kingdee.BOS.ServiceFacade.KDServiceFx.RequestExtractor, Kingdee.BOS.ServiceFacade.KDServiceFx.WebContext)
      00000076dbf7daa0 00007ffd5c200f00 Kingdee.BOS.ServiceFacade.KDServiceFx.KDSVCHandler.ExecuteRequest(Kingdee.BOS.ServiceFacade.KDServiceFx.WebContext, Kingdee.BOS.ServiceFacade.KDServiceFx.RequestExtractor)
      00000076dbf7dae0 00007ffd5c200d45 Kingdee.BOS.ServiceFacade.KDServiceFx.KDSVCHandler.ProcessRequestInternal(Kingdee.BOS.ServiceFacade.KDServiceFx.WebContext, Kingdee.BOS.ServiceFacade.KDServiceFx.RequestExtractor)
      00000076dbf7db30 00007ffdac1a373e *** WARNING: Unable to verify checksum for System.Web.ni.dll
      System.Web.HttpApplication+CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
      00000076dbf7dbc0 00007ffdac1633fb System.Web.HttpApplication.ExecuteStep(IExecutionStep, Boolean ByRef)
      00000076dbf7dc10 00007ffdac178220 System.Web.HttpApplication+PipelineStepManager.ResumeSteps(System.Exception)
      00000076dbf7dd70 00007ffdac163f79 System.Web.HttpApplication.BeginProcessRequestNotification(System.Web.HttpContext, System.AsyncCallback)
      00000076dbf7ddc0 00007ffdac1766c3 System.Web.HttpRuntime.ProcessRequestNotificationPrivate(System.Web.Hosting.IIS7WorkerRequest, System.Web.HttpContext)
      00000076dbf7de40 00007ffdac165398 System.Web.Hosting.PipelineRuntime.ProcessRequestNotificationHelper(IntPtr, IntPtr, IntPtr, Int32)
      00000076dbf7e000 00007ffdac164f63 System.Web.Hosting.PipelineRuntime.ProcessRequestNotification(IntPtr, IntPtr, IntPtr, Int32)
      00000076dbf7e040 00007ffdac8646ba DomainNeutralILStubClass.IL_STUB_ReversePInvoke(Int64, Int64, Int64, Int32)
      00000076dbf7e8b0 00007ffdbb4f21fe [InlinedCallFrame: 00000076dbf7e8b0] System.Web.Hosting.UnsafeIISMethods.MgdIndicateCompletion(IntPtr, System.Web.RequestNotificationStatus ByRef)
      00000076dbf7e8b0 00007ffdac1d2dde [InlinedCallFrame: 00000076dbf7e8b0] System.Web.Hosting.UnsafeIISMethods.MgdIndicateCompletion(IntPtr, System.Web.RequestNotificationStatus ByRef)
      00000076dbf7e880 00007ffdac1d2dde DomainNeutralILStubClass.IL_STUB_PInvoke(IntPtr, System.Web.RequestNotificationStatus ByRef)
      00000076dbf7e940 00007ffdac16556f System.Web.Hosting.PipelineRuntime.ProcessRequestNotificationHelper(IntPtr, IntPtr, IntPtr, Int32)
      00000076dbf7eb00 00007ffdac164f63 System.Web.Hosting.PipelineRuntime.ProcessRequestNotification(IntPtr, IntPtr, IntPtr, Int32)
      00000076dbf7eb40 00007ffdac8646ba DomainNeutralILStubClass.IL_STUB_ReversePInvoke(Int64, Int64, Int64, Int32)
      00000076dbf7ed18 00007ffdbb4f2453 [ContextTransitionFrame: 00000076dbf7ed18] 
      

      通過(guò)仔細(xì)比對(duì)發(fā)現(xiàn)這么一條Kingdee.BOS.App.Core.MainConsole.MainConsoleServer.GetMenuArrayForCache(Kingdee.BOS.Context)調(diào)用堆棧。從方法命名來(lái)看,像是用來(lái)獲取菜單數(shù)組并緩存。結(jié)合前后堆棧的聯(lián)系,我們可以大致得出這樣一個(gè)線索:用戶使用WebApi登錄后會(huì)緩存一份獨(dú)立的菜單供用戶使用

      有了代碼堆棧,接下來(lái)知道怎么干了吧?當(dāng)然是核實(shí)源代碼確定問(wèn)題啊。

      4. 分析源碼驗(yàn)證問(wèn)題

      Kingdee.BOS.App.Core.MainConsole.MainConsoleServer.GetMenuArrayForCache(Kingdee.BOS.Context)方法源代碼如下:
      GetMenuArrayForCache

      我們發(fā)現(xiàn)它是用的UserToken來(lái)緩存用戶菜單。看到Token,你可能就會(huì)條件反射的想到其生命周期。是的,聰明賢惠如你,Token是有生命周期的。也就意味著Token過(guò)期后,下次登錄還會(huì)再次緩存一份菜單。你可能會(huì)問(wèn)Token過(guò)期后沒(méi)有去清對(duì)應(yīng)的菜單緩存嗎?是的,并沒(méi)有。

      嚴(yán)謹(jǐn)?shù)哪悖赡苡謺?huì)問(wèn)Token多久過(guò)期?20mins。你眼珠子一轉(zhuǎn),接著問(wèn),滿打滿算,一個(gè)用戶1個(gè)小時(shí)也就申請(qǐng)3次Token,24小時(shí),也就申請(qǐng)72個(gè)Token,一個(gè)菜單緩存也就頂多1K,所以一個(gè)用戶一天也就最多占用72K。你的網(wǎng)站得有多少并發(fā),才能被這么多菜單緩存撐爆啊?!

      Good Question!!!

      是的,客戶的應(yīng)用場(chǎng)景的并發(fā)也就頂多幾百而已。那到底是什么導(dǎo)致如此多的菜單緩存呢?

      原因是,客戶的第三方客戶端使用WebApi與我們的系統(tǒng)對(duì)接。而每次調(diào)用WebApi時(shí)都會(huì)先去調(diào)用登錄接口,但卻未保存會(huì)話信息。也就是說(shuō),客戶第三方客戶端每次的WebApi調(diào)用都會(huì)產(chǎn)生一個(gè)新的Token。那如果有成千上萬(wàn)的WebApi請(qǐng)求,也就意味著成千上萬(wàn)的菜單緩存啊。

      好了,點(diǎn)到為止。至此,已經(jīng)基本定位到問(wèn)題的根源了。

      5. 最后

      也許很多同學(xué)沒(méi)有接觸過(guò)WinDbg,覺(jué)得其是一個(gè)復(fù)雜的工具。其實(shí)通過(guò)本文的案例講解,其無(wú)非是通過(guò)一系列常見(jiàn)的命令來(lái)進(jìn)行問(wèn)題跟蹤來(lái)定位問(wèn)題。

      最后來(lái)簡(jiǎn)單總結(jié)下,Windbg分析問(wèn)題的步驟:

      1. 創(chuàng)建完整Dump文件
      2. Windbg加載Dump文件
      3. 根據(jù)不同問(wèn)題類型,使用相關(guān)的命令進(jìn)行分析
      4. 耐心分析,抽絲剝繭
      5. 邊分析邊猜測(cè)邊驗(yàn)證
      6. 結(jié)合源碼驗(yàn)證猜想
      7. 修復(fù)驗(yàn)證
      posted @ 2018-08-20 08:50  「圣杰」  閱讀(25284)  評(píng)論(67)    收藏  舉報(bào)
      主站蜘蛛池模板: 国产一级av在线播放| 日本xxxx色视频在线播放| 99蜜桃在线观看免费视频网站| 公喝错春药让我高潮| 一区二区三区成人| 国内精品伊人久久久久AV一坑| 日韩中文字幕精品人妻| 四虎成人在线观看免费| 无码人妻斩一区二区三区| 亚洲一区二区约美女探花| 高清欧美性猛交xxxx黑人猛交| 欧洲精品码一区二区三区| 国产精品亚洲二区在线播放| 免费人妻无码不卡中文18禁| 亚洲国产中文字幕精品| 午夜福利影院不卡影院| 亚洲精品午夜国产VA久久成人 | 成熟女人特级毛片www免费| 国产女同一区二区在线| 精品亚洲国产成人| 轮台县| 亚洲激情在线一区二区三区| 日韩成人精品一区二区三区| 九九热视频精品在线播放| 成年女人永久免费观看视频| 亚洲综合伊人久久大杳蕉| 国内精品免费久久久久电影院97| 成人国产精品一区二区网站公司| 超碰成人人人做人人爽| 国产高清不卡视频| 蜜桃久久精品成人无码av| 国产高清在线a视频大全| 美日韩精品综合一区二区| 阿尔山市| 国产精品免费视频不卡| 日本一区二区三本视频在线观看| 日本福利一区二区精品| 精品国产亚洲午夜精品a| 蜜桃av无码免费看永久| 无码少妇一区二区| 正在播放国产剧情亂倫|