【性能诊断】十、性能问题综合分析(案例1,windbg、Network Monitor)
【问题描述】:
产品中某业务功能A,在进行“刷新”—>选择制单—>新增—>切换其他行等一系列操作后,突然发生客户端不响应的现象。
经反复测试验证发现,在单用户场景下也会发生,不过一旦客户端启用了Fiddler工具,此问题便无法重现。并且问题发生后,抓取应用服务器的dump文件进行分析,未发现running状态的线程。
【分析过程】:
根据问题描述初步判定原因在客户端或网络环境上,因此决定采用客户端抓取dump并同时进行网络抓包。在问题重现后,抓取客户端的dump文件,发现客户端的堆栈信息中可以看到,获取Stream后等待流完成。windbg日志如下:
0:000> !clrstack
PDB symbol for clr.dll not loaded
OS Thread Id: 0x3bf8 (0)
Child SP IP Call Site
0030e658 77860159 [HelperMethodFrame_1OBJ:0030e658]System.Threading.WaitHandle.WaitOneNative(System.Runtime.InteropServices.SafeHandle, UInt32, Boolean, Boolean)
0030e73c 6f5d56b1 System.Threading.WaitHandle.InternalWaitOne(System.Runtime.InteropServices.SafeHandle,
Int64, Boolean, Boolean)
0030e754 6f5d5684 System.Threading.WaitHandle.WaitOne(Int32 , Boolean)
0030e768 6ea04ef5 System.Net.LazyAsyncResult.WaitForCompletion(Boolean)
0030e798 6ea326ab System.Net.Connection.SubmitRequest(System.Net.HttpWebRequest, Boolean)
0030e7e4 6ea30948 System.Net.ServicePoint.SubmitRequest(System.Net.HttpWebRequest, System.String)
0030e820 6ea30215 System.Net.HttpWebRequest.SubmitRequest(System.Net.ServicePoint)
0030e84c 6ea567d4 System.Net.HttpWebRequest.GetRequestStream(System.Net.TransportContext ByRef)
0030e890 6ea5659e System.Net.HttpWebRequest.GetRequestStream()
0030e898 076f30c6 xxxxxx.Platform.AppFramework.RestfulClientService.HttpRequestNetConnection.Invoke(xxxxxx.Platform.AppFramework.Service.GSPState, System.String, System.String, System.String, Boolean, System.String[])
0030e90c 076f3044 xxxxxx.Platform.AppFramework.Service.InvokeService.Invoke(xxxxxx.Platform.AppFramework.Service.GSPState, System.String, System.String, System.String, Boolean, System.String[])
0030e954 1dc33a38 xxxxxx.Platform.XForm.FormWebServiceClient.FormDataAccessServiceProxy.GetObjectXmlByQueryTypeWithParameters(System.String, System.Object, Int32, System.String ByRef, xxxxxx.Platform.AppFramework.Service.GSPState)
0030e978 1dc33917 xxxxxx.Platform.XForm.FormWebServiceClient.FormDataAccessServiceClient.GetObjectXml(System.String, System.Object, xxxxxx.Platform.Engine.DataAccess.ClientSPI.DataQueryType, xxxxxx.Platform.XForm.SPI.TransferState, xxxxxx.Platform.AppFramework.Service.GSPState)
0030e9a0 1dc338c7 xxxxxx.Platform.XFormEngine.Core.ResourceFetcher.GetInstanceXml(System.String, System.Object, xxxxxx.Platform.Resource.Metadata.DataModel.ModelView, xxxxxx.Platform.XForm.SPI.TransferState, xxxxxx.Platform.AppFramework.Service.GSPState)
0030e9c4 1eff4b38 xxxxxx.Platform.XFormEngine.Core.ResourceFetcher.GetInstanceXml(xxxxxx.Platform.XForm.SPI.DataURI, System.String, xxxxxx.Platform.Resource.Metadata.DataModel.ModelView, xxxxxx.Platform.XForm.SPI.TransferState, xxxxxx.Platform.AppFramework.Service.GSPState)
0030e9ec 1eff1614 xxxxxx.Platform.XFormEngine.MLFC.XFML.DOM.InstanceElement.LoadInstanceData(xxxxxx.Platform.XForm.SPI.DataURI)
0030ea44 1eff0c08 xxxxxx.Platform.XFormEngine.MLFC.XFML.DOM.InstanceElement.LoadData(xxxxxx.Platform.XForm.SPI.DataURI)
0030ea7c 1dc33731 xxxxxx.Platform.XFormController.ModelController.CardModelController.LoadData(System.Data.DataRow, Boolean)
0030eaa0 1dc335d2 xxxxxx.Platform.XFormController.FormController.Basic.TreeController.Tree_SelectedChanged(System.Object, DevExpress.XtraTreeList.FocusedNodeChangedEventArgs)
0030eac0 000bd7a7 [MulticastFrame:0030eac0] DevExpress.XtraTreeList.FocusedNodeChangedEventHandler.Invoke(System.Object, DevExpress.XtraTreeList.FocusedNodeChangedEventArgs) 0030eaec 1e06fdfd xxxxxx.Platform.XFormEngine.MLFC.XFML.DOM.TreeElement.OnSelectedNodeChanged(DevExpress.XtraTreeList.FocusedNodeChangedEventArgs) 0030eb00 1e06fd54 xxxxxx.Platform.XFormEngine.MLFC.XFML.DOM.TreeElement.VisualComponent_FocusedNodeChanged(System.Object, DevExpress.XtraTreeList.FocusedNodeChangedEventArgs) 0030eb14 16434f98 DevExpress.XtraTreeList.TreeList.RaiseFocusedNodeChanged(DevExpress.XtraTreeList.Nodes.TreeListNode, DevExpress.XtraTreeList.Nodes.TreeListNode) 0030eb2c 1dec1c32 DevExpress.XtraTreeList.TreeList.InternalSetFocusedRowIndex( Int32)
0030eb74 1dec1590 DevExpress.XtraTreeList.TreeList.set_FocusedRowIndex(Int32)
0030eb84 1e05b27e DevExpress.XtraTreeList.Handler.TreeListHandler+NodePressedState.ChangeSelection(DevExpress.XtraTreeList.ViewInfo.RowInfo)
0030ebac 1e05b038 DevExpress.XtraTreeList.Handler.TreeListHandler+NodePressedState.Init()
0030ebd0 162dfe7e DevExpress.XtraTreeList.Handler.TreeListHandler.SetControlState(DevExpress.XtraTreeList.TreeListState)
0030ebe0 1e05aeff DevExpress.XtraTreeList.Handler.TreeListHandler+NormalState.OnPressNode()
0030ebe4 1e05adc0 DevExpress.XtraTreeList.Handler.TreeListHandler+NormalState.MouseDown(System.Windows.Forms.MouseEventArgs, DevExpress.XtraTreeList.TreeListHitTest)
0030ec0c 1e05ac52 DevExpress.XtraTreeList.Handler.TreeListHandler.OnMouseDown(System.Windows.Forms.MouseEventArgs)
0030ec34 1e05abca DevExpress.XtraTreeList.TreeList.OnMouseDown(System.Windows.Forms.MouseEventArgs)
0030ec58 557f09bb System.Windows.Forms.Control.WmMouseDown(System.Windows.Forms.Message ByRef, System.Windows.Forms.MouseButtons, Int32)
0030ec74 552e57d3 System.Windows.Forms.Control.WndProc(System.Windows.Forms.Message ByRef)
0030ec78 16431287 [InlinedCallFrame:0030ec78] 0030ecb8 16431287DevExpress.XtraEditors.Container.EditorContainer.WndProc(System.Windows.Forms.Message ByRef) 0030eccc 164311a5 DevExpress.XtraTreeList.TreeList.WndProc(System.Windows.Forms.Message ByRef) 0030ecdc 552e5263 System.Windows.Forms.Control+ControlNativeWindow.OnMessage(System.Windows.Forms.Message ByRef) 0030ece4 552e51e1 System.Windows.Forms.Control+ControlNativeWindow.WndProc(System.Windows.Forms.Message ByRef) 0030ecf8 552e50f6 System.Windows.Forms.NativeWindow.Callback(IntPtr,
Int32, IntPtr, IntPtr)
0030ee84 000cd30a [InlinedCallFrame:0030ee84] 0030ee80 5530548c DomainBoundILStubClass.IL_STUB_PInvoke(MSG ByRef) 0030ee84 552f6292 [InlinedCallFrame: 0030ee84] System.Windows.Forms.UnsafeNativeMethods.DispatchMessageW(MSG ByRef) 0030eeb8 552f6292 System.Windows.Forms.Application+ComponentManager.System.Windows.Forms.UnsafeNativeMethods.IMsoComponentManager.FPushMessageLoop(IntPtr, Int32, Int32)
0030eebc 552f5e6a [InlinedCallFrame:0030eebc] 0030ef44 552f5e6a System.Windows.Forms.Application+ThreadContext.RunMessageLoopInner( Int32, System.Windows.Forms.ApplicationContext)
0030ef88 552f5bd0 System.Windows.Forms.Application+ThreadContext.RunMessageLoop(Int32, System.Windows.Forms.ApplicationContext)
0030efb4 55286981 System.Windows.Forms.Application.Run(System.Windows.Forms.Form)
0030efc8 1e72c14f xxxxxx.Platform.AppFrameworkGui.Commands.StartWorkbenchCommand.Run(System.String[]) 0030efdc 12b8b5d6 ***
WARNING:Unable to verify checksum for GSFramework.exe *** ERROR: Module load completed but symbols couldnot
be loaded for GSFramework.exe
xxxxxx.Platform.FrameworkGui.Portal.FrameworkMain.RunApplication()
0030f004 0020c2e5 xxxxxx.Platform.FrameworkGui.Portal.FrameworkMain.Run()
0030f094 00201b05 xxxxxx.Platform.FrameworkGui.Portal.FrameworkMain.Main(System.String[])
0030f2a0 70461276 [GCFrame: 0030f2a0]
同时打开Network Monitor的网络抓包,结果发现客户端最后的http请求中包含invokeStream的字样。请求文本的内容中包含:XXXXXX.TB.ZXYJ.Com.XXXXXX.TB.ZXYJ.Com.TBDYGXCom.AddLB命名空间、方法等信息。

