Bug 26394 - Error in call unsafe code
Summary: Error in call unsafe code
Status: RESOLVED FIXED
Alias: None
Product: Runtime
Classification: Mono
Component: JIT (show other bugs)
Version: 2.10.x
Hardware: PC Linux
: --- normal
Target Milestone: ---
Assignee: Bugzilla
URL:
Depends on:
Blocks:
 
Reported: 2015-01-25 05:55 UTC by Roman
Modified: 2018-03-01 16:01 UTC (History)
4 users (show)

Tags:
Is this bug a regression?: ---
Last known good build:

Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.


Please create a new report on GitHub or Developer Community with your current version information, steps to reproduce, and relevant error messages or log files if you are hitting an issue that looks similar to this resolved bug and you do not yet see a matching new report.

Related Links:
Status:
RESOLVED FIXED

Description Roman 2015-01-25 05:55:56 UTC
Type ptoject: Monogame version 2.5

When in option of project I mark "Allow unsafe code" sometimes after closing application I see this:


* Assertion at processes.c:2595, condition `mp' not met

Stacktrace:

  at <unknown> <0xffffffff>
  at (wrapper managed-to-native) System.Diagnostics.Process.ExitCode_internal (intptr) <IL 0x00021, 0xffffffff>
  at System.Diagnostics.Process.Close (int) <IL 0x00026, 0x00097>
  at System.Diagnostics.Process.Kill () <IL 0x00002, 0x0002f>
  at (wrapper remoting-invoke-with-check) System.Diagnostics.Process.Kill () <IL 0x00038, 0xffffffff>
  at Terminal.Providers.Network.ClientMQ.AddCommandRestart (string) [0x0005f] in /home/destructor/Dropbox/Terminal_basket_6_version/RegulTerminal.Providers.Network/ActiveMQ/ClientMQ.cs:352
  at Terminal.Providers.Network.ClientMQ.SendEventPrivate (Terminal.Entities.EventStruct) [0x00060] in /home/destructor/Dropbox/Terminal_basket_6_version/RegulTerminal.Providers.Network/ActiveMQ/ClientMQ.cs:271
  at Terminal.Providers.Network.ClientMQ.SendEvent (object) [0x0004b] in /home/destructor/Dropbox/Terminal_basket_6_version/RegulTerminal.Providers.Network/ActiveMQ/ClientMQ.cs:258
  at System.Threading.Thread.StartInternal () <IL 0x0003c, 0x000bd>
  at (wrapper runtime-invoke) object.runtime_invoke_void__this__ (object,intptr,intptr,intptr) <IL 0x0004e, 0xffffffff>

Native stacktrace:

	/usr/bin/mono() [0x80fdd43]
	[0xb77d540c]
	[0xb77d5424]
	/lib/i386-linux-gnu/libc.so.6(gsignal+0x47) [0xb75c5607]
	/lib/i386-linux-gnu/libc.so.6(abort+0x143) [0xb75c8a33]
	/usr/bin/mono() [0x82780e1]
	/usr/bin/mono() [0x8278268]
	/usr/bin/mono() [0x8278303]
	/usr/bin/mono() [0x825341c]
	/usr/bin/mono() [0x82557cf]
	/usr/bin/mono() [0x81c62c7]
	[0xab7400a4]
	[0xab73ffa0]
	[0xab73fee8]
	[0xab73fe78]
	[0xab73fc38]
	[0xae0e48dc]
	[0xae0f7420]
	[0xb21566a6]
	[0xb5d1d698]
	/usr/bin/mono() [0x8073db1]

Debug info from gdb:

[New LWP 3684]
[New LWP 2831]
[New LWP 2829]
[New LWP 2828]
[New LWP 2754]
[New LWP 2703]
[New LWP 2701]
[New LWP 2697]
[New LWP 2696]
[New LWP 2690]
[New LWP 2686]
[New LWP 2685]
[New LWP 2684]
[New LWP 2680]
[New LWP 2679]
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/i386-linux-gnu/libthread_db.so.1".
0xb77d5424 in __kernel_vsyscall ()
  Id   Target Id         Frame 
  16   Thread 0xb611bb40 (LWP 2679) "Finalizer" 0xb77d5424 in __kernel_vsyscall ()
  15   Thread 0xb5effb40 (LWP 2680) "mono" 0xb77d5424 in __kernel_vsyscall ()
  14   Thread 0xb214bb40 (LWP 2684) "Timer-Scheduler" 0xb77d5424 in __kernel_vsyscall ()
  13   Thread 0xb1effb40 (LWP 2685) "mono" 0xb77d5424 in __kernel_vsyscall ()
  12   Thread 0xb1edeb40 (LWP 2686) "IO Threadpool w" 0xb77d5424 in __kernel_vsyscall ()
  11   Thread 0xaccffb40 (LWP 2690) "mono" 0xb77d5424 in __kernel_vsyscall ()
  10   Thread 0xad2ffb40 (LWP 2696) "Threadpool moni" 0xb77d5424 in __kernel_vsyscall ()
  9    Thread 0xacf29b40 (LWP 2697) "Threadpool work" 0xb77d5424 in __kernel_vsyscall ()
  8    Thread 0xac8feb40 (LWP 2701) "Threadpool work" 0xb77d5424 in __kernel_vsyscall ()
  7    Thread 0xac6fcb40 (LWP 2703) "Threadpool work" 0xb77d5424 in __kernel_vsyscall ()
  6    Thread 0xadcffb40 (LWP 2754) "Threadpool work" 0xb77d5424 in __kernel_vsyscall ()
  5    Thread 0xac7fdb40 (LWP 2828) "Threadpool work" 0xb77d5424 in __kernel_vsyscall ()
  4    Thread 0xadbfeb40 (LWP 2829) "Threadpool work" 0xb77d5424 in __kernel_vsyscall ()
  3    Thread 0xac9ffb40 (LWP 2831) "Threadpool work" 0xb77d5424 in __kernel_vsyscall ()
  2    Thread 0xac3ffb40 (LWP 3684) "Threadpool work" 0xb77d5424 in __kernel_vsyscall ()
* 1    Thread 0xb7595740 (LWP 2677) "mono" 0xb77d5424 in __kernel_vsyscall ()

Thread 16 (Thread 0xb611bb40 (LWP 2679)):
#0  0xb77d5424 in __kernel_vsyscall ()
#1  0xb7753135 in sem_wait@@GLIBC_2.1 () at ../nptl/sysdeps/unix/sysv/linux/i386/i686/../i486/sem_wait.S:79
#2  0x0826d698 in mono_sem_wait ()
#3  0x081ea5ac in ?? ()
#4  0x081cf7b9 in ?? ()
#5  0x0827247d in ?? ()
#6  0xb774cf70 in start_thread (arg=0xb611bb40) at pthread_create.c:312
#7  0xb768350e in clone () at ../sysdeps/unix/sysv/linux/i386/clone.S:129

Thread 15 (Thread 0xb5effb40 (LWP 2680)):
#0  0xb77d5424 in __kernel_vsyscall ()
#1  0xb7754128 in recv () at ../sysdeps/unix/sysv/linux/i386/socket.S:95
#2  0x081288a8 in ?? ()
#3  0x0812cbb2 in ?? ()
#4  0x0827247d in ?? ()
#5  0xb774cf70 in start_thread (arg=0xb5effb40) at pthread_create.c:312
#6  0xb768350e in clone () at ../sysdeps/unix/sysv/linux/i386/clone.S:129

Thread 14 (Thread 0xb214bb40 (LWP 2684)):
#0  0xb77d5424 in __kernel_vsyscall ()
#1  0xb775112d in pthread_cond_timedwait@@GLIBC_2.3.2 () at ../nptl/sysdeps/unix/sysv/linux/i386/i686/../i486/pthread_cond_timedwait.S:245
#2  0x082492cd in ?? ()
#3  0x0825e6c3 in ?? ()
#4  0x081ce3c9 in ?? ()
#5  0x081cf1eb in ?? ()
#6  0xb215a8dc in ?? ()
#7  0xb215a324 in ?? ()
#8  0xb215a0d2 in ?? ()
#9  0xb2157ee3 in ?? ()
#10 0xb215666d in ?? ()
#11 0xb5d1d698 in ?? ()
#12 0x08073db1 in ?? ()
#13 0x081f29af in mono_runtime_invoke ()
#14 0x081f3395 in mono_runtime_delegate_invoke ()
#15 0x081cf838 in ?? ()
#16 0x0827247d in ?? ()
#17 0xb774cf70 in start_thread (arg=0xb214bb40) at pthread_create.c:312
#18 0xb768350e in clone () at ../sysdeps/unix/sysv/linux/i386/clone.S:129

Thread 13 (Thread 0xb1effb40 (LWP 2685)):
#0  0xb77d5424 in __kernel_vsyscall ()
#1  0xb7683fb6 in epoll_wait () at ../sysdeps/unix/syscall-template.S:81
#2  0x081d2029 in ?? ()
#3  0x081cf7b9 in ?? ()
#4  0x0827247d in ?? ()
#5  0xb774cf70 in start_thread (arg=0xb1effb40) at pthread_create.c:312
#6  0xb768350e in clone () at ../sysdeps/unix/sysv/linux/i386/clone.S:129

Thread 12 (Thread 0xb1edeb40 (LWP 2686)):
#0  0xb77d5424 in __kernel_vsyscall ()
#1  0xb77532e8 in sem_timedwait () at ../nptl/sysdeps/unix/sysv/linux/i386/i686/../i486/sem_timedwait.S:110
#2  0x0826d784 in mono_sem_timedwait ()
#3  0x081d3ef8 in ?? ()
#4  0x081cf7b9 in ?? ()
#5  0x0827247d in ?? ()
#6  0xb774cf70 in start_thread (arg=0xb1edeb40) at pthread_create.c:312
#7  0xb768350e in clone () at ../sysdeps/unix/sysv/linux/i386/clone.S:129

Thread 11 (Thread 0xaccffb40 (LWP 2690)):
#0  0xb77d5424 in __kernel_vsyscall ()
#1  0xb76912a8 in __clock_nanosleep (clock_id=138047476, flags=1, req=0xaccff038, rem=0x0) at ../sysdeps/unix/sysv/linux/clock_nanosleep.c:46
#2  0x0825fc4c in ?? ()
#3  0x081cf570 in ?? ()
#4  0xb1ce9ecc in ?? ()
#5  0xb1ce9e5c in ?? ()
#6  0xad751960 in ?? ()
#7  0xb215666d in ?? ()
#8  0xb5d1d698 in ?? ()
#9  0x08073db1 in ?? ()
#10 0x081f29af in mono_runtime_invoke ()
#11 0x081f3395 in mono_runtime_delegate_invoke ()
#12 0x081cf838 in ?? ()
#13 0x0827247d in ?? ()
#14 0xb774cf70 in start_thread (arg=0xaccffb40) at pthread_create.c:312
#15 0xb768350e in clone () at ../sysdeps/unix/sysv/linux/i386/clone.S:129

Thread 10 (Thread 0xad2ffb40 (LWP 2696)):
#0  0xb77d5424 in __kernel_vsyscall ()
#1  0xb76912a8 in __clock_nanosleep (clock_id=138047476, flags=1, req=0xad2ff1d8, rem=0x0) at ../sysdeps/unix/sysv/linux/clock_nanosleep.c:46
#2  0x0825fc4c in ?? ()
#3  0x081d2b80 in ?? ()
#4  0x081cf7b9 in ?? ()
#5  0x0827247d in ?? ()
#6  0xb774cf70 in start_thread (arg=0xad2ffb40) at pthread_create.c:312
#7  0xb768350e in clone () at ../sysdeps/unix/sysv/linux/i386/clone.S:129

Thread 9 (Thread 0xacf29b40 (LWP 2697)):
#0  0xb77d5424 in __kernel_vsyscall ()
#1  0xb77532e8 in sem_timedwait () at ../nptl/sysdeps/unix/sysv/linux/i386/i686/../i486/sem_timedwait.S:110
#2  0x0826d784 in mono_sem_timedwait ()
#3  0x081d3ef8 in ?? ()
#4  0x081cf7b9 in ?? ()
#5  0x0827247d in ?? ()
#6  0xb774cf70 in start_thread (arg=0xacf29b40) at pthread_create.c:312
#7  0xb768350e in clone () at ../sysdeps/unix/sysv/linux/i386/clone.S:129

Thread 8 (Thread 0xac8feb40 (LWP 2701)):
#0  0xb77d5424 in __kernel_vsyscall ()
#1  0xb77532e8 in sem_timedwait () at ../nptl/sysdeps/unix/sysv/linux/i386/i686/../i486/sem_timedwait.S:110
#2  0x0826d784 in mono_sem_timedwait ()
#3  0x081d3ef8 in ?? ()
#4  0x081cf7b9 in ?? ()
#5  0x0827247d in ?? ()
#6  0xb774cf70 in start_thread (arg=0xac8feb40) at pthread_create.c:312
#7  0xb768350e in clone () at ../sysdeps/unix/sysv/linux/i386/clone.S:129

Thread 7 (Thread 0xac6fcb40 (LWP 2703)):
#0  0xb77d5424 in __kernel_vsyscall ()
#1  0xb76912a8 in __clock_nanosleep (clock_id=138047476, flags=1, req=0xac6fc068, rem=0x0) at ../sysdeps/unix/sysv/linux/clock_nanosleep.c:46
#2  0x0825fc4c in ?? ()
#3  0x081cf570 in ?? ()
#4  0xb1ce9ecc in ?? ()
#5  0xb1ce9e5c in ?? ()
#6  0xad412470 in ?? ()
#7  0xb215666d in ?? ()
#8  0xb5d1d698 in ?? ()
#9  0x08073db1 in ?? ()
#10 0x081f29af in mono_runtime_invoke ()
#11 0x081f3395 in mono_runtime_delegate_invoke ()
#12 0x081cf838 in ?? ()
#13 0x0827247d in ?? ()
#14 0xb774cf70 in start_thread (arg=0xac6fcb40) at pthread_create.c:312
#15 0xb768350e in clone () at ../sysdeps/unix/sysv/linux/i386/clone.S:129

Thread 6 (Thread 0xadcffb40 (LWP 2754)):
#0  0xb77d5424 in __kernel_vsyscall ()
#1  0xb77532e8 in sem_timedwait () at ../nptl/sysdeps/unix/sysv/linux/i386/i686/../i486/sem_timedwait.S:110
#2  0x0826d784 in mono_sem_timedwait ()
#3  0x081d3ef8 in ?? ()
#4  0x081cf7b9 in ?? ()
#5  0x0827247d in ?? ()
#6  0xb774cf70 in start_thread (arg=0xadcffb40) at pthread_create.c:312
#7  0xb768350e in clone () at ../sysdeps/unix/sysv/linux/i386/clone.S:129

Thread 5 (Thread 0xac7fdb40 (LWP 2828)):
#0  0xb77d5424 in __kernel_vsyscall ()
#1  0xb77541a8 in recvfrom () at ../sysdeps/unix/sysv/linux/i386/socket.S:95
#2  0x082596f4 in ?? ()
#3  0x082597f3 in ?? ()
#4  0x081c35b0 in ?? ()
#5  0xb2021138 in ?? ()
#6  0xb2020fd0 in ?? ()
#7  0xb2020c18 in ?? ()
#8  0xb202096c in ?? ()
#9  0xb201fb75 in ?? ()
#10 0xb1e93e4a in ?? ()
#11 0xb1e93c3c in ?? ()
#12 0xab76fa7c in ?? ()
#13 0xab76f896 in ?? ()
#14 0xab76f4aa in ?? ()
#15 0xb215666d in ?? ()
#16 0xb5d1d698 in ?? ()
#17 0x08073db1 in ?? ()
#18 0x081f29af in mono_runtime_invoke ()
#19 0x081f3395 in mono_runtime_delegate_invoke ()
#20 0x081cf838 in ?? ()
#21 0x0827247d in ?? ()
#22 0xb774cf70 in start_thread (arg=0xac7fdb40) at pthread_create.c:312
#23 0xb768350e in clone () at ../sysdeps/unix/sysv/linux/i386/clone.S:129

Thread 4 (Thread 0xadbfeb40 (LWP 2829)):
#0  0xb77d5424 in __kernel_vsyscall ()
#1  0xb7750d4b in pthread_cond_wait@@GLIBC_2.3.2 () at ../nptl/sysdeps/unix/sysv/linux/i386/i686/../i486/pthread_cond_wait.S:187
#2  0x0824936c in ?? ()
#3  0x08249413 in ?? ()
#4  0x0825e7c8 in ?? ()
#5  0x081edfe8 in ?? ()
#6  0xab757a2c in ?? ()
#7  0xab7575ec in ?? ()
#8  0xab757400 in ?? ()
#9  0xab75533c in ?? ()
#10 0xb215666d in ?? ()
#11 0xb5d1d698 in ?? ()
#12 0x08073db1 in ?? ()
#13 0x081f29af in mono_runtime_invoke ()
#14 0x081f3395 in mono_runtime_delegate_invoke ()
#15 0x081cf838 in ?? ()
#16 0x0827247d in ?? ()
#17 0xb774cf70 in start_thread (arg=0xadbfeb40) at pthread_create.c:312
#18 0xb768350e in clone () at ../sysdeps/unix/sysv/linux/i386/clone.S:129

Thread 3 (Thread 0xac9ffb40 (LWP 2831)):
#0  0xb77d5424 in __kernel_vsyscall ()
#1  0xb7750d4b in pthread_cond_wait@@GLIBC_2.3.2 () at ../nptl/sysdeps/unix/sysv/linux/i386/i686/../i486/pthread_cond_wait.S:187
#2  0x0824936c in ?? ()
#3  0x08249413 in ?? ()
#4  0x0825e7c8 in ?? ()
#5  0x081edfe8 in ?? ()
#6  0xab757a2c in ?? ()
#7  0xab7575ec in ?? ()
#8  0xab757400 in ?? ()
#9  0xab734754 in ?? ()
#10 0xb215666d in ?? ()
#11 0xb5d1d698 in ?? ()
#12 0x08073db1 in ?? ()
#13 0x081f29af in mono_runtime_invoke ()
#14 0x081f3395 in mono_runtime_delegate_invoke ()
#15 0x081cf838 in ?? ()
#16 0x0827247d in ?? ()
#17 0xb774cf70 in start_thread (arg=0xac9ffb40) at pthread_create.c:312
#18 0xb768350e in clone () at ../sysdeps/unix/sysv/linux/i386/clone.S:129

Thread 2 (Thread 0xac3ffb40 (LWP 3684)):
#0  0xb77d5424 in __kernel_vsyscall ()
#1  0xb7754cdb in waitpid () at ../sysdeps/unix/syscall-template.S:81
#2  0x080fddea in ?? ()
#3  <signal handler called>
#4  0xb77d5424 in __kernel_vsyscall ()
#5  0xb75c5607 in __GI_raise (sig=sig@entry=6) at ../nptl/sysdeps/unix/sysv/linux/raise.c:56
#6  0xb75c8a33 in __GI_abort () at abort.c:89
#7  0x082780e1 in ?? ()
#8  0x08278268 in ?? ()
#9  0x08278303 in ?? ()
#10 0x0825341c in ?? ()
#11 0x082557cf in ?? ()
#12 0x081c62c7 in ?? ()
#13 0xab7400a4 in ?? ()
#14 0xab73ffa0 in ?? ()
#15 0xab73fee8 in ?? ()
#16 0xab73fe78 in ?? ()
#17 0xab73fc38 in ?? ()
#18 0xae0e48dc in ?? ()
#19 0xae0f7420 in ?? ()
#20 0xb21566a6 in ?? ()
#21 0xb5d1d698 in ?? ()
#22 0x08073db1 in ?? ()
#23 0x081f29af in mono_runtime_invoke ()
#24 0x081f3395 in mono_runtime_delegate_invoke ()
#25 0x081cf838 in ?? ()
#26 0x0827247d in ?? ()
#27 0xb774cf70 in start_thread (arg=0xac3ffb40) at pthread_create.c:312
#28 0xb768350e in clone () at ../sysdeps/unix/sysv/linux/i386/clone.S:129

Thread 1 (Thread 0xb7595740 (LWP 2677)):
#0  0xb77d5424 in __kernel_vsyscall ()
#1  0xb76745ab in poll () at ../sysdeps/unix/syscall-template.S:81
#2  0xb4f433a8 in ?? () from /usr/lib/i386-linux-gnu/libxcb.so.1
#3  0xb4f45088 in ?? () from /usr/lib/i386-linux-gnu/libxcb.so.1
#4  0xb4f451eb in xcb_wait_for_reply () from /usr/lib/i386-linux-gnu/libxcb.so.1
#5  0xb4f937ba in _XReply () from /usr/lib/i386-linux-gnu/libX11.so.6
#6  0xb4ed7db6 in ?? () from /usr/lib/i386-linux-gnu/mesa/libGL.so.1
#7  0xb4ed5273 in ?? () from /usr/lib/i386-linux-gnu/mesa/libGL.so.1
#8  0xb4b10136 in ?? () from /usr/lib/i386-linux-gnu/dri/i965_dri.so
#9  0xb4b105ec in ?? () from /usr/lib/i386-linux-gnu/dri/i965_dri.so
#10 0xb4b04b70 in ?? () from /usr/lib/i386-linux-gnu/dri/i965_dri.so
#11 0xb4867a63 in ?? () from /usr/lib/i386-linux-gnu/dri/i965_dri.so
#12 0xb22cdb64 in ?? ()
#13 0xade17f81 in ?? ()
#14 0xade175f8 in ?? ()
#15 0xade16e58 in ?? ()
#16 0xac223e60 in ?? ()
#17 0xade13f82 in ?? ()
#18 0xade13e9c in ?? ()
#19 0xade13bb9 in ?? ()
#20 0xad75e6b4 in ?? ()
#21 0xad75e1b0 in ?? ()
#22 0xad75e121 in ?? ()
#23 0xad75df38 in ?? ()
#24 0xad7587dc in ?? ()
#25 0xad753000 in ?? ()
#26 0xad752af4 in ?? ()
#27 0xad751c98 in ?? ()
#28 0xad751b90 in ?? ()
#29 0xb1e6a0da in ?? ()
#30 0xb1e69e0c in ?? ()
#31 0xb711851c in ?? ()
#32 0xb71197de in ?? ()
#33 0x08073db1 in ?? ()
#34 0x081f29af in mono_runtime_invoke ()
#35 0x081f4721 in mono_runtime_exec_main ()
#36 0x080d246c in mono_main ()
#37 0x08067712 in ?? ()
#38 0xb75b0a83 in __libc_start_main (main=0x8067610, argc=4, argv=0xbf9be894, init=0x8281fd0, fini=0x8281fc0, rtld_fini=0xb77e5180 <_dl_fini>, stack_end=0xbf9be88c) at libc-start.c:287
#39 0x080678cd in ?? ()

=================================================================
Got a SIGABRT while executing native code. This usually indicates
a fatal error in the mono runtime or one of the native libraries 
used by your application.
=================================================================

How to prevent me it?
Comment 1 Zoltan Varga 2015-01-25 11:50:13 UTC
What mono version is this ?
Comment 2 Roman 2015-01-25 16:42:23 UTC
Version mono is 2.10. Open your eyes
Comment 3 Zoltan Varga 2015-01-26 10:15:48 UTC
Please try at least mono 3.12.
Comment 4 Ludovic Henry 2018-02-28 23:39:12 UTC
Can you still reproduce with latest version? If so, please provide test case. Thank you.
Comment 5 Roman 2018-03-01 06:55:47 UTC
No, I can't reproduce it. Probably problem was removed
Comment 6 Ludovic Henry 2018-03-01 16:01:16 UTC
As reported in https://bugzilla.xamarin.com/show_bug.cgi?id=26394#c5 problem has been fixed. If you can still reproduce, please submit a new issue at https://github.com/mono/mono/issues. Thank you