[Mono-list] mmap(...PROT_NONE...) failed
Yury Serdyuk
Yury at serdyuk.botik.ru
Mon Jan 24 08:37:58 EST 2011
Hi !
I have some multithreaded program in which the threads are created and
destroyed dynamically.
I run my program on multi-core machine and it constantly failed with
> mmap(...PROT_NONE...) failed
message, but from run to run in different places.
For example:
> mmap(...PROT_NONE...) failed
> Stacktrace:
>
> at (wrapper managed-to-native)
> object.__icall_wrapper_mono_array_new_specific (intptr,int) <0x0004c>
> at (wrapper managed-to-native)
> object.__icall_wrapper_mono_array_new_specific (intptr,int) <0x0004c>
> at System.Collections.ArrayList.EnsureCapacity (int) <0x0005e>
> at System.Collections.ArrayList.Add (object) <0x0002d>
> . . .
> at System.Threading.Thread.StartUnsafe () <0x000a8>
> at (wrapper runtime-invoke) object.runtime_invoke_void__this__
> (object,intptr,intptr,intptr) <0x0007b>
>
> Native stacktrace:
>
> mono [0x491b57]
> /lib64/libpthread.so.0 [0x2b9540188b00]
> /lib64/libc.so.6(gsignal+0x35) [0x2b95403c4665]
> /lib64/libc.so.6(abort+0x110) [0x2b95403c5ae0]
> mono [0x5dbbc0]
> mono [0x5dd125]
> mono [0x5eb27c]
> mono [0x5d1a9b]
> mono [0x5d10d0]
> mono [0x5d2195]
> mono [0x5d58ab]
> mono [0x5d5c7c]
> mono [0x5d5f52]
> mono [0x5e0ade]
> mono(mono_array_new_specific+0xf5) [0x558205]
> [0x4059bd0d]
>
> Debug info from gdb:
>
> Using host libthread_db library "/lib64/libthread_db.so.1".
> Cannot access memory at address 0xffffffffffffffcc
> [Thread debugging using libthread_db enabled]
> [New Thread 47920031010096 (LWP 667)]
> [New Thread 46926959266112 (LWP 772)]
> [New Thread 46926957148480 (LWP 770)]
> [New Thread 46926955030848 (LWP 767)]
> [New Thread 46926950795584 (LWP 764)]
> [New Thread 46926952913216 (LWP 761)]
> [New Thread 2144352576 (LWP 757)]
> [New Thread 1083885888 (LWP 755)]
> [New Thread 2146453824 (LWP 753)]
> [New Thread 1088018752 (LWP 750)]
> [New Thread 1081784640 (LWP 679)]
> [New Thread 2142251328 (LWP 677)]
> [New Thread 2140019008 (LWP 676)]
> [New Thread 1077750080 (LWP 675)]
> [New Thread 46915117578560 (LWP 674)]
> [New Thread 46914593286464 (LWP 673)]
> [New Thread 46914068994368 (LWP 672)]
> [New Thread 46913544702272 (LWP 671)]
> [New Thread 46913020410176 (LWP 670)]
> [New Thread 2137848128 (LWP 669)]
> [New Thread 1613556032 (LWP 668)]
> 0x00002b95401881c1 in nanosleep () from /lib64/libpthread.so.0
> 21 Thread 1613556032 (LWP 668) 0x00002b9540185286 in
> pthread_cond_wait@@GLIBC_2.3.2 () from /lib64/libpthread.so.0
> 20 Thread 2137848128 (LWP 669) 0x00002b9540185286 in
> pthread_cond_wait@@GLIBC_2.3.2 () from /lib64/libpthread.so.0
> 19 Thread 46913020410176 (LWP 670) 0x00002b9540185286 in
> pthread_cond_wait@@GLIBC_2.3.2 () from /lib64/libpthread.so.0
> 18 Thread 46913544702272 (LWP 671) 0x00002b9540185286 in
> pthread_cond_wait@@GLIBC_2.3.2 () from /lib64/libpthread.so.0
> 17 Thread 46914068994368 (LWP 672) 0x00002b9540185286 in
> pthread_cond_wait@@GLIBC_2.3.2 () from /lib64/libpthread.so.0
> 16 Thread 46914593286464 (LWP 673) 0x00002b9540185286 in
> pthread_cond_wait@@GLIBC_2.3.2 () from /lib64/libpthread.so.0
> 15 Thread 46915117578560 (LWP 674) 0x00002b9540185286 in
> pthread_cond_wait@@GLIBC_2.3.2 () from /lib64/libpthread.so.0
> 14 Thread 1077750080 (LWP 675) 0x00002b9540187518 in
> __lll_mutex_lock_wait
> () from /lib64/libpthread.so.0
> 13 Thread 2140019008 (LWP 676) 0x00002b95401881c1 in nanosleep ()
> from /lib64/libpthread.so.0
> 12 Thread 2142251328 (LWP 677) 0x00002b9540187518 in
> __lll_mutex_lock_wait
> () from /lib64/libpthread.so.0
> 11 Thread 1081784640 (LWP 679) 0x00002b9540185286 in
> pthread_cond_wait@@GLIBC_2.3.2 () from /lib64/libpthread.so.0
> 10 Thread 1088018752 (LWP 750) 0x00002b9540187518 in
> __lll_mutex_lock_wait
> () from /lib64/libpthread.so.0
> 9 Thread 2146453824 (LWP 753) 0x00002b954018791b in read ()
> from /lib64/libpthread.so.0
> 8 Thread 1083885888 (LWP 755) 0x000000007ff05b28 in ?? ()
> 7 Thread 2144352576 (LWP 757) 0x000000007ff06662 in ?? ()
> 6 Thread 46926952913216 (LWP 761) 0x000000007ff05a3b in ?? ()
> 5 Thread 46926950795584 (LWP 764) 0x00002b9540187518 in
> __lll_mutex_lock_wait () from /lib64/libpthread.so.0
> 4 Thread 46926955030848 (LWP 767) 0x00002b9540187518 in
> __lll_mutex_lock_wait () from /lib64/libpthread.so.0
> 3 Thread 46926957148480 (LWP 770) 0x00002b9540187518 in
> __lll_mutex_lock_wait () from /lib64/libpthread.so.0
> 2 Thread 46926959266112 (LWP 772) 0x000000007ff05a9c in ?? ()
> 1 Thread 47920031010096 (LWP 667) 0x00002b95401881c1 in nanosleep ()
> from /lib64/libpthread.so.0
and
> mmap(...PROT_NONE...) failed
> Stacktrace:
>
> at (wrapper managed-to-native) System.Array.CreateInstanceImpl
> (System.Type,int[],int[]) <0x0004f>
> at (wrapper managed-to-native) System.Array.CreateInstanceImpl
> (System.Type,int[],int[]) <0x0004f>
> at System.Array.CreateInstance (System.Type,int[]) <0x0011b>
> at System.Array.CreateInstance (System.Type,int) <0x0003b>
> at
> System.Runtime.Serialization.Formatters.Binary.ObjectReader.ReadSimpleArray
> (System.IO.BinaryReader,System.Type,long&,object&) <0x00064>
> . . .
> at System.Threading.Thread.StartUnsafe () <0x000a8>
> at (wrapper runtime-invoke) object.runtime_invoke_void__this__
> (object,intptr,intptr,intptr) <0x0007b>
From the other side, I am getting the same when I try to use GC.Collect:
> mmap(...PROT_NONE...) failed
> Stacktrace:
>
> at (wrapper managed-to-native) System.GC.InternalCollect (int) <0x00049>
> at (wrapper managed-to-native) System.GC.InternalCollect (int) <0x00049>
> at System.GC.Collect () <0x00010>
> . . .
> at System.Reflection.MonoMethod.Invoke
> (object,System.Reflection.BindingFlags,System.Reflection.Binder,object[],System.Globalization.CultureInfo)
> <0x0014d>
> at System.Reflection.MethodBase.Invoke (object,object[]) <0x0002a>
> at MCSharp.MovableMethodHandler.Start () <0x00069>
> at System.Threading.Thread.StartUnsafe () <0x000a8>
> at (wrapper runtime-invoke) object.runtime_invoke_void__this__
> (object,intptr,intptr,intptr) <0x0007b>
I am using Mono 2.8.2 with sgen garbage collector.
Please, help.
Yury
More information about the Mono-list
mailing list