根据请求中的代码关键字找到客户端dll文件,反射查看代码内容发现,该方法调用了InvokeStream流操作但并未关闭,进而造成客户端挂起。

【问题解决】:
修改代码,使用using或finally关闭流操作,测试验证无问题,问题解决。

【性能诊断】十、性能问题综合分析(案例1,windbg、Network Monitor)的更多相关文章
- 利用Oracle RUEI+EM12c进行应用的“端到端”性能诊断
概述 我们知道,影响一个B/S应用性能的因素,粗略地说,有以下几个大的环节: 1. 客户端环节 2. 网络环节(可能包括WAN和LAN) 3. 应用及中间层环节 4. 数据库层环节 能够对各个环节的问 ...
- 60,000毫秒内对Linux的性能诊断效的方法
转载于:http://www.itxuexiwang.com/a/liunxjishu/2016/0225/168.html?1456484140 60,000 毫秒内对 Linux 的性能诊断 当你 ...
- Web 2.0应用客户端性能问题十大根源《转载》
前言 Web 2.0应用的推广为用户带来了全新的体验,同时也让开发人员更加关注客户端性能问题.最近,资深Web性能诊断专家.知名工具dynatrace的创始人之一Andreas Grabner根据自己 ...
- 性能计数器与profiler的组合性能诊断
性能计数器和sql profiler都是常用的性能诊断工具和优化工具,最近和群友聊天发现很多人竟然不知道这两个可以“组合”使用,所以这篇算是一篇扫盲贴吧. 两种工具简述 通过计数器可以收集两部分内容: ...
- 使用vs自带的性能诊断工具
visual studio是个强大的集成开发环境,内置了程序性能诊断工具.下面通过两段代码进行介绍. static void Main( string[] args) { Test1(); Test2 ...
- 关于UtilTimerStack类的使用--XWork2、Struts2内置性能诊断类
关于UtilTimerStack类的使用--XWork2.Struts2内置性能诊断类 一.UtilTimerStack做什么用的? 这个本来是Xwork2(Struts2的核心)的相关的工具类,可以 ...
- 如何诊断windows性能问题
直接使用perfmon中的性能诊断工具
- [翻译]60,000毫秒内对Linux进行性能诊断
原文链接:http://techblog.netflix.com/2015/11/linux-performance-analysis-in-60s.html 原文作者:Brendan Gregg,L ...
- [C#] 网站程序ASP.NET的性能诊断 - CPU分析
微软提供了标准的CLR性能分析类库 https://github.com/Microsoft/clrmd 这个类库是开源的代码.能够获取CLR runtime里面几乎所有的信息. 如何获取clrmd编 ...
- Oracle ADDM性能诊断利器及报告解读
性能优化是一个永恒的话题,性能优化也是最具有价值,最值得花费精力深入研究的一个课题,因为资源是有限的,时间是有限的.在Oracle数据库中,随着Oracle功能的不断强大和完善,Oralce数据库在性 ...
随机推荐
- UINavigationController的使用(多视图控制器)
一,重点 当视图控制器控制多视图时,所有页都有导航栏,如果我们有的页面不希望有导航栏咋办?网上没有搜索到结果,我探索到之后发表于此: [super navigationController].navi ...
- JS 日历控件
http://www.cnblogs.com/yank/archive/2008/08/14/1267746.html http://code.google.com/p/lhgcalendar/dow ...
- linxu fcntl 函数用法 【转】
功能描述:根据文件描述词来操作文件的特性. 文件控制函数 fcntl -- file control 头文件: #include <fcntl.h>; i ...
- matlab 相同函数名解决
http://jingyan.baidu.com/article/1612d500a23a8ce20e1eee07.html
- LeetCode Minimum Path Sum (简单DP)
题意: 给一个n*m的矩阵,每次可以往下或右走,经过的格子中的数字之和就是答案了,答案最小为多少? 思路: 比较水,只是各种空间利用率而已. 如果可以在原空间上作修改. class Solution ...
- WebSphere中对response.sendError()的处理与Tomcat不同
不同的地方在于,同样的代码[response.sendError(1);] 在Tomcat下,response.getResponseCode()的值是 1,而在Websphere下面则是 500. ...
- DataTransfer(setData()方法)
DataTransfer对象专门用来存储拖放时要携带的数据,它可以被设置为拖放事件对象的DataTransfer属性.---把拖动的数据存入其中setData有两个参数:1.第一个参数为携带数据的数据 ...
- Memcached安装及配置
一.Memcached介绍 1.Memcached是国外社区网站LiveJournal团队开发,通过缓存数据库查询结果,减少数据库访问次数,从而提高动态web站点性能. 2.官方站点http://me ...
- 1-2 ISO/OSI七层模型简介
相关名词解释: ISO:国际标准化组织 OSI:开放系统互联模型 IOS:苹果操作系统, 但是在计算机网络中,IOS是互联网操作系统,是思科公司为其网络设备开发的操作维护系统 <1>OSI ...
- hiho一下116周 网络流
网络流二·最大流最小割定理 时间限制:10000ms 单点时限:1000ms 内存限制:256MB 描述 小Hi:在上一周的Hiho一下中我们初步讲解了网络流的概念以及常规解法,小Ho你还记得内容么? ...