Thanks to visit codestin.com
Credit goes to github.com

Skip to content

msbuild crash with Mono 5.4 #6485

@migueldeicaza

Description

@migueldeicaza

Steps to Reproduce

$ git clone https://github.com/migueldeicaza/TensorFlowSharp.git
$ cd TensorFlowSharp
$ msbuild /t:restore TensorFlowSharp.sln

Current Behavior

I get a managed and unmanaged crash while doing this, output attached on the stack trace section.

Expected Behavior

Just a nuget restore.

On which platforms did you notice this

[x] macOS
[ ] Linux
[ ] Windows

Version Used:

mono$ mono --version
Mono JIT compiler version 5.11.0 (master/87315d19c6b Fri Jan  5 10:36:15 EST 2018)
Copyright (C) 2002-2014 Novell, Inc, Xamarin Inc and Contributors. www.mono-project.com
	TLS:           normal
	SIGSEGV:       altstack
	Notification:  kqueue
	Architecture:  amd64
	Disabled:      none
	Misc:          softdebug 
	Interpreter:   yes
	LLVM:          supported, not enabled.
	GC:            sgen (concurrent by default)

Stacktrace


mono$ msbuild /t:Restore TensorFlowSharp.sln
Microsoft (R) Build Engine version 15.4.0.0 (master/f296e67b Wed Oct 25 12:26:03 EDT 2017) for Mono
Copyright (C) Microsoft Corporation. All rights reserved.

Build started 1/11/2018 9:55:07 AM.
Stacktrace:

