New SIGABRT after upgrading to Mono 4 running NUnit tests

为君一笑 提交于 2019-12-24 03:26:43

问题


We upgraded from Mono 3.12.0 to 4.0.1 the other day and now our NUnit tests crash with a SIGABRT and some other information. So far Google has been of no help and I'm running out of things to try (minus a rollback to 3.12.0). I was just hoping someone could maybe take a look and help me find a new avenue to explore!enter code here

I've tried the --shadowcopy switch, the --framework=v4.0/mono-4.0 switch, etc.

Console Output:

matt@matt-T420:~/bah3$ ~/Downloads/nunit3/bin/nunit-console.exe --

framework=mono-4.0 -v src/bin/Bah.Test.dll -test=Bah.Test.Unit
NUnit Console Runner 3.0.5562 
Copyright (C) 2014 Charlie Poole

Test Files
    src/bin/Bah.Test.dll

Runtime Environment
   OS Version: Unix 3.19.0.16
  CLR Version: 4.0.30319.17020

Options
    ProcessModel: Default    DomainUsage: Default
    Execution Runtime: mono-4.0
    Work Directory: /home/matt/bah
    Internal Trace: Off

Selected test(s):
    bah.Test.Unit
Agent process 29586 starting
Running under version 4.0.30319.17020, 4.0.1 (tarball Tue Apr 28 11:47:58 UTC 2015)
=> Bah.Test.Unit.ApplicationSourceTests.ToString
[ApplicationSource: Base=[Source: Base=[BahEntity: Key=[Key: Type=Bah.Core.SourceTypes.ApplicationSource, Name=a1], Name=a1], SourceType=Application], Command=command]
System.Type[] doesn't implement interface Castle.DynamicProxy.IInvocation

