Bug 24457 - Failed to map exception in System.Web under load
Summary: Failed to map exception in System.Web under load
Status: NEW
Alias: None
Product: Class Libraries
Classification: Mono
Component: System.Web (show other bugs)
Version: 3.2.x
Hardware: PC Linux
: --- normal
Target Milestone: Untriaged
Assignee: Bugzilla
URL:
Depends on:
Blocks:
 
Reported: 2014-11-12 03:58 UTC by eetasoft
Modified: 2014-11-12 03:58 UTC (History)
1 user (show)

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


Attachments

Description eetasoft 2014-11-12 03:58:25 UTC
Mono MVC4 + Web API single page application is running in Debian with mod_modo.

Sending lot of requests rapidly by holding down F5 key in browser causes 500 errors returned from server. Those errors occurs occur randomly but are reproducible if F5 is hold down for some time.

For those requests apache error.log contains `Failed to map path` errors


For those requests apache error.log contains `Failed to map path` errors (below).

Stack trace points probably to line 1565 in https://github.com/mono/mono/blob/mono-3.2.1-branch/mcs/class/System.Web/System.Web/HttpRequest.cs#L1565  

It occurs before application code is executed. Usually url in the same, loading.gif image or js bundle.

git history show that this exception throwing was added some time ago. 
Commenting them out fixes the issue.
Can we remove those lines or is there better fix.



Versions:

    Mono: 3.2.1 (tarball E aug 19 21:33:54 EEST 2013); ASP.NET Version: 4.0.30319.17020
    mod_mono: 2.6.3
    Apache: 2.2.16

The following lines are added to mono config file:

    MonoMaxActiveRequests 0
    MonoMAxWaitingRequests 150

error_log:


    [Tue Dec 03 18:25:32 2013] [error] Command stream corrupted, last command was 1
    System.InvalidOperationException: Failed to map path '/css/images/browser.png'
      at System.Web.HttpRequest.MapPath (System.String virtualPath, System.String baseVirtualDir, Boolea
      at System.Web.HttpRequest.MapPath (System.String virtualPath) [0x00000] in <filename unknown>:0
      at System.Web.Hosting.HostingEnvironment.MapPath (System.String virtualPath) [0x00000] in <filenam
      at System.Web.Hosting.DefaultVirtualPathProvider.FileExists (System.String virtualPath) [0x00000]
      at Mono.WebServer.Paths.VirtualPathExists (IApplicationHost appHost, System.String verb, System.St
      at Mono.WebServer.Paths.GetPathsFromUri (IApplicationHost appHost, System.String verb, System.Stri
      at Mono.WebServer.ModMonoWorkerRequest.GetRequestData () [0x00000] in <filename unknown>:0
      at Mono.WebServer.MonoWorkerRequest.ReadRequestData () [0x00000] in <filename unknown>:0
      at Mono.WebServer.BaseApplicationHost.ProcessRequest (Mono.WebServer.MonoWorkerRequest mwr) [0x000
      at Mono.WebServer.ModMonoApplicationHost.ProcessRequest (Int32 reqId, System.String verb, System.S
      at (wrapper remoting-invoke-with-check) Mono.WebServer.ModMonoApplicationHost:ProcessRequest (int,
      at Mono.WebServer.ModMonoWorker.InnerRun (System.Object state) [0x00000] in <filename unknown>:0
      at Mono.WebServer.ModMonoWorker.Run (System.Object state) [0x00000] in <filename unknown>:0
    [Tue Dec 03 18:28:11 2013] [error] (70014)End of file found: read_data failed
    [Tue Dec 03 18:28:11 2013] [error] Command stream corrupted, last command was 1
    System.InvalidOperationException: Failed to map path '/images/load.gif'
      at System.Web.HttpRequest.MapPath (System.String virtualPath, System.String baseVirtualDir, Boolea
      at System.Web.HttpRequest.MapPath (System.String virtualPath) [0x00000] in <filename unknown>:0
      at System.Web.Hosting.HostingEnvironment.MapPath (System.String virtualPath) [0x00000] in <filenam
      at System.Web.Hosting.DefaultVirtualPathProvider.FileExists (System.String virtualPath) [0x00000]
      at Mono.WebServer.Paths.VirtualPathExists (IApplicationHost appHost, System.String verb, System.St
      at Mono.WebServer.Paths.GetPathsFromUri (IApplicationHost appHost, System.String verb, System.Stri
      at Mono.WebServer.ModMonoWorkerRequest.GetRequestData () [0x00000] in <filename unknown>:0
      at Mono.WebServer.MonoWorkerRequest.ReadRequestData () [0x00000] in <filename unknown>:0
      at Mono.WebServer.BaseApplicationHost.ProcessRequest (Mono.WebServer.MonoWorkerRequest mwr) [0x000
      at Mono.WebServer.ModMonoApplicationHost.ProcessRequest (Int32 reqId, System.String verb, System.S
      at (wrapper remoting-invoke-with-check) Mono.WebServer.ModMonoApplicationHost:ProcessRequest (int,
      at Mono.WebServer.ModMonoWorker.InnerRun (System.Object state) [0x00000] in <filename unknown>:0
      at Mono.WebServer.ModMonoWorker.Run (System.Object state) [0x00000] in <filename unknown>:0
    [Tue Dec 03 18:28:11 2013] [error] (70014)End of file found: read_data failed
    [Tue Dec 03 18:28:11 2013] [error] Command stream corrupted, last command was 1

Note You need to log in before you can comment on or make changes to this bug.