0

我们在生产环境中使用 CombineAndMinify。但是,我们有自己的自定义 JSHandler,现在我们在生产日志中看到了很多异常

我们得到了 2 种异常,我认为它们可能是相关的。它说缩小失败。并直接在 IO 竞争条件下,有没有人见过这个?

2013-09-30 14:26:01,552 [26] ERROR     KenticoWhiteLabelCore.KenticoCore.CTV.HttpHandlers.Impl.JsHandler - Minification failed
System.IndexOutOfRangeException: Probable I/O race condition detected while copying    memory. The I/O package is not thread safe by default. In multithreaded applications, a stream must be accessed in a thread-safe way, such as a thread-safe wrapper returned by TextReader's or TextWriter's Synchronized methods. This also applies to classes like StreamWriter and StreamReader.
   at System.Buffer.InternalBlockCopy(Array src, Int32 srcOffsetBytes, Array dst, Int32 dstOffsetBytes, Int32 byteCount)
   at System.IO.StreamWriter.Write(Char[] buffer, Int32 index, Int32 count)
   at System.IO.TextWriter.WriteLine(String value)
  at System.IO.TextWriter.SyncTextWriter.WriteLine(String value)
  at Yahoo.Yui.Compressor.CustomErrorReporter.Warning(String message, String sourceName, Int32 line, String lineSource, Int32 lineOffset)
  at Yahoo.Yui.Compressor.JavaScriptCompressor.Warn(String message, Boolean showDebugString)
   at Yahoo.Yui.Compressor.JavaScriptCompressor.PrintSymbolTree(Int32 linebreakpos, Boolean preserveAllSemiColons)
   at Yahoo.Yui.Compressor.JavaScriptCompressor.Compress(Boolean isObfuscateJavascript, Boolean preserveAllSemicolons, Boolean disableOptimizations, Int32 lineBreakPosition)
   at KenticoWhiteLabelCore.KenticoCore.CTV.HttpHandlers.Impl.JsHandler.Minify(String rawSource) in f:\BuildAgent2\work\5a56097309e7e8db\src\KenticoCore\CTV\HttpHandlers\Impl\JsHandler.cs:line 83
   at   KenticoWhiteLabelCore.KenticoCore.CTV.HttpHandlers.CombineAndMinifyHandler.ProcessRequest(HttpContext context) in f:\BuildAgent2\work\5a56097309e7e8db\src\KenticoCore\CTV\HttpHandlers\CombineAndMinifyHandler.cs:line 216
4

0 回答 0