at <0xffffffff>
at System.Xml.XmlEncodedRawTextWriter.WriteStartElement (string,string,string) [0x0005d] in <2f0746aff5a04842970cb410005ef603>:0
at System.Xml.XmlEncodedRawTextWriterIndent.WriteStartElement (string,string,string) [0x0003b] in <2f0746aff5a04842970cb410005ef603>:0
at System.Xml.XmlWellFormedWriter.WriteStartElement (string,string,string) [0x000b5] in <2f0746aff5a04842970cb410005ef603>:0
at System.Xml.XmlWriter.WriteStartElement (string) [0x00000] in <2f0746aff5a04842970cb410005ef603>:0
at Microsoft.Build.Construction.SolutionProjectGenerator.AddPropertyGroupForSolutionConfiguration (Microsoft.Build.Construction.ProjectRootElement,Microsoft.Build.Construction.SolutionFile,Microsoft.Build.Construction.SolutionConfigurationInSolution) [0x00042] in <76dd0031e0df4aa99d9befb4c4585c69>:0
at Microsoft.Build.Construction.SolutionProjectGenerator.AddPropertyGroupForSolutionConfiguration (Microsoft.Build.Construction.ProjectRootElement,Microsoft.Build.Construction.SolutionConfigurationInSolution) [0x00000] in <76dd0031e0df4aa99d9befb4c4585c69>:0
at Microsoft.Build.Construction.SolutionProjectGenerator.CreateTraversalInstance (string,bool,System.Collections.Generic.List1<Microsoft.Build.Construction.ProjectInSolution>) [0x00076] in <76dd0031e0df4aa99d9befb4c4585c69>:0 at Microsoft.Build.Construction.SolutionProjectGenerator.CreateSolutionProject (string,bool) [0x00095] in <76dd0031e0df4aa99d9befb4c4585c69>:0 at Microsoft.Build.Construction.SolutionProjectGenerator.Generate () [0x00046] in <76dd0031e0df4aa99d9befb4c4585c69>:0 at Microsoft.Build.Construction.SolutionProjectGenerator.Generate (Microsoft.Build.Construction.SolutionFile,System.Collections.Generic.IDictionary2<string, string>,string,Microsoft.Build.Framework.BuildEventContext,Microsoft.Build.BackEnd.Logging.ILoggingService,System.Collections.Generic.IReadOnlyCollection1<string>) [0x0000e] in <76dd0031e0df4aa99d9befb4c4585c69>:0 at Microsoft.Build.Execution.ProjectInstance.GenerateSolutionWrapper (string,System.Collections.Generic.IDictionary2<string, string>,string,Microsoft.Build.BackEnd.Logging.ILoggingService,Microsoft.Build.Framework.BuildEventContext,System.Collections.Generic.IReadOnlyCollection1<string>) [0x00057] in <76dd0031e0df4aa99d9befb4c4585c69>:0 at Microsoft.Build.Execution.ProjectInstance.LoadSolutionForBuild (string,Microsoft.Build.Collections.PropertyDictionary1<Microsoft.Build.Execution.ProjectPropertyInstance>,string,Microsoft.Build.Execution.BuildParameters,Microsoft.Build.BackEnd.Logging.ILoggingService,Microsoft.Build.Framework.BuildEventContext,bool,System.Collections.Generic.IReadOnlyCollection1<string>) [0x001e5] in <76dd0031e0df4aa99d9befb4c4585c69>:0 at Microsoft.Build.Execution.BuildManager.LoadSolutionIntoConfiguration (Microsoft.Build.BackEnd.BuildRequestConfiguration,Microsoft.Build.Framework.BuildEventContext) [0x00055] in <76dd0031e0df4aa99d9befb4c4585c69>:0 at Microsoft.Build.Execution.BuildManager.HandleNewRequest (int,Microsoft.Build.BackEnd.BuildRequestBlocker) [0x00041] in <76dd0031e0df4aa99d9befb4c4585c69>:0 at Microsoft.Build.Execution.BuildManager.IssueRequestToScheduler (Microsoft.Build.Execution.BuildSubmission,bool,Microsoft.Build.BackEnd.BuildRequestBlocker) [0x00052] in <76dd0031e0df4aa99d9befb4c4585c69>:0 at Microsoft.Build.Execution.BuildManager/<>c__DisplayClass61_1.<ExecuteSubmission>b__0 () [0x00000] in <76dd0031e0df4aa99d9befb4c4585c69>:0 at Microsoft.Build.Execution.BuildManager.ProcessWorkQueue (System.Action) [0x0005a] in <76dd0031e0df4aa99d9befb4c4585c69>:0 at Microsoft.Build.Execution.BuildManager.<BeginBuild>b__48_0 (System.Action) [0x00000] in <76dd0031e0df4aa99d9befb4c4585c69>:0 at System.Threading.Tasks.Dataflow.ActionBlock1<TInput_REF>.ProcessMessage (System.Action1<TInput_REF>,System.Collections.Generic.KeyValuePair2<TInput_REF, long>) [0x00008] in <066d3dbd907c47bba08a73d35df4199f>:0
at System.Threading.Tasks.Dataflow.ActionBlock1/<>c__DisplayClass5<TInput_REF>.<.ctor>b__0 (System.Collections.Generic.KeyValuePair2<TInput_REF, long>) [0x00000] in <066d3dbd907c47bba08a73d35df4199f>:0
at System.Threading.Tasks.Dataflow.Internal.TargetCore1<TInput_REF>.ProcessMessagesLoopCore () [0x00104] in <066d3dbd907c47bba08a73d35df4199f>:0 at System.Threading.Tasks.Dataflow.Internal.TargetCore1<TInput_REF>.<ProcessAsyncIfNecessary_Slow>b__3 (object) [0x00000] in <066d3dbd907c47bba08a73d35df4199f>:0
at System.Threading.Tasks.Task.InnerInvoke () [0x00025] in <4fdc5ed61a074cafb49fa42deb20d521>:0
at System.Threading.Tasks.Task.Execute () [0x00010] in <4fdc5ed61a074cafb49fa42deb20d521>:0
at System.Threading.Tasks.Task.ExecutionContextCallback (object) [0x00000] in <4fdc5ed61a074cafb49fa42deb20d521>:0
at System.Threading.ExecutionContext.RunInternal (System.Threading.ExecutionContext,System.Threading.ContextCallback,object,bool) [0x00071] in <4fdc5ed61a074cafb49fa42deb20d521>:0
at System.Threading.ExecutionContext.Run (System.Threading.ExecutionContext,System.Threading.ContextCallback,object,bool) [0x00000] in <4fdc5ed61a074cafb49fa42deb20d521>:0
at System.Threading.Tasks.Task.ExecuteWithThreadLocal (System.Threading.Tasks.Task&) [0x00050] in <4fdc5ed61a074cafb49fa42deb20d521>:0
at System.Threading.Tasks.Task.ExecuteEntry (bool) [0x00058] in <4fdc5ed61a074cafb49fa42deb20d521>:0
at System.Threading.Tasks.Task.System.Threading.IThreadPoolWorkItem.ExecuteWorkItem () [0x00000] in <4fdc5ed61a074cafb49fa42deb20d521>:0
at System.Threading.ThreadPoolWorkQueue.Dispatch () [0x00074] in <4fdc5ed61a074cafb49fa42deb20d521>:0
at System.Threading._ThreadPoolWaitCallback.PerformWaitCallback () [0x00000] in <4fdc5ed61a074cafb49fa42deb20d521>:0
at (wrapper runtime-invoke) .runtime_invoke_bool (object,intptr,intptr,intptr) [0x0001e] in <4fdc5ed61a074cafb49fa42deb20d521>:0

