[Mono-bugs] [Bug 325386] GC crashes on daily basis

bugzilla_noreply at novell.com bugzilla_noreply at novell.com
Mon Jun 9 01:19:39 EDT 2008


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

User dmiles at users.sourceforge.net added comment
https://bugzilla.novell.com/show_bug.cgi?id=325386#c6


Douglas Miles <dmiles at users.sourceforge.net> changed:

           What    |Removed                                         |Added
----------------------------------------------------------------------------
         AssignedTo|lupus at novell.com                                |dmiles at users.sourceforge.net
             Status|REOPENED                                        |ASSIGNED




--- Comment #6 from Douglas Miles <dmiles at users.sourceforge.net>  2008-06-08 23:19:38 MDT ---
TRIED SOME THINGS OUT


I recompiled mono: --enable-large-heap --with-gc=none

Mono JIT compiler version 1.9 (/trunk/ r105275)
Copyright (C) 2002-2008 Novell, Inc and Contributors. www.mono-project.com
        TLS:           __thread
        GC:            none
        SIGSEGV:       altstack
        Notifications: epoll
        Architecture:  amd64
        Disabled:      none


And the application preformed quickly (like a rocket!) and used 14GB ram
most of the time with only 7.1GB swapped in.
Of course as to be expected did not have this bug w/ GC turned off.


Then again --enable-large-heap --with-gc=boehm

[root at titan mono]# mono --version
Mono JIT compiler version 1.9 (/trunk/ r105275)
Copyright (C) 2002-2008 Novell, Inc and Contributors. www.mono-project.com
        TLS:           __thread
        GC:            System Boehm (with typed GC)
        SIGSEGV:       altstack
        Notifications: epoll
        Architecture:  amd64
        Disabled:      none


And the application preformed a bit slower (30 minutes to run turned into 120
minutes)

  PID USER      PR  NI  VIRT  RES  SHR S %CPU %MEM    TIME+  COMMAND
 1235 root      20   0 3667m 3.4g  68m S 98.6 43.6  83:00.05 mono


And then crashed with:



Initializing minor paraphrase CycL structures... DONE (16:14)

Loading pph-phrase shells
 [ 30% 40% 50% 60% 70% 80% 90% 100% DONE (0:16) ]

