我們已經使用WCSF框架和.NET 2.0創建了一個網站。IIS 7 Faulting應用程序名稱:w3wp.exe
目前這個應用程序是生活和超過1000用戶使用。我們已經在Windows 2008 Server R2下的IIS 7中的雲中部署了這個功能。我們還使用Sql Server 2008 R2數據庫作爲後端。部署體系結構如下所述。
在負載平衡器(基於硬件)下使用粘性會話連接了兩個Web服務器。這兩臺服務器與兩臺數據庫服務器通信,兩臺數據庫服務器之間均勻分佈有600多個數據庫所有請求將首先轉到管理數據庫,該數據庫將重定向到相應的數據庫服務器。
我們的問題....
我們獲得約每天4至5 W3WP崩潰在兩個服務器。在此期間,所有連接到應用程序的用戶都將被註銷。
錯誤的應用程序名:w3wp.exe,版本:7.5.7601.17514,時間 時間戳:0x4ce7afa2錯誤模塊名稱:KERNELBASE.dll,版本: 6.1.7601.18229,時間戳:0x51fb1677異常代碼:0xe053534f故障偏移:0x000000000000940d出錯進程ID:0X%9斷裂作用 施加開始時間:0X%10錯誤的應用程序路徑:%11斷裂活動 模塊路徑:%12報告ID:%13
最近我們打開的情況下與MS和他們的評論如下。
---微軟開始響應---
進程崩潰的原因堆棧溢出的問題。
的.Net調用堆棧:
System.Enum.System.IConvertible.ToInt64(System.IFormatProvider)
System.Convert.ToInt64(System.Object, System.IFormatProvider)
System.Enum.ToUInt64(System.Object)
System.Enum.IsDefined(System.Type, System.Object)
Microsoft.Practices.ObjectBuilder.Locator.Get(System.Object, Microsoft.Practices.ObjectBuilder.SearchMode)
Microsoft.Practices.ObjectBuilder.ReadableLocator.Get[[System.__Canon, mscorlib]](System.Object)
<Trimmed>
Microsoft.Practices.ObjectBuilder.BuilderStrategy.BuildUp(Microsoft.Practices.ObjectBuilder.IBuilderContext, System.Type, System.Object, System.String)
Microsoft.Practices.CompositeWeb.BuilderStrategies.ContainerAwareTypeMappingStrategy.BuildUp(Microsoft.Practices.ObjectBuilder.IBuilderContext, System.Type, System.Object, System.String)
Microsoft.Practices.ObjectBuilder.BuilderStrategy.BuildUp(Microsoft.Practices.ObjectBuilder.IBuilderContext, System.Type, System.Object, System.String)
Microsoft.Practices.CompositeWeb.BuilderStrategies.ContainerAwareTypeMappingStrategy.BuildUp(Microsoft.Practices.ObjectBuilder.IBuilderContext, System.Type, System.Object, System.String)
Microsoft.Practices.ObjectBuilder.BuilderStrategy.BuildUp(Microsoft.Practices.ObjectBuilder.IBuilderContext, System.Type, System.Object, System.String)
Microsoft.Practices.CompositeWeb.BuilderStrategies.ContainerAwareTypeMappingStrategy.BuildUp(Microsoft.Practices.ObjectBuilder.IBuilderContext, System.Type, System.Object, System.String)
Microsoft.Practices.ObjectBuilder.BuilderStrategy.BuildUp(Microsoft.Practices.ObjectBuilder.IBuilderContext, System.Type, System.Object, System.String)
Microsoft.Practices.CompositeWeb.BuilderStrategies.ContainerAwareTypeMappingStrategy.BuildUp(Microsoft.Practices.ObjectBuilder.IBuilderContext, System.Type, System.Object, System.String)
Microsoft.Practices.ObjectBuilder.BuilderStrategy.BuildUp(Microsoft.Practices.ObjectBuilder.IBuilderContext, System.Type, System.Object, System.String)
Microsoft.Practices.CompositeWeb.BuilderStrategies.ContainerAwareTypeMappingStrategy.BuildUp(Microsoft.Practices.ObjectBuilder.IBuilderContext, System.Type, System.Object, System.String)
Microsoft.Practices.ObjectBuilder.BuilderStrategy.BuildUp(Microsoft.Practices.ObjectBuilder.IBuilderContext, System.Type, System.Object, System.String)
Microsoft.Practices.CompositeWeb.BuilderStrategies.ContainerAwareTypeMappingStrategy.BuildUp(Microsoft.Practices.ObjectBuilder.IBuilderContext, System.Type, System.Object, System.String)
Microsoft.Practices.ObjectBuilder.BuilderStrategy.BuildUp(Microsoft.Practices.ObjectBuilder.IBuilderContext, System.Type, System.Object, System.String)
Microsoft.Practices.CompositeWeb.BuilderStrategies.ContainerAwareTypeMappingStrategy.BuildUp(Microsoft.Practices.ObjectBuilder.IBuilderContext, System.Type, System.Object, System.String)
Microsoft.Practices.ObjectBuilder.BuilderStrategy.BuildUp(Microsoft.Practices.ObjectBuilder.IBuilderContext, System.Type, System.Object, System.String)
Microsoft.Practices.CompositeWeb.BuilderStrategies.ContainerAwareTypeMappingStrategy.BuildUp(Microsoft.Practices.ObjectBuilder.IBuilderContext, System.Type, System.Object, System.String)
Microsoft.Practices.ObjectBuilder.BuilderStrategy.BuildUp(Microsoft.Practices.ObjectBuilder.IBuilderContext, System.Type, System.Object, System.String)
Microsoft.Practices.CompositeWeb.BuilderStrategies.ContainerAwareTypeMappingStrategy.BuildUp(Microsoft.Practices.ObjectBuilder.IBuilderContext, System.Type, System.Object, System.String)
Microsoft.Practices.ObjectBuilder.BuilderStrategy.BuildUp(Microsoft.Practices.ObjectBuilder.IBuilderContext, System.Type, System.Object, System.String)
Microsoft.Practices.CompositeWeb.BuilderStrategies.ContainerAwareTypeMappingStrategy.BuildUp(Microsoft.Practices.ObjectBuilder.IBuilderContext, System.Type, System.Object, System.String)
Microsoft.Practices.ObjectBuilder.BuilderStrategy.BuildUp(Microsoft.Practices.ObjectBuilder.IBuilderContext, System.Type, System.Object, System.String)
Microsoft.Practices.CompositeWeb.BuilderStrategies.ContainerAwareTypeMappingStrategy.BuildUp(Microsoft.Practices.ObjectBuilder.IBuilderContext, System.Type, System.Object, System.String)
全部調用堆棧
我們看到該呼叫的URL做: - ASP.xxxdashboards_recordlistview_aspx
ntdll!ZwTerminateProcess
KERNELBASE!TerminateProcess+2f
mscorwks!EEPolicy::HandleFatalStackOverflow+13b
mscorwks!EEPolicy::HandleStackOverflow+212
mscorwks!CLRVectoredExceptionHandler+3de1be
mscorwks!CLRVectoredExceptionHandlerShim+42
ntdll!RtlpCallVectoredHandlers+a8
ntdll!RtlDispatchException+22
ntdll!KiUserExceptionDispatch+2e
KERNELBASE!RaiseException+39
mscorwks!AllocateObject+34aeb1
mscorwks!MethodTable::FastBox+43
mscorwks!MethodTable::Box+5b
mscorwks!ReflectionEnum::InternalGetEnumValue+139
System.Enum.System.IConvertible.ToInt64(System.IFormatProvider)+b
System.Convert.ToInt64(System.Object, System.IFormatProvider)+35
System.Enum.ToUInt64(System.Object)+9d
System.Enum.IsDefined(System.Type, System.Object)+ff
Microsoft.Practices.ObjectBuilder.Locator.Get(System.Object, Microsoft.Practices.ObjectBuilder.SearchMode)+4d
Microsoft.Practices.ObjectBuilder.ReadableLocator.Get[[System.__Canon, mscorlib]](System.Object)+10
Microsoft.Practices.CompositeWeb.BuilderStrategies.SessionStateBindingStrategy.BuildUp(Microsoft.Practices.ObjectBuilder.IBuilderContext, System.Type, System.Object, System.String)+11f
Microsoft.Practices.ObjectBuilder.BuilderStrategy.BuildUp(Microsoft.Practices.ObjectBuilder.IBuilderContext, System.Type, System.Object, System.String)+56
Microsoft.Practices.CompositeWeb.BuilderStrategies.SessionStateBindingStrategy.BuildUp(Microsoft.Practices.ObjectBuilder.IBuilderContext, System.Type, System.Object, System.String)+2be
Microsoft.Practices.ObjectBuilder.BuilderStrategy.BuildUp(Microsoft.Practices.ObjectBuilder.IBuilderContext, System.Type, System.Object, System.String)+56
Microsoft.Practices.CompositeWeb.BuilderStrategies.SessionStateBindingStrategy.BuildUp(Microsoft.Practices.ObjectBuilder.IBuilderContext, System.Type, System.Object, System.String)+2be
Microsoft.Practices.ObjectBuilder.BuilderStrategy.BuildUp(Microsoft.Practices.ObjectBuilder.IBuilderContext, System.Type, System.Object, System.String)+56
Microsoft.Practices.CompositeWeb.BuilderStrategies.SessionStateBindingStrategy.BuildUp(Microsoft.Practices.ObjectBuilder.IBuilderContext, System.Type, System.Object, System.String)+2be
Microsoft.Practices.ObjectBuilder.BuilderStrategy.BuildUp(Microsoft.Practices.ObjectBuilder.IBuilderContext, System.Type, System.Object, System.String)+56
Microsoft.Practices.CompositeWeb.BuilderStrategies.SessionStateBindingStrategy.BuildUp(Microsoft.Practices.ObjectBuilder.IBuilderContext, System.Type, System.Object, System.String)+2be
Microsoft.Practices.ObjectBuilder.BuilderStrategy.BuildUp(Microsoft.Practices.ObjectBuilder.IBuilderContext, System.Type, System.Object, System.String)+56
Microsoft.Practices.CompositeWeb.BuilderStrategies.SessionStateBindingStrategy.BuildUp(Microsoft.Practices.ObjectBuilder.IBuilderContext, System.Type, System.Object, System.String)+2be
<Trimmed>
Microsoft.Practices.ObjectBuilder.BuilderStrategy.BuildUp(Microsoft.Practices.ObjectBuilder.IBuilderContext, System.Type, System.Object, System.String)+56
Microsoft.Practices.CompositeWeb.BuilderStrategies.ContainerAwareTypeMappingStrategy.BuildUp(Microsoft.Practices.ObjectBuilder.IBuilderContext, System.Type, System.Object, System.String)+28e
Microsoft.Practices.ObjectBuilder.BuilderStrategy.BuildUp(Microsoft.Practices.ObjectBuilder.IBuilderContext, System.Type, System.Object, System.String)+56
Microsoft.Practices.CompositeWeb.BuilderStrategies.ContainerAwareTypeMappingStrategy.BuildUp(Microsoft.Practices.ObjectBuilder.IBuilderContext, System.Type, System.Object, System.String)+28e
Microsoft.Practices.ObjectBuilder.BuilderStrategy.BuildUp(Microsoft.Practices.ObjectBuilder.IBuilderContext, System.Type, System.Object, System.String)+56
Microsoft.Practices.CompositeWeb.BuilderStrategies.ContainerAwareTypeMappingStrategy.BuildUp(Microsoft.Practices.ObjectBuilder.IBuilderContext, System.Type, System.Object, System.String)+28e
Microsoft.Practices.CompositeWeb.ObjectBuilder.WCSFBuilderBase`1[[Microsoft.Practices.CompositeWeb.ObjectBuilder.WCSFBuilderStage, Microsoft.Practices.CompositeWeb]].DoBuildUp(Microsoft.Practices.ObjectBuilder.IReadWriteLocator, System.Type, System.String, System.Object, Microsoft.Practices.ObjectBuilder.PolicyList[])+13a
Microsoft.Practices.CompositeWeb.ObjectBuilder.WCSFBuilderBase`1[[Microsoft.Practices.CompositeWeb.ObjectBuilder.WCSFBuilderStage, Microsoft.Practices.CompositeWeb]].BuildUp(Microsoft.Practices.ObjectBuilder.IReadWriteLocator, System.Type, System.String, System.Object, Microsoft.Practices.ObjectBuilder.PolicyList[])+64
Microsoft.Practices.CompositeWeb.CompositionContainer.BuildItem(Microsoft.Practices.ObjectBuilder.IBuilder`1<Microsoft.Practices.CompositeWeb.ObjectBuilder.WCSFBuilderStage>, Microsoft.Practices.ObjectBuilder.IReadWriteLocator, System.Object)+334
Microsoft.Practices.CompositeWeb.WebClientApplication.BuildItemWithCurrentContext(System.Object)+121
Microsoft.Practices.CompositeWeb.Web.UI.UserControl.OnInit(System.EventArgs)+3f
System.Web.UI.Control.InitRecursive(System.Web.UI.Control)+8f
System.Web.UI.Control.InitRecursive(System.Web.UI.Control)+187
System.Web.UI.Control.InitRecursive(System.Web.UI.Control)+187
System.Web.UI.Control.InitRecursive(System.Web.UI.Control)+187
System.Web.UI.Control.AddedControl(System.Web.UI.Control, Int32)+10f
DevExpress.Web.ASPxTabControl.Internal.PCContentsControl.CreateControlHierarchy()+2ae
DevExpress.Web.ASPxClasses.ASPxWebControlBase.CreateChildControls()+33
<Trimmed>
System.Web.UI.Control.EnsureChildControls()+92
DevExpress.Web.ASPxClasses.ASPxWebControlBase.EnsureChildControls()+9
DevExpress.Web.ASPxClasses.ASPxWebControlBase.DevExpress.Web.ASPxClasses.Internal.IASPxWebControl.EnsureChildControls()+d
DevExpress.Web.ASPxClasses.Internal.RenderUtils.EnsureChildControlsRecursive(System.Web.UI.Control, Boolean)+3e
DevExpress.Web.ASPxClasses.Internal.RenderUtils.EnsureChildControlsRecursive(System.Web.UI.Control, Boolean)+d0
DevExpress.Web.ASPxClasses.ASPxWebControlBase.EnsureChildControlsRecursive(System.Web.UI.Control)+25
DevExpress.Web.ASPxClasses.ASPxWebControl.CreateChildControls()+166
System.Web.UI.Control.EnsureChildControls()+92
DevExpress.Web.ASPxClasses.ASPxWebControlBase.EnsureChildControls()+9
DevExpress.Web.ASPxClasses.ASPxWebControlBase.DevExpress.Web.ASPxClasses.Internal.IASPxWebControl.EnsureChildControls()+d
DevExpress.Web.ASPxClasses.Internal.RenderUtils.EnsureChildControlsRecursive(System.Web.UI.Control, Boolean)+3e
DevExpress.Web.ASPxClasses.Internal.RenderUtils.EnsureChildControlsRecursive(System.Web.UI.Control, Boolean)+d0
DevExpress.Web.ASPxClasses.ASPxWebControlBase.EnsureChildControlsRecursive(System.Web.UI.Control)+25
DevExpress.Web.ASPxClasses.ASPxWebControl.CreateChildControls()+166
System.Web.UI.Control.EnsureChildControls()+92
DevExpress.Web.ASPxClasses.ASPxWebControlBase.EnsureChildControls()+9
DevExpress.Web.ASPxClasses.ASPxWebControl.InitInternal()+48
DevExpress.Web.ASPxClasses.ASPxDataWebControlBase.OnInit(System.EventArgs)+1c
System.Web.UI.Control.InitRecursive(System.Web.UI.Control)+8f
System.Web.UI.Control.InitRecursive(System.Web.UI.Control)+187
System.Web.UI.Control.InitRecursive(System.Web.UI.Control)+187
System.Web.UI.Control.InitRecursive(System.Web.UI.Control)+187
System.Web.UI.Control.InitRecursive(System.Web.UI.Control)+187
System.Web.UI.Control.InitRecursive(System.Web.UI.Control)+187
System.Web.UI.Page.ProcessRequestMain(Boolean, Boolean)+5c5
System.Web.UI.Page.ProcessRequest(Boolean, Boolean)+a0
System.Web.UI.Page.ProcessRequest()+5b
System.Web.UI.Page.ProcessRequest(System.Web.HttpContext)+f0
ASP.xxxdashboards_recordlistview_aspx.ProcessRequest(System.Web.HttpContext)+9
我們所看到的下面的代碼在一個緊密的遞歸循環中最終導致StackOverflow情況。
Microsoft.Practices.ObjectBuilder.BuilderStrategy.BuildUp(Microsoft.Practices.ObjectBuilder.IBuilderContext, System.Type, System.Object, System.String)
Microsoft.Practices.CompositeWeb.BuilderStrategies.ContainerAwareTypeMappingStrategy.BuildUp(Microsoft.Practices.ObjectBuilder.IBuilderContext, System.Type, System.Object, System.String)
Microsoft.Practices.ObjectBuilder.BuilderStrategy.BuildUp(Microsoft.Practices.ObjectBuilder.IBuilderContext, System.Type, System.Object, System.String)
Microsoft.Practices.CompositeWeb.BuilderStrategies.ContainerAwareTypeMappingStrategy.BuildUp(Microsoft.Practices.ObjectBuilder.IBuilderContext, System.Type, System.Object, System.String)
此外,他們還增加了以下內容。
看着代碼,看看無限循環,並在這裏似乎是這樣
裏面Microsoft_Practices_CompositeWeb!Microsoft.Practices.CompositeWeb.BuilderStrategies.SessionStateBindingStrategy
public override object BuildUp(IBuilderContext context, Type typeToBuild, object existing, string idToBuild)
{
ISessionStateLocatorService service = context.Locator.(object);" href="http://www.aisto.com/roeder/dotnet/Default.aspx?Target=code://Microsoft.Practices.ObjectBuilder:1.0.51206.0:b03f5f7f11d50a3a/Microsoft.Practices.ObjectBuilder.IReadableLocator/Get<>(Object):"Get<ISessionStateLocatorService>(new DependencyResolutionLocatorKey(typeof(ISessionStateLocatorService), null));
if (service != null)
{
IHttpSessionState sessionState = service.GetSessionState();
foreach (FieldInfo info in typeToBuild.GetFields())
{
this.SetFieldValue(existing, info, sessionState);
}
}
return base.BuildUp(context, typeToBuild, existing, idToBuild);
}
所以這個調用Microsoft_Practices_ObjectBuilder!微軟定義的積累。 ObjectBuilder.BuilderStrategy
public virtual object BuildUp(IBuilderContext context, Type typeToBuild, object existing, string idToBuild)
{
IBuilderStrategy nextInChain = context.GetNextInChain(this);
if (nextInChain != null)
{
return nextInChain.BuildUp(context, typeToBuild, existing, idToBuild);
}
return existing;
}
這會導致無限循環。
---結束微軟迴應---
我們不知道到哪裏尋找這個問題的時刻,如果有人能幫助我們解決這將是非常讚賞的問題。
「關於專業服務器,網絡或相關基礎架構管理的問題與Stack Overflow無關,除非它們直接涉及編程或編程工具,您可能能夠獲得有關Server Fault的幫助。 – zero323
它看起來像微軟給了你非常好的方向。他們已經向你展示了你的代碼在哪裏遇到一個infite遞歸循環(導致StackOverflow異常)。 – jadarnel27
@ zero323我沒有看到這是如何甚至略有主題的服務器故障。 – jadarnel27