[Mono-bugs] [Bug 649006] New: Process locked up/segfaulting/aborting after a few AppDomain reloads

bugzilla_noreply at novell.com bugzilla_noreply at novell.com
Mon Oct 25 10:36:38 EDT 2010


https://bugzilla.novell.com/show_bug.cgi?id=649006

https://bugzilla.novell.com/show_bug.cgi?id=649006#c0


           Summary: Process locked up/segfaulting/aborting after a few
                    AppDomain reloads
    Classification: Mono
           Product: Mono: Runtime
           Version: SVN
          Platform: Other
        OS/Version: Other
            Status: NEW
          Severity: Normal
          Priority: P5 - None
         Component: misc
        AssignedTo: mono-bugs at lists.ximian.com
        ReportedBy: mhabersack at novell.com
         QAContact: mono-bugs at lists.ximian.com
          Found By: ---
           Blocker: ---


Created an attachment (id=396833)
 --> (http://bugzilla.novell.com/attachment.cgi?id=396833)
appdomain_reload_repro.tar.bz2

After a process unloads and recreates an AppDomain several times in a row
(waiting for an AppDomain unload to finish before creating a new one) a number
of things can happen:

  - process segfaults without any trace
  - process segfaults with both managed and native traces
  - process segfaults with native trace only
  - an assertion is hit (in gc or mini)
  - process deadlocks

In most cases the crash happens during new AppDomain creation.

I've attempted to reproduce it on two machines, both 64-bit (OpenSuSE 11.3, up
to date) but with different hw configs. One is a dual-core with 3GB of RAM, the
other a quad-core (and HT enabled) with 12GB of RAM. While I was able to
reproduce it easily on the dual-core machine, I had no success in causing the
crash on the quad core (the test ran without any problems for 10 minutes, with
both boehm and sgen)

To repro, make sure you have the current master of both mono and xsp
(4662d97427d07b4d9220a92cda8c45d64057b3e0 and
36af2c50c07417d10c0241cd8d9b21669268ac1c must be included, respectively),
unpack the attached archive and:

 - cd to the appdomain_reload_repro directory and run

   xsp2

 - open new terminal session and run

   while true; wget http://localhost:8080/ -O-; done

 - open yet another terminal session, cd to the appdomain_reload_repro
directory and run:

   while true; touch default.aspx; sleep 1; done

After default.aspx is touched twice, XSP reloads the application's appdomain
and you should see the following on the console:

Single application mode and ASP.NET AppDomain is unloading.
    waiting for the unload to finish...
    done...

On the dual-core machine it usually takes 2 appdomain reloads for the crash to
happen (sometimes more). When the process crashes, you can try restarting it
without killing the loops running in the two other terminals - it will stress
the runtime even harder, to the point that sometimes the process will crash
right at the start.

The scenario in which xsp/mod-mono-server reloads the appdomains so quickly is
rather unlikely in real life, but it was reported in bug #648193

-- 
Configure bugmail: https://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