This is Xamarin's bug tracking system. For product support, please use the support links listed in your Xamarin Account.
Bug 15064 - AppDomains: crashdump on System.AppDomain.ProcessMessageInDomain
: AppDomains: crashdump on System.AppDomain.ProcessMessageInDomain
Status: NEW
Product: Runtime
Classification: Mono
Component: io-layer
: 3.2.x
: PC Linux
: --- normal
: ---
Assigned To: Bugzilla
:
:
:
:
  Show dependency treegraph
 
Reported: 2013-09-30 05:12 EDT by ilya.cherkasov
Modified: 2013-11-29 01:08 EST (History)
3 users (show)

See Also:
Tags:
Test Case URL:
External Submit: ---


Attachments
test utility sources (259.99 KB, application/zip)
2013-09-30 05:12 EDT, ilya.cherkasov
Details

Description ilya.cherkasov 2013-09-30 05:12:43 EDT
Created attachment 5018 [details]
test utility sources

Hello, we are trying to evaluate mono to check whether it can be run
successfully in high-load production environments.

So, we're created small program to simulate some work.

Sources are located here : https://github.com/head-thrash/stress_test_mono

What the program basically does -- it creates an AppDomain and runs thread pool
worker with some CPU-bound job. I attached sources in this issue. (run with
make run sgen)

So, the bug - mono --gc=sgen failed after 20 minutes of execution with
following error:

133640
Done game RegexDna. Elapsed = 0.5779921 s.
Enqueing type RegexDna
Waiting for KNucleotide to complete
Enqueing type SpectralNorm
Waiting for SpectralNorm to complete
Assertion at mini.c:4008, condition `code' not met
Stacktrace:
at <unknown> <0xffffffff>
at System.Runtime.Serialization.Formatters.Binary.ObjectReader.ReadNextObject
(System.IO.BinaryReader) [0x0000f] in
/home/bkmz/my/mono/mcs/class/corlib/System.Runtime.Serialization.Formatters.Binary/ObjectReader.cs:141
at System.Runtime.Serialization.Formatters.Binary.ObjectReader.ReadObjectGraph
(System.Runtime.Serialization.Formatters.Binary.BinaryElement,System.IO.BinaryReader,bool,object&,System.Runtime.Remoting.Messaging.Header[]&)
[0x0004d] in
/home/bkmz/my/mono/mcs/class/corlib/System.Runtime.Serialization.Formatters.Binary/ObjectReader.cs:107
at
System.Runtime.Serialization.Formatters.Binary.BinaryFormatter.NoCheckDeserialize
(System.IO.Stream,System.Runtime.Remoting.Messaging.HeaderHandler) [0x0007a] in
/home/bkmz/my/mono/mcs/class/corlib/System.Runtime.Serialization.Formatters.Binary/BinaryFormatter.cs:177
at System.Runtime.Serialization.Formatters.Binary.BinaryFormatter.Deserialize
(System.IO.Stream) [0x00000] in
/home/bkmz/my/mono/mcs/class/corlib/System.Runtime.Serialization.Formatters.Binary/BinaryFormatter.cs:134
at System.Runtime.Remoting.Channels.CADSerializer.DeserializeObject
(System.IO.MemoryStream) [0x00015] in
/home/bkmz/my/mono/mcs/class/corlib/System.Runtime.Remoting.Channels/CrossAppDomainChannel.cs:337
at System.Runtime.Remoting.Messaging.CADMethodCallMessage.GetArguments ()
[0x0000d] in
/home/bkmz/my/mono/mcs/class/corlib/System.Runtime.Remoting.Messaging/CADMessages.cs:327
at System.Runtime.Remoting.Messaging.MethodCall..ctor
(System.Runtime.Remoting.Messaging.CADMethodCallMessage) [0x00017] in
/home/bkmz/my/mono/mcs/class/corlib/System.Runtime.Remoting.Messaging/MethodCall.cs:83
at System.AppDomain.ProcessMessageInDomain
(byte[],System.Runtime.Remoting.Messaging.CADMethodCallMessage,byte[]&,System.Runtime.Remoting.Messaging.CADMethodReturnMessage&)
[0x00018] in /home/bkmz/my/mono/mcs/class/corlib/System/AppDomain.cs:1371
at (wrapper remoting-invoke-with-check) System.AppDomain.ProcessMessageInDomain
(byte[],System.Runtime.Remoting.Messaging.CADMethodCallMessage,byte[]&,System.Runtime.Remoting.Messaging.CADMethodReturnMessage&)
<IL 0x0003d, 0xffffffff>
at System.Runtime.Remoting.Channels.CrossAppDomainSink.ProcessMessageInDomain
(byte[],System.Runtime.Remoting.Messaging.CADMethodCallMessage) [0x00008] in
/home/bkmz/my/mono/mcs/class/corlib/System.Runtime.Remoting.Channels/CrossAppDomainChannel.cs:199
at (wrapper runtime-invoke)
<Module>.runtime_invoke_CrossAppDomainSink/ProcessMessageRes_object_object
(object,intptr,intptr,intptr) <IL 0x00066, 0xffffffff>
at <unknown> <0xffffffff>
at (wrapper managed-to-native) System.Reflection.MonoMethod.InternalInvoke
(System.Reflection.MonoMethod,object,object[],System.Exception&) <0xffffffff>
at System.AppDomain.InvokeInDomainByID
(int,System.Reflection.MethodInfo,object,object[]) <0x0009c>
at System.Runtime.Remoting.Channels.CrossAppDomainSink.SyncProcessMessage
(System.Runtime.Remoting.Messaging.IMessage) <0x00109>
at System.Runtime.Remoting.Proxies.RemotingProxy.Invoke
(System.Runtime.Remoting.Messaging.IMessage) <0x00342>
at System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke
(System.Runtime.Remoting.Proxies.RealProxy,System.Runtime.Remoting.Messaging.IMessage,System.Exception&,object[]&)
<0x0042d>
at (wrapper runtime-invoke)
<Module>.runtime_invoke_object_object_object_intptr&_intptr&
(object,intptr,intptr,intptr) <0xffffffff>
at <unknown> <0xffffffff>
at (wrapper managed-to-native)
object.__icall_wrapper_mono_store_remote_field_new
(object,intptr,intptr,object) <0xffffffff>
at (wrapper stfld-remote) object.__mono_store_remote_field_new_wrapper
(object,intptr,intptr,object) <0xffffffff>
at System.AppDomain.CreateDomain
(string,System.Security.Policy.Evidence,System.AppDomainSetup) <0x00367>
at System.AppDomain.CreateDomain (string) <0x00010>
at test_mono.MainClass.RunThreadPoolTask (test_mono.GameType) <0x000c0>
at test_mono.MainClass.RunGame (test_mono.GameType) <0x0001f>
at (wrapper runtime-invoke) <Module>.runtime_invoke_void_this__int
(object,intptr,intptr,intptr) <0xffffffff>
Native stacktrace:
mono() [0x4abf6d]
/lib/x86_64-linux-gnu/libpthread.so.0(+0xfcb0) [0x2affb8817cb0]
/lib/x86_64-linux-gnu/libc.so.6(gsignal+0x35) [0x2affb8a5b425]
/lib/x86_64-linux-gnu/libc.so.6(abort+0x17b) [0x2affb8a5eb8b]
mono() [0x62cb2d]
mono() [0x62cc66]
mono() [0x421bf9]
mono() [0x4225a0]
mono() [0x423f00]
mono() [0x424a5d]
mono() [0x4adf21]
[0x414a2e16]
Debug info from gdb:
Assertion at mini.c:4008, condition `code' not met
Could not attach to process. If your uid matches the uid of the target
process, check the setting of /proc/sys/kernel/yama/ptrace_scope, or try
again as the root user. For more details, see /etc/sysctl.d/10-ptrace.conf
ptrace: Operation not permitted.
No threads.
Aborted (core dumped)
make: *** [run-sgen] Error 134

Can you make that fixed?

Mono is build from sources `3912066fe1134ba665770723a24c8ea9b4f1aea3` on master
Comment 1 ilya.cherkasov 2013-09-30 05:16:44 EDT
I can give link to coredump file if needed (it's large, 22mb though). Just ask.
Comment 2 ilya.cherkasov 2013-10-01 02:01:13 EDT
same error did happen with `mono --gc=boehm`, but process lived longer - almost
4 hours.
Comment 3 ilya.cherkasov 2013-10-25 03:23:06 EDT
Anyone, please? :-(
Comment 4 ilya.cherkasov 2013-11-18 05:04:13 EST
Version 5106e3a56d728a517b873f33bd6ce92df7f2011f still fails with same
exception. Why can't you fix that? :-(
Comment 5 Zoltan Varga 2013-11-28 18:59:35 EST
*** Bug 16493 has been marked as a duplicate of this bug. ***
Comment 6 ilya.cherkasov 2013-11-29 01:08:10 EST
Zoltan, seems that #16493 has a lot simpler program to repro the bug.

Note You need to log in before you can comment on or make changes to this bug.