Bug 55381 - [System.Web] Crash in BlockManager.Dispose ().
Summary: [System.Web] Crash in BlockManager.Dispose ().
Status: NEW
Alias: None
Product: Runtime
Classification: Mono
Component: GC ()
Version: 4.8.0 (C9)
Hardware: PC Linux
: --- normal
Target Milestone: ---
Assignee: Bugzilla
Depends on:
Reported: 2017-04-19 14:52 UTC by Adam Christie
Modified: 2017-04-21 00:21 UTC (History)
3 users (show)

Is this bug a regression?: ---
Last known good build:

full backtrace and stack (2.01 MB, text/plain)
2017-04-19 14:52 UTC, Adam Christie

Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.

Please create a new report for Bug 55381 on GitHub or Developer Community if you have new information to add and do not yet see a matching new report.

If the latest results still closely match this report, you can use the original description:

  • Export the original title and description: GitHub Markdown or Developer Community HTML
  • Copy the title and description into the new report. Adjust them to be up-to-date if needed.
  • Add your new information.

In special cases on GitHub you might also want the comments: GitHub Markdown with public comments

Related Links:

Description Adam Christie 2017-04-19 14:52:13 UTC
Created attachment 21628 [details]
full backtrace and stack


Just spotted this problem in a production server, taking down a web stack running from XSP4 (4.2), using Mono

XSP reported error like this:

Internal error: OutputPage threw an exception System.NullReferenceException: Object reference not set to an instance of an object
  at (wrapper managed-to-native) System.Runtime.InteropServices.Marshal:FreeHGlobal (intptr)
  at System.Web.HttpResponseStream+BlockManager.Dispose () [0x00025] in <377e20acdf5f422bb7afd2bb884bdeb6>:0
  at System.Web.HttpResponseStream+ByteBucket.Dispose () [0x00000] in <377e20acdf5f422bb7afd2bb884bdeb6>:0
  at System.Web.HttpResponseStream.ReleaseResources (System.Boolean close_filter) [0x0002f] in <377e20acdf5f422bb7afd2bb884bdeb6>:0
  at System.Web.HttpResponseStream.Clear () [0x00000] in <377e20acdf5f422bb7afd2bb884bdeb6>:0
  at (wrapper remoting-invoke-with-check) System.Web.HttpResponseStream:Clear ()
  at System.Web.HttpResponse.ClearContent () [0x00000] in <377e20acdf5f422bb7afd2bb884bdeb6>:0
  at System.Web.HttpApplication.OutputPage () [0x00067] in <377e20acdf5f422bb7afd2bb884bdeb6>:0
  at System.Web.HttpApplication.PipelineDone () [0x0003a] in <377e20acdf5f422bb7afd2bb884bdeb6>:0

and the STDERR contained this (full version attached)

*** Error in `/opt/mono/bin/mono': double free or corruption (out): 0x00007fe54c046220 ***
======= Backtrace: =========



  at <unknown> <0xffffffff>
  at (wrapper managed-to-native) System.Runtime.InteropServices.Marshal.FreeHGlobal (intptr) <0x0005a>
  at System.Web.HttpResponseStream/BlockManager.Dispose () <0x00032>
  at System.Web.HttpResponseStream/ByteBucket.Dispose () <0x00021>
  at System.Web.HttpResponseStream.ReleaseResources (bool) <0x00051>
  at System.Web.HttpResponseStream.Clear () <0x00019>
  at (wrapper remoting-invoke-with-check) System.Web.HttpResponseStream.Clear () <0x00065>
  at System.Web.HttpResponse.ClearContent () <0x00021>
  at System.Web.HttpApplication.OutputPage () <0x0017d>
  at System.Web.HttpApplication.PipelineDone () <0x0011e>
  at System.Web.HttpApplication.Tick () <0x00227>
  at System.Web.HttpApplication.Start (object) <0x0026d>
  at System.Web.HttpApplication.System.Web.IHttpHandler.ProcessRequest (System.Web.HttpContext) <0x00073>
  at System.Web.HttpRuntime.Process (System.Web.HttpWorkerRequest) <0x002e9>
  at System.Web.HttpRuntime.RealProcessRequest (object) <0x00087>
  at System.Web.HttpRuntime.ProcessRequest (System.Web.HttpWorkerRequest) <0x0005d>
  at Mono.WebServer.MonoWorkerRequest.ProcessRequest () <0x000bf>
  at Mono.WebServer.BaseApplicationHost.ProcessRequest (Mono.WebServer.MonoWorkerRequest) <0x0008f>
  at Mono.WebServer.XSPApplicationHost.ProcessRequest (int,System.Net.IPEndPoint,System.Net.IPEndPoint,string,string,string,string,byte[],string,intptr,Mono.WebServer.SslInformation) <0x00495>
  at (wrapper remoting-invoke-with-check) Mono.WebServer.XSPApplicationHost.ProcessRequest (int,System.Net.IPEndPoint,System.Net.IPEndPoint,string,string,string,string,byte[],string,intptr,Mono.WebServer.SslInformation) <0x001c0>
  at Mono.WebServer.XSP.XSPWorker.RunInternal (object) <0x00578>
  at System.Threading.QueueUserWorkItemCallback.WaitCallback_Context (object) <0x0004b>
  at System.Threading.ExecutionContext.RunInternal (System.Threading.ExecutionContext,System.Threading.ContextCallback,object,bool) <0x0022e>
  at System.Threading.ExecutionContext.Run (System.Threading.ExecutionContext,System.Threading.ContextCallback,object,bool) <0x00028>
  at System.Threading.QueueUserWorkItemCallback.System.Threading.IThreadPoolWorkItem.ExecuteWorkItem () <0x00057>
  at System.Threading.ThreadPoolWorkQueue.Dispatch () <0x0021a>
  at System.Threading._ThreadPoolWaitCallback.PerformWaitCallback () <0x00010>
  at (wrapper runtime-invoke) <Module>.runtime_invoke_bool (object,intptr,intptr,intptr) <0x00069>

Native stacktrace:

        /opt/mono/bin/mono() [0x4b8a58]
        /lib64/libpthread.so.0(+0xf370) [0x7fe57de4f370]
        /lib64/libc.so.6(gsignal+0x37) [0x7fe57d89e1d7]
        /lib64/libc.so.6(abort+0x148) [0x7fe57d89f8c8]
        /lib64/libc.so.6(+0x74f07) [0x7fe57d8ddf07]
        /lib64/libc.so.6(+0x7c503) [0x7fe57d8e5503]
        /opt/mono/bin/mono() [0x75df37]
Comment 1 Zoltan Varga 2017-04-20 17:51:58 UTC
How often does this happen ?
Comment 2 Adam Christie 2017-04-21 00:21:48 UTC
Just once, so far.