[Mono-bugs] [Bug 555004] New: Crash after AppDomain loads dll with missing dependency

bugzilla_noreply at novell.com bugzilla_noreply at novell.com
Thu Nov 12 13:50:49 EST 2009


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


           Summary: Crash after AppDomain loads dll with missing
                    dependency
    Classification: Mono
           Product: Mono: Runtime
           Version: 2.4.x
          Platform: Other
        OS/Version: Other
            Status: NEW
          Severity: Normal
          Priority: P5 - None
         Component: misc
        AssignedTo: mono-bugs at lists.ximian.com
        ReportedBy: tedu at fogcreek.com
         QAContact: mono-bugs at lists.ximian.com
          Found By: ---


Created an attachment (id=327215)
 --> (http://bugzilla.novell.com/attachment.cgi?id=327215)
test case

User-Agent:       Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.1.12)
Gecko/20080207 Ubuntu/7.10 (gutsy) Firefox/2.0.0.12

We have a web app that loads some assemblies into AppDomains.  If the loaded
dll is missing a dependency, we catch the exception, but afterwards mono
appears "broken."  We have observed two behaviors, one is an infinite
loop/hang, the other is a segfault.  The interesting thing is that the running
response finishes correctly, and it's not until it's done that mono is broken.

I have attached a zip that contains some files to repro the problem.  Run
build.sh to build the files.

Work.exe is the main program.  It's both an ASP.NET app and standalone exe.  It
loads Worker.dll to do some work (calculate 5).  Worker.dll depends on both
Work.exe (for the IWork interface) and FiveMaker.dll (to get 5).

[I have set the AppDomain path to /tmp in the source, this may not be the best,
but is orthogonal to the issue.  After building, copy the files to /tmp. 
web.config also provided.]

When all the pieces are in place, you get a very basic web page that says "2 +
2 = 5".  The problem occurs when FiveMaker.dll is deleted.  The web page runs
once and prints out the expected unable to load error.  After that, mono is
broken.  The next request doesn't work.

Doesn't happen when running the exe from the command line, just the web page.  

For our real app, instead of a crash, we observe an infinite loop after the
request finishes.  We've run mod-mono-server2 with tracing on and can see it
finish the request, then nothing.  mono spins on CPU.

Reproducible: Always

Steps to Reproduce:
1.  Build attached files.  Copy to /tmp/.  Visit website.
2.  Delete /tmp/FiveMaker.dll
3.  Observe mono stop working.
Actual Results:  
Got a SIGSEGV while executing native code. This usually indicates
a fatal error in the mono runtime or one of the native libraries 
used by your application.


Expected Results:  
Just print out the exception like all the other exceptions.

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


More information about the mono-bugs mailing list