[Mono-bugs] [Bug 509457] Web.config error should not prevent AppDomain creation and/or serving responses

bugzilla_noreply at novell.com bugzilla_noreply at novell.com
Thu Jun 4 14:49:09 EDT 2009


http://bugzilla.novell.com/show_bug.cgi?id=509457

User mhabersack at novell.com added comment
http://bugzilla.novell.com/show_bug.cgi?id=509457#c4


Marek Habersack <mhabersack at novell.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
          Component|Sys.Web                     |Sys.XML
         AssignedTo|mhabersack at novell.com       |atsushi at ximian.com




--- Comment #4 from Marek Habersack <mhabersack at novell.com>  2009-06-04 12:49:06 MDT ---
(In reply to comment #3)
Note that I'm testing this with trunk.

> This is actually either a System.Web or a runtime bug.
Well, sort of. System.Web part got fixed in r135471 (trunk) and r135472 (2.4
branch) but it's just moving the code which triggers the error out of a static
constructor, so that no exception occurs early in the process, but it is not a
full fix. I suspect the real fix would be to System.Configuration to handle
such errors more gracefully.
XSP will also not run with such broken config file as it will die when trying
to create a socket, because socket code tries to access configuration and
catches the same XML parsing error as your sample. So, once again, the real fix
belongs in System.Configuration IMO.

> 
> Compile WebConfigErrorTest.cs and put WebConfigErrorTest.exe and the invalid
> Web.config into a directory then create a copy of WebConfigErrorTest.exe in the
> bin directory as well to make Mono able to load it in the new domain.
> 
> Executing WebConfigErrorTest.exe results in an exception. This should succeed.
> When executed with MS.NET properly outputs an error page to the console.
This executable won't run on .NET without creating
WebConfigErrorTest.exe.config file with the following contents:

------ cut -------
<configuration>
<runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<probing privatePath="SubApplication/bin" />
</assemblyBinding>
</runtime>
<configuration>
------ cut -------

Even after this is done, the executable will not output anything to the
console, it will just exit. On Mono the sample doesn't quit but loops somewhere
in XML parser's guts (allocating memory till OOM):

[0x7fe5941e8730: 39.40736 18] LEAVE: string:InternalSetChar (int,char)
[0x7fe5941e8730: 39.40737 17] LEAVE: System.Text.StringBuilder:Append
(char)[System.Text.StringBuilder:0x7fe5917ccf30]
[0x7fe5941e8730: 39.40738 17] ENTER: Mono.Xml.SmallXmlParser:Peek
()(this:0x7fe5917c1620[Mono.Xml.SmallXmlParser WebConfigErrorTest.exe], )
[0x7fe5941e8730: 39.40739 18] ENTER: System.IO.StreamReader:Peek
()(this:0x7fe5917c1850[System.IO.StreamReader WebConfigErrorTest.exe], )
[0x7fe5941e8730: 39.40741 18] LEAVE: System.IO.StreamReader:Peek ()result=101
[0x7fe5941e8730: 39.40742 17] LEAVE: Mono.Xml.SmallXmlParser:Peek ()result=101
[0x7fe5941e8730: 39.40742 17] ENTER: Mono.Xml.SmallXmlParser:Read
()(this:0x7fe5917c1620[Mono.Xml.SmallXmlParser WebConfigErrorTest.exe], )
[0x7fe5941e8730: 39.40744 18] ENTER: System.IO.StreamReader:Read
()(this:0x7fe5917c1850[System.IO.StreamReader WebConfigErrorTest.exe], )
[0x7fe5941e8730: 39.40745 18] LEAVE: System.IO.StreamReader:Read ()result=101
[0x7fe5941e8730: 39.40746 17] LEAVE: Mono.Xml.SmallXmlParser:Read ()result=101
[0x7fe5941e8730: 39.40747 17] ENTER: System.Text.StringBuilder:Append
(char)(this:0x7fe5917ccf30[System.Text.StringBuilder WebConfigErrorTest.exe],
101, )
[0x7fe5941e8730: 39.40748 18] ENTER: string:InternalSetChar
(int,char)(this:[STRING:0x7fe591546000:SystegNamesiguration.IgnoreSection,
System.Configuration, Version=2.0.0.0, Culture=neutral,
PublicKeyToken=b03f5f7f11d50a3a], 4, 101, )

For that reason, I'm going to reassign this bug to Sys.XML for now

-- 
Configure bugmail: http://bugzilla.novell.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.


More information about the mono-bugs mailing list