Мы тестируем разрабатываемое приложение на стендах с большим количеством пользователей-роботов.
После перехода на версию Reports.Web 2016.2.2 несколько раз получали в логах сервера такое:
Поток 1:
Код: Выделить всё
----------------------------------------
Время: 2016-10-26 06:13:53.219
Категория: Exceptions
Тип: Error
HandlingInstanceID: 1d6beee0-5e90-4726-b6cc-99206698871c
An exception of type 'System.NullReferenceException' occurred and was caught.
-----------------------------------------------------------------------------
Type : System.NullReferenceException, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
Message : Object reference not set to an instance of an object.
Source : System
Help link :
Data : System.Collections.ListDictionaryInternal
TargetSite : System.Object get_Current()
HResult : -2147467261
Stack Trace : at System.Collections.Specialized.NameObjectCollectionBase.NameObjectKeysEnumerator.get_Current()
at System.Linq.Enumerable.<CastIterator>d__b1`1.MoveNext()
at System.Linq.Enumerable.WhereEnumerableIterator`1.MoveNext()
at System.Collections.Generic.HashSet`1.UnionWith(IEnumerable`1 other)
at System.Collections.Generic.HashSet`1..ctor(IEnumerable`1 collection, IEqualityComparer`1 comparer)
at System.Web.HttpValueCollection.EnableGranularValidation(ValidateStringCallback validationCallback)
at System.Web.HttpRequest.ValidateHttpValueCollection(HttpValueCollection collection, RequestValidationSource requestCollection)
at System.Web.HttpRequest.get_Headers()
at System.Web.HttpRequestWrapper.get_Headers()
at Stimulsoft.Report.Mvc.StiResourcesHelper.GetRequestUrl(HtmlHelper htmlHelper, String controller, Boolean relativeUrls, Boolean passQueryParams)
at Stimulsoft.Report.Mvc.StiMvcViewer.CreateChildControls()
at Stimulsoft.Report.Mvc.StiMvcViewer.Render(HtmlTextWriter writer)
at System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter)
at System.Web.UI.Control.RenderControl(HtmlTextWriter writer, ControlAdapter adapter)
at System.Web.UI.Control.RenderControl(HtmlTextWriter writer)
at Stimulsoft.Report.Mvc.StiMvcHelper.StiMvcViewer(String ID, StiMvcViewerOptions options)
at ASP._Page_Views_Shared_Reporting_StiMvcViewer_cshtml.Execute() in c:\trunk\Web\Client\Views\Shared\Reporting\StiMvcViewer.cshtml:line 36
at System.Web.WebPages.WebPageBase.ExecutePageHierarchy()
at System.Web.Mvc.WebViewPage.ExecutePageHierarchy()
at System.Web.WebPages.StartPage.RunPage()
at System.Web.WebPages.StartPage.ExecutePageHierarchy()
at System.Web.WebPages.WebPageBase.ExecutePageHierarchy(WebPageContext pageContext, TextWriter writer, WebPageRenderingBase startPage)
at System.Web.Mvc.RazorView.RenderView(ViewContext viewContext, TextWriter writer, Object instance)
at System.Web.Mvc.BuildManagerCompiledView.Render(ViewContext viewContext, TextWriter writer)
at System.Web.Mvc.ViewResultBase.ExecuteResult(ControllerContext context)
at System.Web.Mvc.ControllerActionInvoker.InvokeActionResult(ControllerContext controllerContext, ActionResult actionResult)
at System.Web.Mvc.ControllerActionInvoker.<>c__DisplayClass1c.<InvokeActionResultWithFilters>b__19()
at System.Web.Mvc.ControllerActionInvoker.InvokeActionResultFilter(IResultFilter filter, ResultExecutingContext preContext, Func`1 continuation)
at System.Web.Mvc.ControllerActionInvoker.<>c__DisplayClass1c.<>c__DisplayClass1e.<InvokeActionResultWithFilters>b__1b()
at System.Web.Mvc.ControllerActionInvoker.InvokeActionResultFilter(IResultFilter filter, ResultExecutingContext preContext, Func`1 continuation)
at System.Web.Mvc.ControllerActionInvoker.<>c__DisplayClass1c.<>c__DisplayClass1e.<InvokeActionResultWithFilters>b__1b()
at System.Web.Mvc.ControllerActionInvoker.InvokeActionResultWithFilters(ControllerContext controllerContext, IList`1 filters, ActionResult actionResult)
at System.Web.Mvc.ControllerActionInvoker.InvokeAction(ControllerContext controllerContext, String actionName)
at System.Web.Mvc.Controller.ExecuteCore()
at System.Web.Mvc.ControllerBase.Execute(RequestContext requestContext)
at System.Web.Mvc.ControllerBase.System.Web.Mvc.IController.Execute(RequestContext requestContext)
at System.Web.Mvc.MvcHandler.<>c__DisplayClass6.<>c__DisplayClassb.<BeginProcessRequest>b__5()
at System.Web.Mvc.Async.AsyncResultWrapper.<>c__DisplayClass1.<MakeVoidDelegate>b__0()
at System.Web.Mvc.Async.AsyncResultWrapper.<>c__DisplayClass8`1.<BeginSynchronous>b__7(IAsyncResult _)
at System.Web.Mvc.Async.AsyncResultWrapper.WrappedAsyncResult`1.End()
at System.Web.Mvc.MvcHandler.<>c__DisplayClasse.<EndProcessRequest>b__d()
at System.Web.Mvc.SecurityUtil.<GetCallInAppTrustThunk>b__0(Action f)
at System.Web.Mvc.SecurityUtil.ProcessInApplicationTrust(Action action)
at System.Web.Mvc.MvcHandler.EndProcessRequest(IAsyncResult asyncResult)
at System.Web.Mvc.MvcHandler.System.Web.IHttpAsyncHandler.EndProcessRequest(IAsyncResult result)
at System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)
MachineName : CI-SERV5
AppDomainName : /LM/W3SVC/3/ROOT/nightly_trunk-1-131219171845922359
ThreadIdentity : rep_test@test-serv2.ru
WindowsIdentity : IIS APPPOOL\nightly_trunk
ИД Процесса: 5556
Имя Процесса: C:\Windows\SysWOW64\inetsrv\w3wp.exe
Имя Потока:
ИД Потока: 3780
Доп. информация:
Request = Headers:
Connection:Keep-Alive;
Accept:text/html, application/xhtml+xml, */*;
Accept-Encoding:gzip, deflate;
Accept-Language:ru-RU;
Cookie:PdfSupport=2; SelectedRoleKey=1;
Host:ci-serv5:8080;
User-Agent:Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 6.1; WOW64; Trident/5.0);
RequestType:GET
Url:/nightly_trunk/Report?id=1030
IPAddress:172.19.0.1
InputStream:
Код: Выделить всё
Время: 2016-10-26 06:13:53.219
Категория: Exceptions
Тип: Error
HandlingInstanceID: 17e8334e-d4d8-4c2c-81b1-090ee70344af
An exception of type 'System.ArgumentException' occurred and was caught.
------------------------------------------------------------------------
Type : System.ArgumentException, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
Message : Item has already been added. Key in dictionary: 'Accept' Key being added: 'Accept'
Source : mscorlib
Help link :
ParamName :
Data : System.Collections.ListDictionaryInternal
TargetSite : Void Insert(System.Object, System.Object, Boolean)
HResult : -2147024809
Stack Trace : at System.Collections.Hashtable.Insert(Object key, Object nvalue, Boolean add)
at System.Collections.Hashtable.Add(Object key, Object value)
at System.Collections.Specialized.NameObjectCollectionBase.BaseAdd(String name, Object value)
at System.Collections.Specialized.NameObjectCollectionBase.BaseSet(String name, Object value)
at System.Collections.Specialized.NameValueCollection.Set(String name, String value)
at System.Web.HttpHeaderCollection.SynchronizeHeader(String name, String value)
at System.Web.HttpRequest.FillInHeadersCollection()
at System.Web.HttpRequest.EnsureHeaders()
at System.Web.HttpRequest.get_Headers()
at System.Web.HttpRequestWrapper.get_Headers()
at Stimulsoft.Report.Mvc.StiResourcesHelper.GetRequestUrl(HtmlHelper htmlHelper, String controller, Boolean relativeUrls, Boolean passQueryParams)
at Stimulsoft.Report.Mvc.StiMvcViewer.CreateChildControls()
at Stimulsoft.Report.Mvc.StiMvcViewer.Render(HtmlTextWriter writer)
at System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter)
at System.Web.UI.Control.RenderControl(HtmlTextWriter writer, ControlAdapter adapter)
at System.Web.UI.Control.RenderControl(HtmlTextWriter writer)
at Stimulsoft.Report.Mvc.StiMvcHelper.StiMvcViewer(String ID, StiMvcViewerOptions options)
at ASP._Page_Views_Shared_Reporting_StiMvcViewer_cshtml.Execute() in c:\trunk\Web\Client\Views\Shared\Reporting\StiMvcViewer.cshtml:line 36
at System.Web.WebPages.WebPageBase.ExecutePageHierarchy()
at System.Web.Mvc.WebViewPage.ExecutePageHierarchy()
at System.Web.WebPages.StartPage.RunPage()
at System.Web.WebPages.StartPage.ExecutePageHierarchy()
at System.Web.WebPages.WebPageBase.ExecutePageHierarchy(WebPageContext pageContext, TextWriter writer, WebPageRenderingBase startPage)
at System.Web.Mvc.RazorView.RenderView(ViewContext viewContext, TextWriter writer, Object instance)
at System.Web.Mvc.BuildManagerCompiledView.Render(ViewContext viewContext, TextWriter writer)
at System.Web.Mvc.ViewResultBase.ExecuteResult(ControllerContext context)
at System.Web.Mvc.ControllerActionInvoker.InvokeActionResult(ControllerContext controllerContext, ActionResult actionResult)
at System.Web.Mvc.ControllerActionInvoker.<>c__DisplayClass1c.<InvokeActionResultWithFilters>b__19()
at System.Web.Mvc.ControllerActionInvoker.InvokeActionResultFilter(IResultFilter filter, ResultExecutingContext preContext, Func`1 continuation)
at System.Web.Mvc.ControllerActionInvoker.<>c__DisplayClass1c.<>c__DisplayClass1e.<InvokeActionResultWithFilters>b__1b()
at System.Web.Mvc.ControllerActionInvoker.InvokeActionResultFilter(IResultFilter filter, ResultExecutingContext preContext, Func`1 continuation)
at System.Web.Mvc.ControllerActionInvoker.<>c__DisplayClass1c.<>c__DisplayClass1e.<InvokeActionResultWithFilters>b__1b()
at System.Web.Mvc.ControllerActionInvoker.InvokeActionResultWithFilters(ControllerContext controllerContext, IList`1 filters, ActionResult actionResult)
at System.Web.Mvc.ControllerActionInvoker.InvokeAction(ControllerContext controllerContext, String actionName)
at System.Web.Mvc.Controller.ExecuteCore()
at System.Web.Mvc.ControllerBase.Execute(RequestContext requestContext)
at System.Web.Mvc.ControllerBase.System.Web.Mvc.IController.Execute(RequestContext requestContext)
at System.Web.Mvc.MvcHandler.<>c__DisplayClass6.<>c__DisplayClassb.<BeginProcessRequest>b__5()
at System.Web.Mvc.Async.AsyncResultWrapper.<>c__DisplayClass1.<MakeVoidDelegate>b__0()
at System.Web.Mvc.Async.AsyncResultWrapper.<>c__DisplayClass8`1.<BeginSynchronous>b__7(IAsyncResult _)
at System.Web.Mvc.Async.AsyncResultWrapper.WrappedAsyncResult`1.End()
at System.Web.Mvc.MvcHandler.<>c__DisplayClasse.<EndProcessRequest>b__d()
at System.Web.Mvc.SecurityUtil.<GetCallInAppTrustThunk>b__0(Action f)
at System.Web.Mvc.SecurityUtil.ProcessInApplicationTrust(Action action)
at System.Web.Mvc.MvcHandler.EndProcessRequest(IAsyncResult asyncResult)
at System.Web.Mvc.MvcHandler.System.Web.IHttpAsyncHandler.EndProcessRequest(IAsyncResult result)
at System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)
MachineName : CI-SERV5
AppDomainName : /LM/W3SVC/3/ROOT/nightly_trunk-1-131219171845922359
ThreadIdentity : rep_test@test-serv2.ru
WindowsIdentity : IIS APPPOOL\nightly_trunk
ИД Процесса: 5556
Имя Процесса: C:\Windows\SysWOW64\inetsrv\w3wp.exe
Имя Потока:
ИД Потока: 4748
Доп. информация:
Request =
Искомый отчет отлично строится в однопоточном режиме, когда его запрашивает один пользователь.
А проблема возникла при одновременно запросе отчета из нескольких браузеров.
Потому подозреваю, что есть некий Race Condition в библиотеках Stimulsoft при обращении к HttpHeaders.
Reports.Web 2016.2.2
С уважением,
Дмитрий.