Loading pph-phrase definitions
 [. (0:05 of ~8:20)
  .... 10%.... 20%.... 30%.... 40%.... 50%.... 60%Too many heap sections:
Increase MAXHINCR or MAX_HEAP_SECTS
Stacktrace:

  at (wrapper managed-to-native)
System.Object.__icall_wrapper_mono_object_new_fast (intptr) <0x00048>
  at (wrapper managed-to-native)
System.Object.__icall_wrapper_mono_object_new_fast (intptr) <0xffffffff>
  at com.cyc.tool.subl.jrtl.nativeCode.type.core.SubLObjectFactory.makeCons
(com.cyc.tool.subl.jrtl.nativeCode.type.core.SubLObject,com.cyc.tool.subl.jrtl.nativeCode.type.core.SubLObject)
<0x00033>
  at com.cyc.tool.subl.jrtl.nativeCode.subLisp.ConsesLow.cons
(com.cyc.tool.subl.jrtl.nativeCode.type.core.SubLObject,com.cyc.tool.subl.jrtl.nativeCode.type.core.SubLObject)
<0x00017>
  at com.cyc.cycjava.cycl.pph_utilities.new_pph_agr_constraint
(com.cyc.tool.subl.jrtl.nativeCode.type.core.SubLObject,com.cyc.tool.subl.jrtl.nativeCode.type.core.SubLObject)
<0x00017>
  at com.cyc.cycjava.cycl.pph_data_structures.cfasl_input_pph_phrase_agr
(com.cyc.tool.subl.jrtl.nativeCode.type.core.SubLObject) <0x0011f>
  at $cfasl_input_pph_phrase_agr$UnaryFunction.processItem
(com.cyc.tool.subl.jrtl.nativeCode.type.core.SubLObject) <0x00013>
  at com.cyc.tool.subl.jrtl.nativeCode.subLisp.Functions.funcall
(com.cyc.tool.subl.jrtl.nativeCode.type.core.SubLObject,com.cyc.tool.subl.jrtl.nativeCode.type.core.SubLObject)
<0x0003b>
  at com.cyc.cycjava.cycl.cfasl.cfasl_input_internal
(com.cyc.tool.subl.jrtl.nativeCode.type.core.SubLObject,com.cyc.tool.subl.jrtl.nativeCode.type.core.SubLObject,com.cyc.tool.subl.jrtl.nativeCode.type.core.SubLObject)
<0x000ef>
  at com.cyc.cycjava.cycl.cfasl.cfasl_input
(com.cyc.tool.subl.jrtl.nativeCode.type.core.SubLObject,com.cyc.tool.subl.jrtl.nativeCode.type.core.SubLObject,com.cyc.tool.subl.jrtl.nativeCode.type.core.SubLObject)
<0x00423>
  at com.cyc.cycjava.cycl.pph_data_structures.load_pph_phrase_content
(com.cyc.tool.subl.jrtl.nativeCode.type.core.SubLObject,com.cyc.tool.subl.jrtl.nativeCode.type.core.SubLObject)
<0x00147>
  at com.cyc.cycjava.cycl.dumper.load_pph_phrase_def
(com.cyc.tool.subl.jrtl.nativeCode.type.core.SubLObject,com.cyc.tool.subl.jrtl.nativeCode.type.core.SubLObject)
<0x0002f>
  at com.cyc.cycjava.cycl.dumper.load_pph_phrase_defs
(com.cyc.tool.subl.jrtl.nativeCode.type.core.SubLObject) <0x0069b>
  at com.cyc.cycjava.cycl.dumper.load_paraphrase_cycl_caches
(com.cyc.tool.subl.jrtl.nativeCode.type.core.SubLObject) <0x0049b>
  at com.cyc.cycjava.cycl.dumper.load_computable_remaining_hl
(com.cyc.tool.subl.jrtl.nativeCode.type.core.SubLObject) <0x00243>
  at com.cyc.cycjava.cycl.dumper.load_computable_content
(com.cyc.tool.subl.jrtl.nativeCode.type.core.SubLObject) <0x00017>
  at com.cyc.cycjava.cycl.dumper.kb_load_from_directory
(com.cyc.tool.subl.jrtl.nativeCode.type.core.SubLObject) <0x0031f>
  at com.cyc.cycjava.cycl.dumper.load_kb
(com.cyc.tool.subl.jrtl.nativeCode.type.core.SubLObject) <0x000f3>
  at (wrapper runtime-invoke)
com.cyc.cycjava.cycl.event_model.runtime_invoke_SubLObject_SubLObject
(object,intptr,intptr,intptr) <0xffffffff>
  at (wrapper managed-to-native) System.Reflection.MonoMethod.InternalInvoke
(object,object[],System.Exception&) <0x00050>
  at (wrapper managed-to-native) System.Reflection.MonoMethod.InternalInvoke
(object,object[],System.Exception&) <0xffffffff>
  at System.Reflection.MonoMethod.Invoke
(object,System.Reflection.BindingFlags,System.Reflection.Binder,object[],System.Globalization.CultureInfo)
<0x000c7>
  at System.Reflection.MethodBase.Invoke (object,object[]) <0x0002d>
  at IKVM.Internal.MethodWrapper.InvokeImpl
(System.Reflection.MethodBase,object,object[],bool) <0x00757>
  at IKVM.Internal.MethodWrapper.Invoke (object,object[],bool) <0x0003f>
  at MethodAccessorImpl.invoke (object,object[]) <0x00130>
  at java.lang.reflect.Method.invoke (object,object[]) <0x00185>
  at com.cyc.tool.subl.jrtl.nativeCode.type.operator.SubLCompiledFunction.apply
(object[]) <0x0009b>
  at
com.cyc.tool.subl.jrtl.nativeCode.type.operator.AbstractSubLFunction.evalViaApply
(com.cyc.tool.subl.jrtl.nativeCode.type.core.SubLCons,com.cyc.tool.subl.jrtl.nativeCode.type.core.SubLEnvironment)
<0x0059a>
  at com.cyc.tool.subl.jrtl.nativeCode.type.core.AbstractSubLList.eval
(com.cyc.tool.subl.jrtl.nativeCode.type.core.SubLEnvironment) <0x000f8>
  at com.cyc.tool.subl.jrtl.nativeCode.subLisp.Eval.eval
(com.cyc.tool.subl.jrtl.nativeCode.type.core.SubLObject) <0x00026>
  at com.cyc.tool.subl.jrtl.nativeCode.subLisp.Eval.load
(com.cyc.tool.subl.jrtl.nativeCode.type.core.SubLObject) <0x002d3>
  at (wrapper runtime-invoke)
com.cyc.tool.subl.jrtl.nativeCode.subLisp.Symbols.runtime_invoke_SubLObject_SubLObject
(object,intptr,intptr,intptr) <0xffffffff>
  at (wrapper managed-to-native) System.Reflection.MonoMethod.InternalInvoke
(object,object[],System.Exception&) <0x00050>
  at (wrapper managed-to-native) System.Reflection.MonoMethod.InternalInvoke
(object,object[],System.Exception&) <0xffffffff>
  at System.Reflection.MonoMethod.Invoke
(object,System.Reflection.BindingFlags,System.Reflection.Binder,object[],System.Globalization.CultureInfo)
<0x000c7>
  at System.Reflection.MethodBase.Invoke (object,object[]) <0x0002d>
  at IKVM.Internal.MethodWrapper.InvokeImpl
(System.Reflection.MethodBase,object,object[],bool) <0x00757>
  at IKVM.Internal.MethodWrapper.Invoke (object,object[],bool) <0x0003f>
  at MethodAccessorImpl.invoke (object,object[]) <0x00130>
  at java.lang.reflect.Method.invoke (object,object[]) <0x00185>
  at com.cyc.tool.subl.jrtl.nativeCode.type.operator.SubLCompiledFunction.apply
(object[]) <0x0009b>
  at
com.cyc.tool.subl.jrtl.nativeCode.type.operator.AbstractSubLFunction.evalViaApply
(com.cyc.tool.subl.jrtl.nativeCode.type.core.SubLCons,com.cyc.tool.subl.jrtl.nativeCode.type.core.SubLEnvironment)
<0x0059a>
  at com.cyc.tool.subl.jrtl.nativeCode.type.core.AbstractSubLList.eval
(com.cyc.tool.subl.jrtl.nativeCode.type.core.SubLEnvironment) <0x000f8>
  at com.cyc.tool.subl.jrtl.nativeCode.subLisp.Eval.eval
(com.cyc.tool.subl.jrtl.nativeCode.type.core.SubLObject) <0x00026>
  at com.cyc.tool.subl.jrtl.nativeCode.subLisp.Eval.load
(com.cyc.tool.subl.jrtl.nativeCode.type.core.SubLObject) <0x002d3>
  at com.cyc.tool.subl.jrtl.nativeCode.subLisp.SubLMain$1.safeRun () <0x0033f>
  at com.cyc.tool.subl.jrtl.nativeCode.type.core.SubLProcess.run () <0x00854>
  at java.util.concurrent.ThreadPoolExecutor.runWorker
(java.util.concurrent.ThreadPoolExecutor/Worker) <0x0027d>
  at Worker.run () <0x0001f>
  at java.lang.Thread.run () <0x00026>
  at VMThread.ThreadProc () <0x000af>
  at (wrapper runtime-invoke) System.Object.runtime_invoke_void
(object,intptr,intptr,intptr) <0xffffffff>

Native stacktrace:

        mono [0x553fd1]
        /lib64/libpthread.so.0 [0x3d54e0f110]
        /lib64/libc.so.6(gsignal+0x35) [0x3d54232fb5]
        /lib64/libc.so.6(abort+0x183) [0x3d54234b23]
        /usr/lib64/libgc.so.1 [0x1279b5]
        /usr/lib64/libgc.so.1(GC_add_to_heap+0x8c) [0x11d4fc]
        /usr/lib64/libgc.so.1(GC_expand_hp_inner+0xe8) [0x11d698]
        /usr/lib64/libgc.so.1(GC_collect_or_expand+0x8d) [0x11e2cd]
        /usr/lib64/libgc.so.1(GC_allocobj+0xf6) [0x11e906]
        /usr/lib64/libgc.so.1(GC_generic_malloc_inner+0xf3) [0x1235b3]
        /usr/lib64/libgc.so.1(GC_generic_malloc_many+0x326) [0x124396]
        /usr/lib64/libgc.so.1(GC_gcj_malloc+0xe9) [0x12cb29]
        [0x37a4b8]

Debug info from gdb:

[Thread debugging using libthread_db enabled]
[New Thread 0x7f275c6b67b0 (LWP 1235)]
[New Thread 0x4164c950 (LWP 1239)]
[New Thread 0x40453950 (LWP 1237)]
[New Thread 0x41164950 (LWP 1236)]
0x0000003d54e0b57d in pthread_cond_timedwait@@GLIBC_2.3.2 () from
/lib64/libpthread.so.0
  4 Thread 0x41164950 (LWP 1236)  0x0000003d54e0e871 in nanosleep () from
/lib64/libpthread.so.0
  3 Thread 0x40453950 (LWP 1237)  0x0000003d54e0b2f9 in
pthread_cond_wait@@GLIBC_2.3.2 () from /lib64/libpthread.so.0
  2 Thread 0x4164c950 (LWP 1239)  0x0000003d54e0df6b in read () from
/lib64/libpthread.so.0
* 1 Thread 0x7f275c6b67b0 (LWP 1235)  0x0000003d54e0b57d in
pthread_cond_timedwait@@GLIBC_2.3.2 () from /lib64/libpthread.so.0



QUESTION:   --enable-large-heap  I know is unsupported.. but with
--with-gc=boehm,  Is libgc still thinking in small heap?








An idea i had about this bug (i am not a IKVM/Mono developer so this is just my
guess):

1) I am creating a server socket thats expected to throw a socket timeout
exception inside IKVM code every 30 seconds.

2) I am using a large amount of memory and this makes garbage collection happen
at a higher % of the time due to the fact I could have been bumping my head on
some available free memory trigger.

3) IKVM when it receives the timeout exception it has to create the user
exception details to get ready to throw itself outside of the ikvm libraries.
So this process has to create some new objects. Also it has some objects it's
going to dispose of that were part of the socket service (such as a timer) .

4) GC is in the middle of a fishing expedition for more ram and IKVM has
offered up a poisened sacrafice (like the above mentioned fictional timer) to
it in exchange for ram to create the exception.


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