Stacktrace:

  at <unknown> <0xffffffff>
  at Moq.Proxy.CastleProxyFactory/CallContext.get_Method () <0x00021>
  at Moq.HandleDestructor.HandleIntercept (Moq.Proxy.ICallContext,Moq.InterceptorContext,Moq.CurrentInterceptContext) <0x0001d>
  at Moq.Interceptor.Intercept (Moq.Proxy.ICallContext) <0x000b0>
  at Moq.Proxy.CastleProxyFactory/Interceptor.Intercept (Castle.DynamicProxy.IInvocation) <0x00085>
  at Castle.DynamicProxy.AbstractInvocation.Proceed () <0x0023e>
  at Castle.Proxies.IRepositoryProxy.Load<T, DTO> (Bah.Core.IKey,System.Func`2<DTO, T>) <0x001d3>
  at Bah.Core.RepositoryExtensions.LoadContainer (Bah.Core.IRepository,Bah.Core.IKey) <0x000b0>
  at Bah.Test.Unit.ContainerTest.TestContainerLoad () <0x00703>
  at (wrapper runtime-invoke) object.runtime_invoke_void__this__ (object,intptr,intptr,intptr) <0xffffffff>
  at <unknown> <0xffffffff>
  at (wrapper managed-to-native) System.Reflection.MonoMethod.InternalInvoke (System.Reflection.MonoMethod,object,object[],System.Exception&) <0xffffffff>
  at System.Reflection.MonoMethod.Invoke (object,System.Reflection.BindingFlags,System.Reflection.Binder,object[],System.Globalization.CultureInfo) <0x000f7>
  at System.Reflection.MethodBase.Invoke (object,object[]) <0x0002a>
  at NUnit.Core.Reflect.InvokeMethod (System.Reflection.MethodInfo,object,object[]) <0x0004f>
  at NUnit.Core.TestMethod.RunTestMethod () <0x00053>
  at NUnit.Core.TestMethod.RunTestCase (NUnit.Core.TestResult) <0x00027>
  at NUnit.Core.TestMethod.RunTest () <0x0012f>
  at NUnit.Core.NUnitTestMethod.RunTest () <0x0000f>
  at NUnit.Core.TestMethod.RunRepeatedTest () <0x000c3>
  at NUnit.Core.TestMethod.RunTestInContext () <0x00627>
  at NUnit.Core.TestMethod.Run (NUnit.Core.EventListener,NUnit.Core.ITestFilter) <0x000b3>
  at NUnit.Core.TestSuite.RunAllTests (NUnit.Core.TestResult,NUnit.Core.EventListener,NUnit.Core.ITestFilter) <0x00291>
  at NUnit.Core.TestSuite.RunSuite (NUnit.Core.EventListener,NUnit.Core.ITestFilter) <0x0049b>
  at NUnit.Core.TestSuite.RunSuiteInContext (NUnit.Core.EventListener,NUnit.Core.ITestFilter) <0x00087>
  at NUnit.Core.TestSuite.Run (NUnit.Core.EventListener,NUnit.Core.ITestFilter) <0x00083>
  at NUnit.Core.TestFixture.Run (NUnit.Core.EventListener,NUnit.Core.ITestFilter) <0x00087>
  at NUnit.Core.TestSuite.RunAllTests (NUnit.Core.TestResult,NUnit.Core.EventListener,NUnit.Core.ITestFilter) <0x00291>
  at NUnit.Core.TestSuite.RunSuite (NUnit.Core.EventListener,NUnit.Core.ITestFilter) <0x0049b>
  at NUnit.Core.TestSuite.RunSuiteInContext (NUnit.Core.EventListener,NUnit.Core.ITestFilter) <0x00087>
  at NUnit.Core.TestSuite.Run (NUnit.Core.EventListener,NUnit.Core.ITestFilter) <0x00083>
  at NUnit.Core.TestSuite.RunAllTests (NUnit.Core.TestResult,NUnit.Core.EventListener,NUnit.Core.ITestFilter) <0x00291>
  at NUnit.Core.TestSuite.RunSuite (NUnit.Core.EventListener,NUnit.Core.ITestFilter) <0x0049b>
  at NUnit.Core.TestSuite.RunSuiteInContext (NUnit.Core.EventListener,NUnit.Core.ITestFilter) <0x00087>
  at NUnit.Core.TestSuite.Run (NUnit.Core.EventListener,NUnit.Core.ITestFilter) <0x00083>
  at NUnit.Core.TestSuite.RunAllTests (NUnit.Core.TestResult,NUnit.Core.EventListener,NUnit.Core.ITestFilter) <0x00291>
  at NUnit.Core.TestSuite.RunSuite (NUnit.Core.EventListener,NUnit.Core.ITestFilter) <0x0049b>
  at NUnit.Core.TestSuite.RunSuiteInContext (NUnit.Core.EventListener,NUnit.Core.ITestFilter) <0x00087>
  at NUnit.Core.TestSuite.Run (NUnit.Core.EventListener,NUnit.Core.ITestFilter) <0x00083>
  at NUnit.Core.TestSuite.RunAllTests (NUnit.Core.TestResult,NUnit.Core.EventListener,NUnit.Core.ITestFilter) <0x00291>
  at NUnit.Core.TestSuite.RunSuite (NUnit.Core.EventListener,NUnit.Core.ITestFilter) <0x0049b>
  at NUnit.Core.TestSuite.RunSuiteInContext (NUnit.Core.EventListener,NUnit.Core.ITestFilter) <0x00087>
  at NUnit.Core.TestSuite.Run (NUnit.Core.EventListener,NUnit.Core.ITestFilter) <0x00083>
  at NUnit.Core.SimpleTestRunner.Run (NUnit.Core.EventListener,NUnit.Core.ITestFilter,bool,NUnit.Core.LoggingThreshold) <0x00130>
  at NUnit.Core.TestRunnerThread.TestRunnerThreadProc () <0x00065>
  at System.Threading.Thread.StartInternal () <0x00071>
  at (wrapper runtime-invoke) object.runtime_invoke_void__this__ (object,intptr,intptr,intptr) <0xffffffff>

Native stacktrace:

    /usr/bin/mono() [0x4b1d6c]
    /lib/x86_64-linux-gnu/libpthread.so.0(+0x10d10) [0x7f18fd533d10]
    /lib/x86_64-linux-gnu/libc.so.6(gsignal+0x37) [0x7f18fd18e267]
    /lib/x86_64-linux-gnu/libc.so.6(abort+0x16a) [0x7f18fd18feca]
    /usr/bin/mono() [0x629079]
    /usr/bin/mono() [0x629287]
    /usr/bin/mono() [0x629332]
    /usr/bin/mono() [0x4b3d8f]
    /usr/bin/mono() [0x4b45a3]
    [0x40e62046]

Debug info from gdb:

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.

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

System.Runtime.Remoting.RemotingException: Connection refused

Server stack trace: 
  at System.Runtime.Remoting.Channels.Tcp.HostConnectionPool.CreateConnection () [0x00000] in <filename unknown>:0 
  at System.Runtime.Remoting.Channels.Tcp.HostConnectionPool.GetConnection () [0x00000] in <filename unknown>:0 
  at System.Runtime.Remoting.Channels.Tcp.TcpConnectionPool.GetConnection (System.String host, Int32 port) [0x00000] in <filename unknown>:0 
  at System.Runtime.Remoting.Channels.Tcp.TcpClientTransportSink.ProcessMessage (IMessage msg, ITransportHeaders requestHeaders, System.IO.Stream requestStream, ITransportHeaders& responseHeaders, System.IO.Stream& responseStream) [0x00000] in <filename unknown>:0 
  at System.Runtime.Remoting.Channels.BinaryClientFormatterSink.SyncProcessMessage (IMessage msg) [0x00000] in <filename unknown>:0 

Exception rethrown at [0]: 

  at System.Runtime.Remoting.Channels.Tcp.HostConnectionPool.CreateConnection () [0x00000] in <filename unknown>:0 
  at System.Runtime.Remoting.Channels.Tcp.HostConnectionPool.GetConnection () [0x00000] in <filename unknown>:0 
  at System.Runtime.Remoting.Channels.Tcp.TcpConnectionPool.GetConnection (System.String host, Int32 port) [0x00000] in <filename unknown>:0 
  at System.Runtime.Remoting.Channels.Tcp.TcpClientTransportSink.ProcessMessage (IMessage msg, ITransportHeaders requestHeaders, System.IO.Stream requestStream, ITransportHeaders& responseHeaders, System.IO.Stream& responseStream) [0x00000] in <filename unknown>:0 
  at System.Runtime.Remoting.Channels.BinaryClientFormatterSink.SyncProcessMessage (IMessage msg) [0x00000] in <filename unknown>:0 

来源:https://stackoverflow.com/questions/30105426/new-sigabrt-after-upgrading-to-mono-4-running-nunit-tests

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!