Native stacktrace:

0   mono                                0x00000001020903d1 mono_handle_native_crash + 257
1   mono                                0x00000001020f7e86 altstack_handle_and_restore + 70
2   mono                                0x000000010204ef87 mono_local_cprop + 423
3   mono                                0x0000000101fe0257 mini_method_compile + 4375
4   mono                                0x0000000101fe3395 mono_jit_compile_method_inner + 773
5   mono                                0x0000000101fe6903 mono_jit_compile_method_with_opt + 1379
6   mono                                0x0000000102092871 common_call_trampoline + 1217
7   mono                                0x0000000102092379 mono_magic_trampoline + 73
8   ???                                 0x000000010249d39e 0x0 + 4333360030
9   ???                                 0x0000000105fd82db 0x0 + 4395467483
10  ???                                 0x0000000105fd70c2 0x0 + 4395462850
11  ???                                 0x0000000105fd3f83 0x0 + 4395450243
12  ???                                 0x0000000105f835db 0x0 + 4395120091
13  ???                                 0x0000000105f832ab 0x0 + 4395119275
14  ???                                 0x0000000105f5ad5b 0x0 + 4394954075
15  ???                                 0x0000000105f59443 0x0 + 4394947651
16  ???                                 0x0000000105f589e3 0x0 + 4394944995
17  ???                                 0x0000000105f5856b 0x0 + 4394943851
18  ???                                 0x0000000105f57e13 0x0 + 4394941971
19  ???                                 0x0000000105f57a33 0x0 + 4394940979
20  ???                                 0x0000000105f57862 0x0 + 4394940514
21  ???                                 0x0000000105f5770b 0x0 + 4394940171
22  ???                                 0x0000000105f574cb 0x0 + 4394939595
23  ???                                 0x0000000105f5660b 0x0 + 4394935819
24  mscorlib.dll.dylib                  0x0000000103b86126 System_Threading_Tasks_Task_ExecutionContextCallback_object + 70
25  mscorlib.dll.dylib                  0x0000000103b5d8a1 System_Threading_ExecutionContext_Run_System_Threading_ExecutionContext_System_Threading_ContextCallback_object_bool + 33
26  mscorlib.dll.dylib                  0x0000000103b85ee7 System_Threading_Tasks_Task_ExecuteEntry_bool + 231
27  mscorlib.dll.dylib                  0x0000000103b64979 System_Threading__ThreadPoolWaitCallback_PerformWaitCallback + 9
28  mono                                0x0000000101fea5f4 mono_jit_runtime_invoke + 1316
29  mono                                0x00000001021e2238 do_runtime_invoke + 88
30  mono                                0x00000001021b0956 worker_callback + 966
31  mono                                0x00000001021b302c worker_thread + 348
32  mono                                0x00000001021ae2f3 start_wrapper + 675
33  libsystem_pthread.dylib             0x00007fff6270d6c1 _pthread_body + 340
34  libsystem_pthread.dylib             0x00007fff6270d56d _pthread_body + 0
35  libsystem_pthread.dylib             0x00007fff6270cc5d thread_start + 13

Debug info from gdb:

(lldb) command source -s 0 '/tmp/mono-gdb-commands.7gehF2'
Executing commands in '/tmp/mono-gdb-commands.7gehF2'.
(lldb) process attach --pid 5590
warning: (x86_64) /Library/Frameworks/Mono.framework/Versions/5.4.1/lib/mono/4.5/mscorlib.dll.dylib empty dSYM file detected, dSYM was created with an executable with no debug info.
Process 5590 stopped

  • thread Please pull 250e8b93bfbfdd24d78413aac2478c8f2c39d3c1 #1, name = 'tid_307', queue = 'com.apple.main-thread', stop reason = signal SIGSTOP
    frame #0: 0x00007fff625d2e7e libsystem_kernel.dylib__psynch_cvwait + 10 libsystem_kernel.dylib__psynch_cvwait:
    -> 0x7fff625d2e7e <+10>: jae 0x7fff625d2e88 ; <+20>
    0x7fff625d2e80 <+12>: movq %rax, %rdi
    0x7fff625d2e83 <+15>: jmp 0x7fff625ca76c ; cerror_nocancel
    0x7fff625d2e88 <+20>: retq
    Target 0: (mono) stopped.

Executable module set to "/Library/Frameworks/Mono.framework/Versions/5.4.1/bin/mono".
Architecture set to: x86_64h-apple-macosx.
(lldb) thread list
Process 5590 stopped

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

Abort trap: 6


Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions