[Mono-dev] System.ExecutionEngineException: Failed to create shadow copy (CopyFile).

Rodrigo Kumpera kumpera at gmail.com
Fri Dec 27 18:22:40 UTC 2013


It depends on what information you're trying to inspect. It should have the
same laziness in resolving type information as .NET.

Where in the inspected type does the missing assembly come into play?

It should be simple to build a test case for that, just delete one assembly
after compilation is done.


On Fri, Dec 27, 2013 at 11:18 AM, Alistair Bush <alistair.bush at gmail.com>wrote:

> Just wanted to follow up with this here first before I create a bug report.
>
> I believe I have tracked down the issue here.
>
> Fubu, the creating app, is setting up an app domain whose private bin
> directory is at another path.   To ensure it can resolve its types is it
> copying a set of Assemblies by
> name x.RequireAssembly("Owin.Extensions"); or by containing
> type x.RequireAssemblyContainingType<IActivator>();.
>
> It is then calling a remote proxy of a class which Fubu itself contains
> (using messaging) which attempts to
>
> var assemblies = list.SelectMany(x => AssembliesFromPath(x));
> var pool = new TypePool();
> pool.IgnoreExportTypeFailures = true;
>
> pool.AddAssemblies(assemblies);
> return pool.TypesMatching(x => x.IsConcreteTypeOf<IApplicationSource>() &&
> x.IsConcreteWithDefaultCtor());
>
> It is at this point that it blows up on inspecting the type.
>
> I was able to work around this by copying a dependency of Fubu into the
> target bin directory.  The dependency was Selenium's WebDriver dll, which
> as far as I can see is not utilised directly from the code actually
> executing.
>
> So does mono require all referenced dependencies of a library to be
> available before you can inspect Type information?
>
>
> On Tue, Dec 24, 2013 at 10:58 PM, Alistair Bush <alistair.bush at gmail.com>wrote:
>
>> Small.....  Not currently, I will attempt to create one tho.   Also will
>> raise a bug report on this as well sometime this week.   Probably not
>> tomorrow :)
>>  On 24/12/2013 7:32 PM, "Rodrigo Kumpera" <kumpera at gmail.com> wrote:
>>
>>> Do you have a small test case that shows this behavior? Could you file a
>>> bug report on this?
>>>
>>>
>>> On Mon, Dec 23, 2013 at 6:57 AM, Alistair Bush <alistair.bush at gmail.com>wrote:
>>>
>>>> I have be working to get the fubu (mvc) framework and associated tools
>>>> working on mono/linux.
>>>> I have gotten most of the way to running a basic app but have sadly
>>>> come stuck on the following and am running out of ideas.
>>>>
>>>> Basically I have setup a 'web' project using fubu new and am attempting
>>>> to run it by calling fubu run.
>>>>
>>>> Sadly i'm getting the output [1] and as you will be able to see this is
>>>> caused by a ExecutionEngineException when attempting to call
>>>> Type.IsAssignableFrom.
>>>>
>>>> At this particular point in the code it is my understanding that the
>>>> application is within a separate app domain ( see
>>>> Bottles.Services.Remote.RemoteServicesProxy ).
>>>>
>>>> This is anything which should be stopping mono from inspecting Type
>>>> information on a Type when within a separate app domain?
>>>>
>>>> Also it the moment im a little stuck on how to get more information to
>>>> debug this issue.  Any suggestions would be welcomed.   Thanks.
>>>>
>>>>
>>>>
>>>> [1]
>>>> $ fubu run --directory src/fubutest
>>>> Alias is returning '/home/alistair/Projects/fubu/tests/fubutest'
>>>> Alias is returning 'src/fubutest'
>>>> Assembly bin path is bin
>>>> The configuration file is
>>>> /home/alistair/Projects/fubu/tests/fubutest/src/fubutest/Web.config
>>>> Started service Fubu.Running.RemoteFubuMvcBootstrapper
>>>> Trying to start application
>>>> /home/alistair/Projects/fubu/tests/fubutest/src/fubutest with port number
>>>> 5500
>>>> FubuMode = Development
>>>> ERROR: System.ExecutionEngineException: Failed to create shadow copy
>>>> (CopyFile).
>>>>
>>>> Server stack trace:
>>>>   at (wrapper managed-to-native) System.Type:type_is_assignable_from
>>>> (System.Type,System.Type)
>>>>   at System.Type.IsAssignableFrom (System.Type c) [0x00000] in
>>>> <filename unknown>:0
>>>>   at FubuCore.TypeExtensions.IsConcreteTypeOf[IApplicationSource]
>>>> (System.Type pluggedType) [0x00000] in <filename unknown>:0
>>>>   at Fubu.Running.ApplicationSourceFinder.<Find>m__1 (System.Type x)
>>>> [0x00000] in <filename unknown>:0
>>>>   at
>>>> System.Linq.Enumerable+<CreateWhereIterator>c__Iterator1E`1[System.Type].MoveNext
>>>> () [0x00000] in <filename unknown>:0
>>>>   at
>>>> System.Linq.Enumerable+<CreateDistinctIterator>c__Iterator3`1[System.Type].MoveNext
>>>> () [0x00000] in <filename unknown>:0
>>>>   at System.Linq.Enumerable.Any[Type] (IEnumerable`1 source) [0x00000]
>>>> in <filename unknown>:0
>>>>   at Fubu.Running.ApplicationSourceChooser.Find
>>>> (Fubu.Running.StartApplication message, System.Action`1 onFound) [0x00000]
>>>> in <filename unknown>:0
>>>>   at Fubu.Running.RemoteFubuMvcBootstrapper.Receive
>>>> (Fubu.Running.StartApplication message) [0x00000] in <filename unknown>:0
>>>>   at
>>>> Bottles.Services.Messaging.MessagingHub+<>c__DisplayClass3`1[Fubu.Running.StartApplication].<Send>b__1
>>>> (IListener`1 x) [0x00000] in <filename unknown>:0
>>>>   at
>>>> System.Collections.Generic.GenericEnumerableExtensions.Each[IListener`1]
>>>> (IEnumerable`1 values, System.Action`1 eachAction) [0x00000] in <filename
>>>> unknown>:0
>>>>   at Bottles.Services.Messaging.MessagingHub.Send[StartApplication]
>>>> (Fubu.Running.StartApplication message) [0x00000] in <filename unknown>:0
>>>>   at
>>>> Bottles.Services.Messaging.MessagingHub+Sender`1[Fubu.Running.StartApplication].Send
>>>> (System.Object o, Bottles.Services.Messaging.MessagingHub listeners)
>>>> [0x00000] in <filename unknown>:0
>>>>   at Bottles.Services.Messaging.MessagingHub.SendJson (System.String
>>>> json) [0x00000] in <filename unknown>:0
>>>>   at Bottles.Services.Remote.RemoteServicesProxy.SendJson
>>>> (System.String json) [0x00000] in <filename unknown>:0
>>>>   at (wrapper managed-to-native)
>>>> System.Runtime.Remoting.RemotingServices:InternalExecute
>>>> (System.Reflection.MethodBase,object,object[],object[]&)
>>>>   at System.Runtime.Remoting.RemotingServices.InternalExecuteMessage
>>>> (System.MarshalByRefObject target, IMethodCallMessage reqMsg) [0x00000] in
>>>> <filename unknown>:0
>>>>
>>>> Exception rethrown at [0]:
>>>>
>>>>   at System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke
>>>> (System.Runtime.Remoting.Proxies.RealProxy rp, IMessage msg,
>>>> System.Exception& exc, System.Object[]& out_args) [0x00000] in <filename
>>>> unknown>:0
>>>> Shutting down finalizer thread timed out.
>>>> Failed to destroy mutex 0x965988 error code 16 errno 2
>>>>
>>>>
>>>> _______________________________________________
>>>> Mono-devel-list mailing list
>>>> Mono-devel-list at lists.ximian.com
>>>> http://lists.ximian.com/mailman/listinfo/mono-devel-list
>>>>
>>>>
>>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.ximian.com/pipermail/mono-devel-list/attachments/20131227/63b729ae/attachment-0001.html>


More information about the Mono-devel-list mailing list