Notice (2018-05-24): bugzilla.xamarin.com is now in
Please join us on
Visual Studio Developer Community and in the
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
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.
Created attachment 20781 [details]
$ git clone firstname.lastname@example.org:mono/msbuild.git
# xplat-master branch
$ ./cibuild.sh --scope Test --host Mono --target Mono
The above crashes while trying to run tests with xunit:
(partial trace here, full output log attached):
at (wrapper managed-to-native) System.Runtime.Remoting.Proxies.RealProxy.InternalGetProxyType (object) <0x00012>
at System.Runtime.Remoting.Proxies.RealProxy.GetProxiedType () [0x00027] in <6ee31efbdbd54ef9b1eb26def1af9a98>:0
at System.Runtime.Remoting.Proxies.RemotingProxy.CanCastTo (System.Type,object) [0x00059] in <6ee31efbdbd54ef9b1eb26def1af9a98>:0
at (wrapper runtime-invoke) <Module>.runtime_invoke_bool__this___object_object (object,intptr,intptr,intptr) [0x00059] in <6ee31efbdbd54ef9b1eb26def1af9a98>:0
frame #3: 0x002226b9 mono`mono_arch_handle_altstack_exception(sigctx=<unavailable>, siginfo=<unavailable>, fault_addr=<unavailable>, stack_ovf=0) + 169 at exceptions-x86.c:1115 [opt]
frame #4: 0x001058d2 mono`mono_sigsegv_signal_handler(_dummy=<unavailable>, _info=<unavailable>, context=<unavailable>) + 482 at mini-runtime.c:2857 [opt]
frame #5: 0x9f98eebb libsystem_platform.dylib`_sigtramp + 43
frame #6: 0x00248433 mono`mono_class_from_mono_type(type=0x0000006c) + 19 at class.c:6319 [opt]
frame #7: 0x00345d93 mono`mono_type_get_object_checked(domain=0x78fb4090, type=0x0000006c, error=<unavailable>) + 51 at reflection.c:451 [opt]
frame #8: 0x002786dc mono`ves_icall_Remoting_RealProxy_InternalGetProxyType(tp=0x00959580) + 44 at icall.c:6391 [opt]
EXEC : error : (i386) /Library/Frameworks/Mono.framework/Versions/4.9.3/lib/mono/4.5/mscorlib.dll.dylib empty dSYM file detected, dSYM was created with an executable with no debug info. [/Users/ankit/dev/msbuild/src/Framework.UnitTests/Microsoft.Build.Framework.UnitTests.csproj]
This is with mono 22.214.171.124 from the 2017-02 branch, built on wrench few hours back (06060e29).
Full output log is attached.
This works fine with mono 126.96.36.1990 .
I was getting the same result with a recent 4.9.4.x, but I didn't try the latest from master.
Created attachment 20782 [details]
I'm getting the same thing with 188.8.131.52
So somehow ves_icall_Remoting_RealProxy_InternalGetProxyType is being called with a System.String as the argument. Some printf debugging (https://gist.github.com/lambdageek/147b5a92be3febc8be2dfa08052255f4) shows
$ ../mono/mono/mini/mono /Users/alekseyk/work/msbuild/packages/xunit.runn
category=nonosxtests -notrait category=non-mono-tests -notrait category=mono-o
sx-failing -noshadow -parallel none -xml /Users/alekseyk/work/msbuild/bin/Debug
ml -html /Users/alekseyk/work/msbuild/bin/Debug-MONO/OSX_Deployment_Test/Micros
xUnit.net Console Runner (64-bit .NET 4.0.30319.42000)
tp class is System.String
tp is 0x102dec8e0
remote_class is 0x62006d00650073
(and then it crashes trying to print the tp->remote_class->proxy_class).
So someone is creating a RealProxy instance with __objTP set to a string instead of a proxy.
Ugh. mono_object_handle_isinst_mbyref calls mono_runtime_invoke_checked (..., rp, ..., ...) when it should be mono_runtime_invoked_checked (..., MONO_HANDLE_RAW (rp), ..., ...)
Easy fix, but now I'm worried that I made the same mistake elsewhere.
Reassigning to you since I'm out of time on babysitting the Jenkins builds.
PR against 2017-02 https://github.com/mono/mono/pull/4592
(msbbuild passes unit tests on my machine with this PR applies)
PR against master https://github.com/mono/mono/pull/4594
Merged to 2017-02 as of df9df437aee0d67a64744db1c5a28ca805b0644d
Reopening and sending to Aleksey because we want to add an automated test.
…correction: Closing as fixed and opening #55341 to track the need for a test.
as per #comment 8 , Could you please mark this bug as verified/close. There is Bug#55341 has been created and it is New Status.