[Mono-bugs] [Bug 654322] New: Crash when throwing too many exception

bugzilla_noreply at novell.com bugzilla_noreply at novell.com
Wed Nov 17 11:31:38 EST 2010


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

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


           Summary: Crash when throwing too many exception
    Classification: Mono
           Product: Mono: Runtime
           Version: 2.8.x
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: Critical
          Priority: P5 - None
         Component: GC
        AssignedTo: lupus at novell.com
        ReportedBy: guillaume.pouillet at gmail.com
         QAContact: mono-bugs at lists.ximian.com
          Found By: Customer
           Blocker: ---


Created an attachment (id=400845)
 --> (http://bugzilla.novell.com/attachment.cgi?id=400845)
Exception crash

Description of Problem:
When too many exceptions are thrown, the mono process die with a
StackOverflowException or a native stacktrace. When adding a GC.Collect() in
the catch part of the attached file, the process survives much longer (~20
minutes) but crash in GC.Collect internal implementation.
When adding a counter and displaying it using a format string, the process die
during an allocation in the GC (object.__icall_wrapper_mono_array_new_specific)

Steps to reproduce the problem:
1. Compile and run the attached file
2. Add GC.Collect() in the catch part and run it for ~20 minutes
or
2b. Add a counter and a Console.Write with a format string.


Actual Results:
-- No modifications :
Stack overflow in unmanaged: IP: 0x82222fe, fault addr: 0xbf7f1088
Stack overflow in unmanaged: IP: 0x8225ee8, fault addr: 0xbf7f0fec

Unhandled Exception: System.StackOverflowException: The requested operation
caused a stack overflow.
  at (wrapper managed-to-native)
object:__icall_wrapper_mono_thread_get_undeniable_exception ()
  at Program.Main (System.String[] args) [0x00000] in <filename unknown>:0

OR

Stacktrace:


Native stacktrace:

        mono [0x80da264]
        mono [0x811a34b]
        /lib/libpthread.so.0 [0xb76d3930]
        mono [0x8221290]
        mono [0x8215c4b]
        mono [0x8215869]
        mono [0x8216770]
        mono [0x82169c6]
        mono [0x8233ce0]
        mono [0x821d8a8]
        mono [0x8224d60]
        mono(mono_object_new_alloc_specific+0x28) [0x81cea88]
        mono(mono_object_new_specific+0x80) [0x81cf230]
        mono(mono_exception_from_token+0x2c) [0x81b915c]
        mono [0x80a87ca]
        [0xb54d0ceb]
        [0xb54d0d8c]
        mono [0x8062dc8]
        mono(mono_runtime_invoke+0x40) [0x81cf090]
        mono(mono_runtime_exec_main+0xd6) [0x81d2366]
        mono(mono_main+0x1b6c) [0x80b66dc]
        mono [0x8059328]
        /lib/libc.so.6(__libc_start_main+0xe5) [0xb759e455]
        mono [0x80590d1]

Debug info from gdb:


=================================================================
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.
=================================================================

Aborted

-- With counter :
Stacktrace:

  at (wrapper managed-to-native) object.__icall_wrapper_mono_array_new_specific
(intptr,int) <0x00003>
  at (wrapper managed-to-native) object.__icall_wrapper_mono_array_new_specific
(intptr,int) <0x00003>
  at string.Format (string,object) <0x00023>
  at System.IO.TextWriter.Write (string,object) <0x00020>
  at System.IO.SynchronizedWriter.Write (string,object) <0x0003c>
  at System.Console.Write (string,object) <0x00031>
  at Program.Main (string[]) <0x00061>
  at (wrapper runtime-invoke) <Module>.runtime_invoke_void_object
(object,intptr,intptr,intptr) <0x00073>

Native stacktrace:

        mono [0x80da264]
        mono [0x811a34b]
        /lib/libpthread.so.0 [0xb7769930]
        mono [0x8216c54]
        mono [0x8216c54]
        mono [0x8216c54]
        mono [0x8216c54]
        mono [0x8216c54]
        mono [0x8216c54]
        mono [0x8216c54]
        mono [0x8216c54]
        mono [0x8216c54]
        mono [0x8216cc2]
        mono [0x821d89a]
        mono [0x8224b59]
        mono(mono_array_new_specific+0xea) [0x81d572a]
        [0xb5567130]
        /opt/mono-2.8/lib/mono/4.0/mscorlib.dll.so [0xb566b094]
        /opt/mono-2.8/lib/mono/4.0/mscorlib.dll.so [0xb56e85a1]
        /opt/mono-2.8/lib/mono/4.0/mscorlib.dll.so [0xb56e933d]
        /opt/mono-2.8/lib/mono/4.0/mscorlib.dll.so [0xb561dca2]
        [0xb5566d4a]
        [0xb5566e1c]
        mono [0x8062dc8]
        mono(mono_runtime_invoke+0x40) [0x81cf090]
        mono(mono_runtime_exec_main+0xd6) [0x81d2366]
        mono(mono_main+0x1b6c) [0x80b66dc]
        mono [0x8059328]
        /lib/libc.so.6(__libc_start_main+0xe5) [0xb7634455]
        mono [0x80590d1]

Debug info from gdb:


=================================================================
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.
=================================================================

Aborted


Expected Results:
Running the same process using Microsoft.Net under Windows 7 x64 worked during
3 hours without using memory (~3MB)

How often does this happen? 
Everytime

Additional Information:
Tested with mono-2.8 and compiler mcs, gmcs and dmcs.
Tested on Windows 7 x64 without option and --gc=sgen --llvm
Tested on Debian x86 without option and --gc=sgen --llvm

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