Skip to content
This repository was archived by the owner on Jan 23, 2023. It is now read-only.

Conversation

@am11
Copy link
Member

@am11 am11 commented Jan 10, 2019

Defined and used DllExport macro instead of PUB (aligned with the name used in CoreFX).

While testing in different operating systems, I found that it is possible to have just py executable available in PATH via default installation without python, so I have added it in probing paths inside cmake and sh files as well.

Closes #2484

@am11 am11 changed the title Set visibility option to hidden WIP: Set visibility option to hidden Jan 13, 2019
@am11
Copy link
Member Author

am11 commented Jan 13, 2019

@jkotas, I have gotten to the point where PAL tests are passing, but managed assemblies are failing in binder during the load. Here is a sample trace from lldb:

Setup

cd coreclr

./build.sh x64 checked
./build-test.sh x64 checked
./build-test.sh x64 checked generatelayoutonly

bash bin/tests/Linux.x64.Checked/JIT/CheckProjects/CheckProjects/CheckProjects.sh \
    -coreroot=`pwd`/bin/Product/Linux.x64.Checked -debug=`command -v lldb`

# inside lldb REPL
(lldb) break set -E C++
(lldb) r
(lldb) bt

Trace

* thread #1, name = 'corerun', stop reason = breakpoint 1.1
  * frame #0: 0x00007ffff76bbc30 libstdc++.so.6`__cxa_throw
    frame #1: 0x00007ffff618d3f5 libcoreclr.so`EEFileLoadException::Throw(path=u"System.Runtime, Version=4.2.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a", hr=-2147024894, pInnerException=<unavailable>) at clrex.cpp:2005
    frame #2: 0x00007ffff636b709 libcoreclr.so`AssemblySpec::Bind(AppDomain*, int, CoreBindResult*, int, int) [inlined] ThrowLoadError(pSpec=0x00007fffffffcba0) at coreassemblyspec.cpp:100
    frame #3: 0x00007ffff636b6c0 libcoreclr.so`AssemblySpec::Bind(this=0x00007fffffffcba0, pAppDomain=<unavailable>, fThrowOnFileNotFound=YES, pResult=0x00007fffffffc6e0, fNgenExplicitBind=NO, fExplicitBindToNativeImage=NO) at coreassemblyspec.cpp:195
    frame #4: 0x00007ffff63070e9 libcoreclr.so`AppDomain::BindAssemblySpec(this=0x0000000000658900, pSpec=0x00007fffffffcba0, fThrowOnFileNotFound=YES, fUseHostBinderIfAvailable=<unavailable>) at appdomain.cpp:6177
    frame #5: 0x00007ffff60f71dc libcoreclr.so`PEFile::LoadAssembly(this=0x00000000006a2480, kAssemblyRef=587202561, pImport=0x00000000006b7c40, szWinRtTypeNamespace=0x0000000000000000, szWinRtTypeClassName=0x0000000000000000) at pefile.cpp:1592
    frame #6: 0x00007ffff632fbb1 libcoreclr.so`Module::LoadAssembly(this=<unavailable>, pDomain=0x0000000000658900, kAssemblyRef=587202561, szWinRtTypeNamespace=0x0000000000000000, szWinRtTypeClassName=0x0000000000000000) at ceeload.cpp:5318
    frame #7: 0x00007ffff6316f4f libcoreclr.so`Assembly::FindModuleByTypeRef(pModule=<unavailable>, tkType=<unavailable>, loadFlag=Load, pfNoResolutionScope=NO) at assembly.cpp:1149
    frame #8: 0x00007ffff634c915 libcoreclr.so`ClassLoader::LoadTypeDefOrRefThrowing(pModule=0x00007fff7d7d60e8, typeDefOrRef=16777221, fNotFoundAction=ThrowIfNotFound, fUninstantiated=FailIfUninstDefOrRef, tokenNotToLoad=0, level=CLASS_LOAD_APPROXPARENTS) at clsload.cpp:2778
    frame #9: 0x00007ffff634d148 libcoreclr.so`ClassLoader::LoadApproxTypeThrowing(pModule=0x00007fff7d7d60e8, tok=<unavailable>, pSigInst=0x00007fffffffd220, pClassTypeContext=<unavailable>) at clsload.cpp:3183
    frame #10: 0x00007ffff634d5b2 libcoreclr.so`ClassLoader::LoadApproxParentThrowing(pModule=0x00007fff7d7d60e8, cl=33554434, pParentInst=0x00007fffffffd220, pClassTypeContext=0x00007fffffffd1d0) at clsload.cpp:3237
    frame #11: 0x00007ffff622a086 libcoreclr.so`ClassLoader::CreateTypeHandleForTypeDefThrowing(pModule=<unavailable>, cl=<unavailable>, inst=Instantiation @ 0x00007fffffffd480, pamTracker=0x00007fffffffd500) at methodtablebuilder.cpp:11931
    frame #12: 0x00007ffff634df65 libcoreclr.so`ClassLoader::CreateTypeHandleForTypeKey(pKey=0x00007fffffffd840, pamTracker=0x00007fffffffd500) at clsload.cpp:3364
    frame #13: 0x00007ffff634d89b libcoreclr.so`ClassLoader::DoIncrementalLoad(pTypeKey=0x00007fffffffd840, typeHnd=TypeHandle @ 0x00007fffffffd4f8, currentLevel=<unavailable>) at clsload.cpp:3292
    frame #14: 0x00007ffff634f32f libcoreclr.so`ClassLoader::LoadTypeHandleForTypeKey_Body(this=0x00000000006a4f80, pTypeKey=0x00007fffffffd840, typeHnd=<unavailable>, targetLevel=<unavailable>) at clsload.cpp:4074
    frame #15: 0x00007ffff6349b18 libcoreclr.so`ClassLoader::LoadTypeHandleForTypeKey(this=0x00000000006a4f80, pTypeKey=0x00007fffffffd840, typeHnd=<unavailable>, targetLevel=CLASS_LOADED, pInstContext=0x0000000000000000) at clsload.cpp:3793
    frame #16: 0x00007ffff634b79b libcoreclr.so`ClassLoader::LoadTypeDefThrowing(pModule=<unavailable>, typeDef=33554434, fNotFoundAction=ThrowIfNotFound, fUninstantiated=FailIfUninstDefOrRef, tokenNotToLoad=<unavailable>, level=CLASS_LOADED, pTargetInstantiation=0x0000000000000000) at clsload.cpp:2662
    frame #17: 0x00007ffff634ca80 libcoreclr.so`ClassLoader::LoadTypeDefOrRefThrowing(pModule=0x00007fff7d7d60e8, typeDefOrRef=33554434, fNotFoundAction=ThrowIfNotFound, fUninstantiated=FailIfUninstDefOrRef, tokenNotToLoad=0, level=CLASS_LOADED) at clsload.cpp:2840
    frame #18: 0x00007ffff631960e libcoreclr.so`Assembly::GetEntryPoint(this=0x000000000062e050) at assembly.cpp:1811
    frame #19: 0x00007ffff6319067 libcoreclr.so`Assembly::ExecuteMainMethod(this=0x000000000062e050, stringArgs=0x00007fffffffdf58, waitForOtherThreads=YES) at assembly.cpp:1689
    frame #20: 0x00007ffff6050837 libcoreclr.so`CorHost2::ExecuteAssembly(this=<unavailable>, dwAppDomainId=<unavailable>, pwzAssemblyPath=<unavailable>, argc=<unavailable>, argv=0x0000000000000000, pReturnValue=0x00007fffffffe10c) at corhost.cpp:478
    frame #21: 0x00007ffff6018017 libcoreclr.so`::coreclr_execute_assembly(hostHandle=<unavailable>, domainId=<unavailable>, argc=<unavailable>, argv=<unavailable>, managedAssemblyPath=<unavailable>, exitCode=<unavailable>) at unixinterface.cpp:412
    frame #22: 0x0000000000402cb3 corerun`ExecuteManagedAssembly(currentExeAbsolutePath="/home/vagrant/coreclr/bin/Product/Linux.x64.Checked/corerun", clrFilesAbsolutePath=<unavailable>, managedAssemblyAbsolutePath="/home/vagrant/coreclr/bin/tests/Linux.x64.Checked/JIT/CheckProjects/CheckProjects/CheckProjects.exe", managedAssemblyArgc=0, managedAssemblyArgv=0x0000000000000000) at coreruncommon.cpp:429
    frame #23: 0x0000000000401bde corerun`corerun(argc=<unavailable>, argv=<unavailable>) at corerun.cpp:149
    frame #24: 0x00007ffff6ca3b97 libc.so.6`__libc_start_main(main=(corerun`main at corerun.cpp:161), argc=2, argv=0x00007fffffffe458, init=<unavailable>, fini=<unavailable>, rtld_fini=<unavailable>, stack_end=0x00007fffffffe448) at libc-start.c:310
    frame #25: 0x000000000040180a corerun`_start + 42

The innerException is empty at this point.

Is there any interesting value I could check, or some place where a breakpoint can be set to spot name of the symbol it is looking for?

@jkotas
Copy link
Member

jkotas commented Jan 14, 2019

Is there any interesting value I could check, or some place where a breakpoint can be set to spot name of the symbol it is looking for?

I do not know how this change can possibly lead to exception like this. Looks like some non-trivial interaction with the compiler.

Copy link
Member

@jkotas jkotas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Left a few comments

@jkotas
Copy link
Member

jkotas commented Jan 14, 2019

cc @janvorli @fiigii

@janvorli
Copy link
Member

I can see test runs failing with the following assert with this change:

Assert failure(PID 38645 [0x000096f5], Thread: 38645 [0x96f5]): !"Recursion in CLRException::GetThrowable"
10:48:28       File: /mnt/j/workspace/dotnet_coreclr/master/x64_checked_ubuntu_innerloop_prtest/src/vm/clrex.cpp Line: 149
10:48:28       Image: /mnt/j/workspace/dotnet_coreclr/master/x64_checked_ubuntu_innerloop_tst_prtest/bin/tests/Linux.x64.Checked/Tests/Core_Root/corerun

@am11
Copy link
Member Author

am11 commented Jan 19, 2019

The first exception in Recursion in CLRException comes from binder and leads to a similar-looking stacktrace as: #21924 (comment).

SOS' dumpstack command gives more granular callstack:

# entered lldb with:
# bash bin/tests/Linux.x64.Checked/JIT/CheckProjects/CheckProjects/CheckProjects.sh \
#    -coreroot=`pwd`/bin/Product/Linux.x64.Checked -debug=`command -v lldb`

break set -E C++
plugin load ~/coreclr/bin/Product/Linux.x64.Checked/libsosplugin.so
run
# will break on first C++ exception
dumpstack
dumpstack output
OS Thread Id: 0x3019 (1)
TEB information is not available so a stack size of 0xFFFF is assumed
Current frame: libstdc++.so.6!__cxa_throw
Child-SP         RetAddr          Caller, Callee
00007FFFFFFFB950 00007ffff618c455 libcoreclr.so!EEFileLoadException::Throw(char16_t const*, int, Exception*) + 0x185 [/home/vagrant/coreclr/src/inc/sbuffer.inl:185], calling libcoreclr.so!__cxa_throw
00007FFFFFFFBA70 00007ffff636ccfd libcoreclr.so!BINDER_SPACE::AssemblyIdentity::~AssemblyIdentity() + 0x6d [/home/vagrant/coreclr/src/binder/inc/assemblyidentity.hpp:59], calling libcoreclr.so!SBuffer::DeleteBuffer(unsigned char*, unsigned int) [/home/vagrant/coreclr/src/inc/sbuffer.inl:1012]
00007FFFFFFFBA90 00007ffff636aefe libcoreclr.so!BaseAssemblySpec::GetFileOrDisplayName(unsigned int, SString&) const + 0x33e [/home/vagrant/coreclr/src/vm/coreassemblyspec.cpp:0], calling libcoreclr.so!BINDER_SPACE::AssemblyIdentity::~AssemblyIdentity() [/home/vagrant/coreclr/src/vm/../binder/inc/assemblyidentity.hpp:57]
00007FFFFFFFBAA0 00007ffff6055104 libcoreclr.so!CExecutionEngine::GetTlsData() + 0x14 [/home/vagrant/coreclr/src/vm/corhost.cpp:2738], calling libcoreclr.so!__tls_get_addr
00007FFFFFFFBBC0 00007ffff636a769 libcoreclr.so!AssemblySpec::Bind(AppDomain*, int, CoreBindResult*, int, int) + 0x969 [/home/vagrant/coreclr/src/vm/coreassemblyspec.cpp:0], calling libcoreclr.so!EEFileLoadException::Throw(char16_t const*, int, Exception*) [/home/vagrant/coreclr/src/vm/clrex.cpp:1991]
00007FFFFFFFBC50 00007ffff667db35 libcoreclr.so!GetCurrentThreadId + 0x75 [/home/vagrant/coreclr/src/pal/src/thread/thread.cpp:396], calling libcoreclr.so!syscall
00007FFFFFFFBCB0 00007ffff61e3791 libcoreclr.so!EEVirtualAlloc(void*, unsigned long, unsigned int, unsigned int) + 0x1b1 [/home/vagrant/coreclr/src/vm/hosting.cpp:264], calling libcoreclr.so!GlobalAllocStore::AddAlloc(void*) [/home/vagrant/coreclr/src/vm/hosting.cpp:67]
00007FFFFFFFBCC0 00007ffff6055104 libcoreclr.so!CExecutionEngine::GetTlsData() + 0x14 [/home/vagrant/coreclr/src/vm/corhost.cpp:2738], calling libcoreclr.so!__tls_get_addr
00007FFFFFFFBD00 00007ffff638ca54 libcoreclr.so!PrettyPrintSignature(unsigned char const*, unsigned int, char const*, CQuickBytes*, IMDInternalImport*, char const*, int) + 0x1044 [/home/vagrant/coreclr/src/inc/corhlprpriv.h:206], calling libcoreclr.so!void* CQuickMemoryBase<512ul, 128ul>::_Alloc<1, 1>(unsigned long) [/home/vagrant/coreclr/src/inc/corhlprpriv.h:84]
00007FFFFFFFBDD0 00007ffff665061d libcoreclr.so!LeaveCriticalSection + 0x8d [/home/vagrant/coreclr/src/pal/src/sync/cs.cpp:331], calling libcoreclr.so!CorUnix::InternalLeaveCriticalSection(CorUnix::CPalThread*, _CRITICAL_SECTION*) [/home/vagrant/coreclr/src/pal/src/sync/cs.cpp:854]
00007FFFFFFFBDE0 00007ffff6650e55 libcoreclr.so!ObtainCurrentThreadIdImpl(CorUnix::CPalThread*, char const*) + 0x25 [/home/vagrant/coreclr/src/pal/src/sync/cs.cpp:184], calling libcoreclr.so!syscall
00007FFFFFFFBE10 00007ffff6650777 libcoreclr.so!CorUnix::InternalLeaveCriticalSection(CorUnix::CPalThread*, _CRITICAL_SECTION*) + 0xf7 [/home/vagrant/coreclr/src/pal/src/sync/cs.cpp:865], calling libcoreclr.so!ObtainCurrentThreadIdImpl(CorUnix::CPalThread*, char const*) [/home/vagrant/coreclr/src/pal/src/sync/cs.cpp:179]
00007FFFFFFFBE20 00007ffff667db35 libcoreclr.so!GetCurrentThreadId + 0x75 [/home/vagrant/coreclr/src/pal/src/thread/thread.cpp:396], calling libcoreclr.so!syscall
00007FFFFFFFBE60 00007ffff665061d libcoreclr.so!LeaveCriticalSection + 0x8d [/home/vagrant/coreclr/src/pal/src/sync/cs.cpp:331], calling libcoreclr.so!CorUnix::InternalLeaveCriticalSection(CorUnix::CPalThread*, _CRITICAL_SECTION*) [/home/vagrant/coreclr/src/pal/src/sync/cs.cpp:854]
00007FFFFFFFBE70 00007ffff6055104 libcoreclr.so!CExecutionEngine::GetTlsData() + 0x14 [/home/vagrant/coreclr/src/vm/corhost.cpp:2738], calling libcoreclr.so!__tls_get_addr
00007FFFFFFFBE80 00007ffff6058ba0 libcoreclr.so!CrstBase::Leave() + 0x80 [/home/vagrant/coreclr/src/inc/clrhost.h:97]
00007FFFFFFFBE90 00007ffff6055104 libcoreclr.so!CExecutionEngine::GetTlsData() + 0x14 [/home/vagrant/coreclr/src/vm/corhost.cpp:2738], calling libcoreclr.so!__tls_get_addr
00007FFFFFFFBEC0 00007ffff6055104 libcoreclr.so!CExecutionEngine::GetTlsData() + 0x14 [/home/vagrant/coreclr/src/vm/corhost.cpp:2738], calling libcoreclr.so!__tls_get_addr
00007FFFFFFFBEE0 00007ffff6055104 libcoreclr.so!CExecutionEngine::GetTlsData() + 0x14 [/home/vagrant/coreclr/src/vm/corhost.cpp:2738], calling libcoreclr.so!__tls_get_addr
00007FFFFFFFBF20 00007ffff601b8d9 libcoreclr.so!SBuffer::DebugMoveBuffer(unsigned char*, unsigned char*, unsigned int) + 0x189 [/home/vagrant/coreclr/src/inc/sbuffer.inl:0], calling libcoreclr.so!memset
00007FFFFFFFBF50 00007ffff6055104 libcoreclr.so!CExecutionEngine::GetTlsData() + 0x14 [/home/vagrant/coreclr/src/vm/corhost.cpp:2738], calling libcoreclr.so!__tls_get_addr
00007FFFFFFFBF90 00007ffff601b44a libcoreclr.so!SBuffer::Replace(SBuffer::Iterator const&, unsigned int, unsigned int) + 0x1ba [/home/vagrant/coreclr/src/inc/sbuffer.inl:1474], calling libcoreclr.so!CHECK::EnterAssert() [/home/vagrant/coreclr/src/inc/check.inl:46]
00007FFFFFFFBFE0 00007ffff6055104 libcoreclr.so!CExecutionEngine::GetTlsData() + 0x14 [/home/vagrant/coreclr/src/vm/corhost.cpp:2738], calling libcoreclr.so!__tls_get_addr
00007FFFFFFFC020 00007ffff6022ff0 libcoreclr.so!SString::Replace(SString::Iterator const&, unsigned int, SString const&) + 0x130 [/home/vagrant/coreclr/src/inc/sbuffer.inl:185], calling libcoreclr.so!memmove
00007FFFFFFFC0D0 00007ffff6021ecd libcoreclr.so!SString::ConvertToUnicode() const + 0x18d [/home/vagrant/coreclr/src/utilcode/sstring.cpp:0], calling libcoreclr.so!SString::ConvertASCIIToUnicode(SString&) const [/home/vagrant/coreclr/src/utilcode/sstring.cpp:719]
00007FFFFFFFC0E0 00007ffff60174f1 libcoreclr.so!operator delete(void*) + 0x21 [/home/vagrant/coreclr/src/utilcode/clrhost_nodependencies.cpp:497], calling libcoreclr.so!SetLastError [/home/vagrant/coreclr/src/pal/src/misc/error.cpp:126]
00007FFFFFFFC100 00007ffff667db35 libcoreclr.so!GetCurrentThreadId + 0x75 [/home/vagrant/coreclr/src/pal/src/thread/thread.cpp:396], calling libcoreclr.so!syscall
00007FFFFFFFC120 00007ffff6031a31 libcoreclr.so!ThreadStressLog::LogMsg(unsigned int, int, char const*, __va_list_tag*) + 0x201 [/home/vagrant/coreclr/src/utilcode/stresslog.cpp:581], calling libcoreclr.so!GetCurrentThreadId [/home/vagrant/coreclr/src/pal/src/thread/thread.cpp:384]
00007FFFFFFFC180 00007ffff6031bbe libcoreclr.so!StressLog::LogMsg(unsigned int, unsigned int, int, char const*, ...) + 0x10e [/home/vagrant/coreclr/src/utilcode/stresslog.cpp:0], calling libcoreclr.so!ThreadStressLog::LogMsg(unsigned int, int, char const*, __va_list_tag*) [/home/vagrant/coreclr/src/utilcode/stresslog.cpp:534]
00007FFFFFFFC1D0 00007ffff6055104 libcoreclr.so!CExecutionEngine::GetTlsData() + 0x14 [/home/vagrant/coreclr/src/vm/corhost.cpp:2738], calling libcoreclr.so!__tls_get_addr
00007FFFFFFFC210 00007ffff601616e libcoreclr.so!SBuffer::UseBuffer(unsigned char*, unsigned int*) + 0xbe [/home/vagrant/coreclr/src/inc/sbuffer.inl:1003], calling libcoreclr.so!CHECK::EnterAssert() [/home/vagrant/coreclr/src/inc/check.inl:46]
00007FFFFFFFC230 00007ffff6055104 libcoreclr.so!CExecutionEngine::GetTlsData() + 0x14 [/home/vagrant/coreclr/src/vm/corhost.cpp:2738], calling libcoreclr.so!__tls_get_addr
00007FFFFFFFC3C0 00007ffff665061d libcoreclr.so!LeaveCriticalSection + 0x8d [/home/vagrant/coreclr/src/pal/src/sync/cs.cpp:331], calling libcoreclr.so!CorUnix::InternalLeaveCriticalSection(CorUnix::CPalThread*, _CRITICAL_SECTION*) [/home/vagrant/coreclr/src/pal/src/sync/cs.cpp:854]
00007FFFFFFFC3D0 00007ffff6055104 libcoreclr.so!CExecutionEngine::GetTlsData() + 0x14 [/home/vagrant/coreclr/src/vm/corhost.cpp:2738], calling libcoreclr.so!__tls_get_addr
00007FFFFFFFC3E0 00007ffff6058ba0 libcoreclr.so!CrstBase::Leave() + 0x80 [/home/vagrant/coreclr/src/inc/clrhost.h:97]
00007FFFFFFFC3F0 00007ffff65a673e libcoreclr.so!UnlockedLoaderHeap::UnlockedAllocMem_NoThrow(unsigned long, char const*, int) + 0x21e [/home/vagrant/coreclr/src/utilcode/loaderheap.cpp:1401], calling libcoreclr.so!FireEtXplatAllocRequest [/home/vagrant/coreclr/bin/obj/Linux.x64.Checked/eventing/eventprovider/lttng/eventprovdotnetruntimeprivate.cpp:3551]
00007FFFFFFFC430 00007ffff6057951 libcoreclr.so!void GCHolderBase::PopInternal<0>() + 0x1f1 [/home/vagrant/coreclr/src/vm/threads.h:2191], calling libcoreclr.so!__tls_get_addr
00007FFFFFFFC460 00007ffff6087ff9 libcoreclr.so!GCCoopHackNoThread::~GCCoopHackNoThread() + 0x9 [/home/vagrant/coreclr/src/vm/threads.h:6018], calling libcoreclr.so!void GCHolderBase::PopInternal<0>() [/home/vagrant/coreclr/src/vm/threads.h:5702]
00007FFFFFFFC470 00007ffff6086c2b libcoreclr.so!HashMap::LookupValue(unsigned long, unsigned long) + 0x3eb [/home/vagrant/coreclr/src/vm/hash.cpp:610], calling libcoreclr.so!GCCoopHackNoThread::~GCCoopHackNoThread() [/home/vagrant/coreclr/src/vm/threads.h:6015]
00007FFFFFFFC500 00007ffff617b0c0 libcoreclr.so!AssemblySpecBindingCache::LookupInternal(AssemblySpec*, int) + 0x110 [/home/vagrant/coreclr/src/vm/hash.h:598], calling libcoreclr.so!HashMap::LookupValue(unsigned long, unsigned long) [/home/vagrant/coreclr/src/vm/hash.cpp:533]
00007FFFFFFFC560 00007ffff6306139 libcoreclr.so!AppDomain::BindAssemblySpec(AssemblySpec*, int, int) + 0x219 [/home/vagrant/coreclr/src/inc/holder.h:654], calling libcoreclr.so!AssemblySpec::Bind(AppDomain*, int, CoreBindResult*, int, int) [/home/vagrant/coreclr/src/vm/coreassemblyspec.cpp:111]
00007FFFFFFFC600 00007ffff6049695 libcoreclr.so!EEJitManager::FindMethodCode(RangeSection*, unsigned long) + 0xc5 [/home/vagrant/coreclr/src/vm/codeman.cpp:3788], calling libcoreclr.so!CHECK::EnterAssert() [/home/vagrant/coreclr/src/inc/check.inl:46]
00007FFFFFFFC640 00007ffff6055104 libcoreclr.so!CExecutionEngine::GetTlsData() + 0x14 [/home/vagrant/coreclr/src/vm/corhost.cpp:2738], calling libcoreclr.so!__tls_get_addr
00007FFFFFFFC660 00007ffff6055104 libcoreclr.so!CExecutionEngine::GetTlsData() + 0x14 [/home/vagrant/coreclr/src/vm/corhost.cpp:2738], calling libcoreclr.so!__tls_get_addr
00007FFFFFFFC710 00007ffff6650e55 libcoreclr.so!ObtainCurrentThreadIdImpl(CorUnix::CPalThread*, char const*) + 0x25 [/home/vagrant/coreclr/src/pal/src/sync/cs.cpp:184], calling libcoreclr.so!syscall
00007FFFFFFFC740 00007ffff6650e55 libcoreclr.so!ObtainCurrentThreadIdImpl(CorUnix::CPalThread*, char const*) + 0x25 [/home/vagrant/coreclr/src/pal/src/sync/cs.cpp:184], calling libcoreclr.so!syscall
00007FFFFFFFC770 00007ffff6650777 libcoreclr.so!CorUnix::InternalLeaveCriticalSection(CorUnix::CPalThread*, _CRITICAL_SECTION*) + 0xf7 [/home/vagrant/coreclr/src/pal/src/sync/cs.cpp:865], calling libcoreclr.so!ObtainCurrentThreadIdImpl(CorUnix::CPalThread*, char const*) [/home/vagrant/coreclr/src/pal/src/sync/cs.cpp:179]
00007FFFFFFFC790 00007ffff6650e55 libcoreclr.so!ObtainCurrentThreadIdImpl(CorUnix::CPalThread*, char const*) + 0x25 [/home/vagrant/coreclr/src/pal/src/sync/cs.cpp:184], calling libcoreclr.so!syscall
00007FFFFFFFC7C0 00007ffff6650777 libcoreclr.so!CorUnix::InternalLeaveCriticalSection(CorUnix::CPalThread*, _CRITICAL_SECTION*) + 0xf7 [/home/vagrant/coreclr/src/pal/src/sync/cs.cpp:865], calling libcoreclr.so!ObtainCurrentThreadIdImpl(CorUnix::CPalThread*, char const*) [/home/vagrant/coreclr/src/pal/src/sync/cs.cpp:179]
00007FFFFFFFC7F0 00007ffff662374d libcoreclr.so!SetLastError + 0xd [/home/vagrant/coreclr/src/pal/src/include/pal/thread.hpp:486], calling libcoreclr.so!__errno_location
00007FFFFFFFC800 00007ffff6055104 libcoreclr.so!CExecutionEngine::GetTlsData() + 0x14 [/home/vagrant/coreclr/src/vm/corhost.cpp:2738], calling libcoreclr.so!__tls_get_addr
00007FFFFFFFC840 00007ffff602a311 libcoreclr.so!SBuffer::CloseRawBuffer(unsigned int) + 0xc1 [/home/vagrant/coreclr/src/inc/sbuffer.inl:1147], calling libcoreclr.so!CHECK::EnterAssert() [/home/vagrant/coreclr/src/inc/check.inl:46]
00007FFFFFFFC870 00007ffff601616e libcoreclr.so!SBuffer::UseBuffer(unsigned char*, unsigned int*) + 0xbe [/home/vagrant/coreclr/src/inc/sbuffer.inl:1003], calling libcoreclr.so!CHECK::EnterAssert() [/home/vagrant/coreclr/src/inc/check.inl:46]
00007FFFFFFFC8A0 00007ffff662374d libcoreclr.so!SetLastError + 0xd [/home/vagrant/coreclr/src/pal/src/include/pal/thread.hpp:486], calling libcoreclr.so!__errno_location
00007FFFFFFFC8C0 00007ffff603abab libcoreclr.so!GetEnvironmentVariableWrapper(char16_t const*, SString&) + 0x18b [/home/vagrant/coreclr/src/utilcode/longfilepathwrappers.cpp:1015], calling libcoreclr.so!SetLastError [/home/vagrant/coreclr/src/pal/src/misc/error.cpp:126]
00007FFFFFFFC900 00007ffff6015fda libcoreclr.so!SString::SString(void*, unsigned int) + 0xda [/home/vagrant/coreclr/src/inc/sbuffer.inl:1474], calling libcoreclr.so!CHECK::EnterAssert() [/home/vagrant/coreclr/src/inc/check.inl:46]
00007FFFFFFFC950 00007ffff6020396 libcoreclr.so!REGUTIL::EnvGetString(char16_t const*, int) + 0x366 [/home/vagrant/coreclr/src/inc/holder.h:654], calling libcoreclr.so!CAutoTryCleanup<Exception::HandlerState>::~CAutoTryCleanup() [/home/vagrant/coreclr/src/inc/ex.h:633]
00007FFFFFFFC9B0 00007ffff6650e55 libcoreclr.so!ObtainCurrentThreadIdImpl(CorUnix::CPalThread*, char const*) + 0x25 [/home/vagrant/coreclr/src/pal/src/sync/cs.cpp:184], calling libcoreclr.so!syscall
00007FFFFFFFC9C0 00007ffff65a3eda libcoreclr.so!StgPoolReadOnly::GetDataReadOnly(unsigned int, MetaData::DataBlob*) + 0x1a [/home/vagrant/coreclr/src/inc/stgpool.h:337]
00007FFFFFFFC9E0 00007ffff6055104 libcoreclr.so!CExecutionEngine::GetTlsData() + 0x14 [/home/vagrant/coreclr/src/vm/corhost.cpp:2738], calling libcoreclr.so!__tls_get_addr
00007FFFFFFFCA20 00007ffff653aa32 libcoreclr.so!MDInternalRO::GetAssemblyRefProps(unsigned int, void const**, unsigned int*, char const**, AssemblyMetaDataInternal*, void const**, unsigned int*, unsigned int*) + 0x372 [/home/vagrant/coreclr/src/inc/stgpool.h:225], calling libcoreclr.so!CHECK::EnterAssert() [/home/vagrant/coreclr/src/inc/check.inl:46]
00007FFFFFFFCA80 00007ffff6188183 libcoreclr.so!CLRException::HandlerState::CleanupTry() + 0xa3 [/home/vagrant/coreclr/src/vm/threads.h:2191], calling libcoreclr.so!__tls_get_addr
00007FFFFFFFCAB0 00007ffff604e1cc libcoreclr.so!CAutoTryCleanup<CLRException::HandlerState>::~CAutoTryCleanup() + 0xc [/home/vagrant/coreclr/src/inc/ex.h:633], calling libcoreclr.so!CLRException::HandlerState::CleanupTry() [/home/vagrant/coreclr/src/vm/clrex.cpp:901]
00007FFFFFFFCAC0 00007ffff6177e8b libcoreclr.so!AssemblySpec::InitializeSpecInternal(unsigned int, IMDInternalImport*, DomainAssembly*, int) + 0x21b [/home/vagrant/coreclr/src/vm/assemblyspec.cpp:236], calling libcoreclr.so!CAutoTryCleanup<CLRException::HandlerState>::~CAutoTryCleanup() [/home/vagrant/coreclr/src/inc/ex.h:622]
00007FFFFFFFCB00 00007ffff6302dbf libcoreclr.so!AppDomain::FindAssembly(PEAssembly*, AppDomain::FindAssemblyOptions) + 0x3f [/home/vagrant/coreclr/src/vm/appdomain.cpp:5384], calling libcoreclr.so!AppDomain::FindAssembly(ICLRPrivAssembly*) [/home/vagrant/coreclr/src/vm/appdomain.cpp:8686]
00007FFFFFFFCB80 00007ffff60f623c libcoreclr.so!PEFile::LoadAssembly(unsigned int, IMDInternalImport*, char const*, char const*) + 0x16c [/home/vagrant/coreclr/src/vm/pefile.cpp:1592]
00007FFFFFFFCC90 00007ffff632ec11 libcoreclr.so!Module::LoadAssembly(AppDomain*, unsigned int, char const*, char const*) + 0x1f1 [/home/vagrant/coreclr/src/inc/holder.h:132], calling libcoreclr.so!PEFile::LoadAssembly(unsigned int, IMDInternalImport*, char const*, char const*) [/home/vagrant/coreclr/src/vm/pefile.cpp:1564]
00007FFFFFFFCD60 00007ffff6324c78 libcoreclr.so!Module::GetPreferredZapModuleForTypeHandle(TypeHandle) + 0x28 [/home/vagrant/coreclr/src/vm/ceeload.cpp:1760], calling libcoreclr.so!Module::GetPreferredZapModuleForMethodTable(MethodTable*) [/home/vagrant/coreclr/src/vm/ceeload.cpp:1685]
00007FFFFFFFCDC0 00007ffff6534c45 libcoreclr.so!MDInternalRO::GetResolutionScopeOfTypeRef(unsigned int, unsigned int*) + 0x85 [/home/vagrant/coreclr/src/md/inc/metamodelro.h:133], calling libcoreclr.so!MetaData::TableRO::GetRecord(unsigned int, unsigned char**, unsigned int, unsigned int, MetaData::HotTablesDirectory*, unsigned int) [/home/vagrant/coreclr/src/md/inc/../tables/table.h:73]
00007FFFFFFFCE00 00007ffff6315f9f libcoreclr.so!Assembly::FindModuleByTypeRef(Module*, unsigned int, Loader::LoadFlag, int*) + 0x27f [/home/vagrant/coreclr/src/vm/assembly.cpp:1156], calling libcoreclr.so!Module::LoadAssembly(AppDomain*, unsigned int, char const*, char const*) [/home/vagrant/coreclr/src/vm/ceeload.cpp:5280]
00007FFFFFFFCE40 00007ffff632f555 libcoreclr.so!Module::LookupTypeRef(unsigned int) + 0x85 [/home/vagrant/coreclr/src/vm/typehandle.h:117], calling libcoreclr.so!TypeHandle::Verify() [/home/vagrant/coreclr/src/vm/typehandle.cpp:86]
00007FFFFFFFCE80 00007ffff634b380 libcoreclr.so!ClassLoader::LookupTypeDefOrRefInModule(Module*, unsigned int, ClassLoadLevel*) + 0xd0 [/home/vagrant/coreclr/src/vm/clsload.cpp:2240], calling libcoreclr.so!Module::LookupTypeRef(unsigned int) [/home/vagrant/coreclr/src/vm/ceeload.cpp:5537]
00007FFFFFFFCEC0 00007ffff634b975 libcoreclr.so!ClassLoader::LoadTypeDefOrRefThrowing(Module*, unsigned int, ClassLoader::NotFoundAction, ClassLoader::PermitUninstantiatedFlag, unsigned int, ClassLoadLevel) + 0x155 [/home/vagrant/coreclr/src/vm/clsload.cpp:2778], calling libcoreclr.so!Assembly::FindModuleByTypeRef(Module*, unsigned int, Loader::LoadFlag, int*) [/home/vagrant/coreclr/src/vm/assembly.cpp:983]
00007FFFFFFFCEF0 00007ffff653269b libcoreclr.so!MDInternalRO::EnumInit(unsigned int, unsigned int, HENUMInternal*) + 0x54b [/home/vagrant/coreclr/src/md/inc/metamodel.h:0], calling libcoreclr.so!CMiniMdBase::SearchTableForMultipleRows(unsigned int, CMiniColDef, unsigned int, unsigned int*, unsigned int*) [/home/vagrant/coreclr/src/md/runtime/metamodel.cpp:876]
00007FFFFFFFCF10 00007ffff65a7af3 libcoreclr.so!AllocMemTracker::Track(TaggedMemAllocPtr) + 0x53 [/home/vagrant/coreclr/src/utilcode/loaderheap.cpp:2196], calling libcoreclr.so!AllocMemTracker::Track_NoThrow(TaggedMemAllocPtr) [/home/vagrant/coreclr/src/utilcode/loaderheap.cpp:2204]
00007FFFFFFFCF90 00007ffff634c1a8 libcoreclr.so!ClassLoader::LoadApproxTypeThrowing(Module*, unsigned int, SigPointer*, SigTypeContext const*) + 0x198 [/home/vagrant/coreclr/src/vm/clsload.cpp:0], calling libcoreclr.so!ClassLoader::LoadTypeDefOrRefThrowing(Module*, unsigned int, ClassLoader::NotFoundAction, ClassLoader::PermitUninstantiatedFlag, unsigned int, ClassLoadLevel) [/home/vagrant/coreclr/src/vm/clsload.cpp:2705]
00007FFFFFFFCFE0 00007ffff6534ff4 libcoreclr.so!MDInternalRO::GetTypeDefProps(unsigned int, unsigned int*, unsigned int*) + 0x54 [/home/vagrant/coreclr/src/md/inc/metamodelro.h:133], calling libcoreclr.so!MetaData::TableRO::GetRecord(unsigned int, unsigned char**, unsigned int, unsigned int, MetaData::HotTablesDirectory*, unsigned int) [/home/vagrant/coreclr/src/md/inc/../tables/table.h:73]
00007FFFFFFFCFF0 00007ffff662374d libcoreclr.so!SetLastError + 0xd [/home/vagrant/coreclr/src/pal/src/include/pal/thread.hpp:486], calling libcoreclr.so!__errno_location
00007FFFFFFFD030 00007ffff634c612 libcoreclr.so!ClassLoader::LoadApproxParentThrowing(Module*, unsigned int, SigPointer*, SigTypeContext const*) + 0x82 [/home/vagrant/coreclr/src/vm/clsload.cpp:3237], calling libcoreclr.so!ClassLoader::LoadApproxTypeThrowing(Module*, unsigned int, SigPointer*, SigTypeContext const*) [/home/vagrant/coreclr/src/vm/clsload.cpp:3103]
00007FFFFFFFD0B0 00007ffff62290d6 libcoreclr.so!ClassLoader::CreateTypeHandleForTypeDefThrowing(Module*, unsigned int, Instantiation, AllocMemTracker*) + 0x266 [/home/vagrant/coreclr/src/vm/methodtablebuilder.cpp:11931], calling libcoreclr.so!ClassLoader::LoadApproxParentThrowing(Module*, unsigned int, SigPointer*, SigTypeContext const*) [/home/vagrant/coreclr/src/vm/clsload.cpp:3203]
00007FFFFFFFD0E0 00007ffff6229bcf libcoreclr.so!ClassLoader::CreateTypeHandleForTypeDefThrowing(Module*, unsigned int, Instantiation, AllocMemTracker*) + 0xd5f [/home/vagrant/coreclr/src/inc/holder.h:316], calling libcoreclr.so!StackingAllocator::Collapse(void*) [/home/vagrant/coreclr/src/vm/stackingallocator.cpp:267]
00007FFFFFFFD150 00007ffff6055104 libcoreclr.so!CExecutionEngine::GetTlsData() + 0x14 [/home/vagrant/coreclr/src/vm/corhost.cpp:2738], calling libcoreclr.so!__tls_get_addr
00007FFFFFFFD190 00007ffff6049695 libcoreclr.so!EEJitManager::FindMethodCode(RangeSection*, unsigned long) + 0xc5 [/home/vagrant/coreclr/src/vm/codeman.cpp:3788], calling libcoreclr.so!CHECK::EnterAssert() [/home/vagrant/coreclr/src/inc/check.inl:46]
00007FFFFFFFD230 00007ffff6049695 libcoreclr.so!EEJitManager::FindMethodCode(RangeSection*, unsigned long) + 0xc5 [/home/vagrant/coreclr/src/vm/codeman.cpp:3788], calling libcoreclr.so!CHECK::EnterAssert() [/home/vagrant/coreclr/src/inc/check.inl:46]
00007FFFFFFFD2B0 00007ffff6049452 libcoreclr.so!EEJitManager::JitCodeToMethodInfo(RangeSection*, unsigned long, MethodDesc**, EECodeInfo*) + 0x52 [/home/vagrant/coreclr/src/vm/codeman.cpp:3691], calling libcoreclr.so!EEJitManager::FindMethodCode(RangeSection*, unsigned long) [/home/vagrant/coreclr/src/vm/codeman.cpp:3758]
00007FFFFFFFD2C0 00007ffff602a6fc libcoreclr.so!DecCantAllocCount() + 0x4c [/home/vagrant/coreclr/src/inc/clrhost.h:180]
00007FFFFFFFD340 00007ffff634cfc5 libcoreclr.so!ClassLoader::CreateTypeHandleForTypeKey(TypeKey*, AllocMemTracker*) + 0x3d5 [/home/vagrant/coreclr/src/vm/clsload.cpp:3364], calling libcoreclr.so!ClassLoader::CreateTypeHandleForTypeDefThrowing(Module*, unsigned int, Instantiation, AllocMemTracker*) [/home/vagrant/coreclr/src/vm/methodtablebuilder.cpp:11872]
00007FFFFFFFD360 00007ffff614448b libcoreclr.so!LookupMap<MethodTable*>::GetElement(unsigned int, unsigned long*) + 0x6b [/home/vagrant/coreclr/src/vm/ceeload.inl:173], calling libcoreclr.so!LookupMapBase::GetElementPtr(unsigned int) [/home/vagrant/coreclr/src/vm/ceeload.cpp:5722]
00007FFFFFFFD390 00007ffff6144347 libcoreclr.so!Module::LookupTypeDef(unsigned int, ClassLoadLevel*) + 0xd7 [/home/vagrant/coreclr/src/vm/ceeload.h:2225], calling libcoreclr.so!TypeHandle::GetLoadLevel() const [/home/vagrant/coreclr/src/vm/typehandle.cpp:1377]
00007FFFFFFFD3E0 00007ffff634b36f libcoreclr.so!ClassLoader::LookupTypeDefOrRefInModule(Module*, unsigned int, ClassLoadLevel*) + 0xbf [/home/vagrant/coreclr/src/vm/clsload.cpp:2237], calling libcoreclr.so!Module::LookupTypeDef(unsigned int, ClassLoadLevel*) [/home/vagrant/coreclr/src/vm/ceeload.h:2203]
00007FFFFFFFD420 00007ffff634b87e libcoreclr.so!ClassLoader::LoadTypeDefOrRefThrowing(Module*, unsigned int, ClassLoader::NotFoundAction, ClassLoader::PermitUninstantiatedFlag, unsigned int, ClassLoadLevel) + 0x5e [/home/vagrant/coreclr/src/vm/clsload.cpp:2740], calling libcoreclr.so!ClassLoader::LookupTypeDefOrRefInModule(Module*, unsigned int, ClassLoadLevel*) [/home/vagrant/coreclr/src/vm/clsload.cpp:2217]
00007FFFFFFFD430 00007ffff6650e55 libcoreclr.so!ObtainCurrentThreadIdImpl(CorUnix::CPalThread*, char const*) + 0x25 [/home/vagrant/coreclr/src/pal/src/sync/cs.cpp:184], calling libcoreclr.so!syscall
00007FFFFFFFD460 00007ffff6650e55 libcoreclr.so!ObtainCurrentThreadIdImpl(CorUnix::CPalThread*, char const*) + 0x25 [/home/vagrant/coreclr/src/pal/src/sync/cs.cpp:184], calling libcoreclr.so!syscall
00007FFFFFFFD4C0 00007ffff634c8fb libcoreclr.so!ClassLoader::DoIncrementalLoad(TypeKey*, TypeHandle, ClassLoadLevel) + 0x1bb [/home/vagrant/coreclr/src/vm/clsload.cpp:3292], calling libcoreclr.so!ClassLoader::CreateTypeHandleForTypeKey(TypeKey*, AllocMemTracker*) [/home/vagrant/coreclr/src/vm/clsload.cpp:3349]
00007FFFFFFFD4E0 00007ffff6650777 libcoreclr.so!CorUnix::InternalLeaveCriticalSection(CorUnix::CPalThread*, _CRITICAL_SECTION*) + 0xf7 [/home/vagrant/coreclr/src/pal/src/sync/cs.cpp:865], calling libcoreclr.so!ObtainCurrentThreadIdImpl(CorUnix::CPalThread*, char const*) [/home/vagrant/coreclr/src/pal/src/sync/cs.cpp:179]
00007FFFFFFFD530 00007ffff665061d libcoreclr.so!LeaveCriticalSection + 0x8d [/home/vagrant/coreclr/src/pal/src/sync/cs.cpp:331], calling libcoreclr.so!CorUnix::InternalLeaveCriticalSection(CorUnix::CPalThread*, _CRITICAL_SECTION*) [/home/vagrant/coreclr/src/pal/src/sync/cs.cpp:854]
00007FFFFFFFD550 00007ffff6058b85 libcoreclr.so!CrstBase::Leave() + 0x65 [/home/vagrant/coreclr/src/vm/crst.cpp:349], calling libcoreclr.so!LeaveCriticalSection [/home/vagrant/coreclr/src/pal/src/sync/cs.cpp:323]
00007FFFFFFFD560 00007ffff60174b1 libcoreclr.so!operator new[](unsigned long, NoThrow const&) + 0x21 [/home/vagrant/coreclr/src/utilcode/clrhost_nodependencies.cpp:480], calling libcoreclr.so!SetLastError [/home/vagrant/coreclr/src/pal/src/misc/error.cpp:126]
00007FFFFFFFD580 00007ffff640063b libcoreclr.so!PendingTypeLoadTable::InsertValue(PendingTypeLoadEntry*) + 0xab [/home/vagrant/coreclr/src/vm/pendingload.cpp:77], calling libcoreclr.so!operator new[](unsigned long, NoThrow const&) [/home/vagrant/coreclr/src/utilcode/clrhost_nodependencies.cpp:464]
00007FFFFFFFD5C0 00007ffff634e38f libcoreclr.so!ClassLoader::LoadTypeHandleForTypeKey_Body(TypeKey*, TypeHandle, ClassLoadLevel) + 0x75f [/home/vagrant/coreclr/src/vm/clsload.cpp:4074], calling libcoreclr.so!ClassLoader::DoIncrementalLoad(TypeKey*, TypeHandle, ClassLoadLevel) [/home/vagrant/coreclr/src/vm/clsload.cpp:3263]
00007FFFFFFFD600 00007ffff62f15b1 libcoreclr.so!DynamicHelpers::CreateReturnConst(LoaderAllocator*, unsigned long) + 0x41 [/home/vagrant/coreclr/src/inc/loaderheap.h:82], calling libcoreclr.so!CodeFragmentHeap::RealAllocAlignedMem(unsigned long, unsigned int, char const*, int) [/home/vagrant/coreclr/src/vm/codeman.cpp:1849]
00007FFFFFFFD610 00007ffff6188183 libcoreclr.so!CLRException::HandlerState::CleanupTry() + 0xa3 [/home/vagrant/coreclr/src/vm/threads.h:2191], calling libcoreclr.so!__tls_get_addr
00007FFFFFFFD700 00007ffff6348b78 libcoreclr.so!ClassLoader::LoadTypeHandleForTypeKey(TypeKey*, TypeHandle, ClassLoadLevel, InstantiationContext const*) + 0x148 [/home/vagrant/coreclr/src/vm/clsload.cpp:3793], calling libcoreclr.so!ClassLoader::LoadTypeHandleForTypeKey_Body(TypeKey*, TypeHandle, ClassLoadLevel) [/home/vagrant/coreclr/src/vm/clsload.cpp:3901]
00007FFFFFFFD730 00007ffff6144326 libcoreclr.so!Module::LookupTypeDef(unsigned int, ClassLoadLevel*) + 0xb6 [/home/vagrant/coreclr/src/vm/ceeload.h:2213], calling libcoreclr.so!TypeHandle::Verify() [/home/vagrant/coreclr/src/vm/typehandle.cpp:86]
00007FFFFFFFD780 00007ffff634a7fb libcoreclr.so!ClassLoader::LoadTypeDefThrowing(Module*, unsigned int, ClassLoader::NotFoundAction, ClassLoader::PermitUninstantiatedFlag, unsigned int, ClassLoadLevel, Instantiation*) + 0x29b [/home/vagrant/coreclr/src/vm/clsload.cpp:2662], calling libcoreclr.so!ClassLoader::LoadTypeHandleForTypeKey(TypeKey*, TypeHandle, ClassLoadLevel, InstantiationContext const*) [/home/vagrant/coreclr/src/vm/clsload.cpp:3746]
00007FFFFFFFD7D0 00007ffff60d0b3b libcoreclr.so!MethodDesc::GetPrecode() + 0xfb [/home/vagrant/coreclr/src/vm/method.hpp:287], calling libcoreclr.so!CHECK::EnterAssert() [/home/vagrant/coreclr/src/inc/check.inl:46]
00007FFFFFFFD800 00007ffff614448b libcoreclr.so!LookupMap<MethodTable*>::GetElement(unsigned int, unsigned long*) + 0x6b [/home/vagrant/coreclr/src/vm/ceeload.inl:173], calling libcoreclr.so!LookupMapBase::GetElementPtr(unsigned int) [/home/vagrant/coreclr/src/vm/ceeload.cpp:5722]
00007FFFFFFFD830 00007ffff6144326 libcoreclr.so!Module::LookupTypeDef(unsigned int, ClassLoadLevel*) + 0xb6 [/home/vagrant/coreclr/src/vm/ceeload.h:2213], calling libcoreclr.so!TypeHandle::Verify() [/home/vagrant/coreclr/src/vm/typehandle.cpp:86]
00007FFFFFFFD880 00007ffff634b36f libcoreclr.so!ClassLoader::LookupTypeDefOrRefInModule(Module*, unsigned int, ClassLoadLevel*) + 0xbf [/home/vagrant/coreclr/src/vm/clsload.cpp:2237], calling libcoreclr.so!Module::LookupTypeDef(unsigned int, ClassLoadLevel*) [/home/vagrant/coreclr/src/vm/ceeload.h:2203]
00007FFFFFFFD8C0 00007ffff634bae0 libcoreclr.so!ClassLoader::LoadTypeDefOrRefThrowing(Module*, unsigned int, ClassLoader::NotFoundAction, ClassLoader::PermitUninstantiatedFlag, unsigned int, ClassLoadLevel) + 0x2c0 [/home/vagrant/coreclr/src/vm/clsload.cpp:2840], calling libcoreclr.so!ClassLoader::LoadTypeDefThrowing(Module*, unsigned int, ClassLoader::NotFoundAction, ClassLoader::PermitUninstantiatedFlag, unsigned int, ClassLoadLevel, Instantiation*) [/home/vagrant/coreclr/src/vm/clsload.cpp:2505]
00007FFFFFFFD920 00007ffff6534378 libcoreclr.so!MDInternalRO::FindParamOfMethod(unsigned int, unsigned int, unsigned int*) + 0x188 [/home/vagrant/coreclr/src/md/inc/metamodelro.h:133], calling libcoreclr.so!MetaData::TableRO::GetRecord(unsigned int, unsigned char**, unsigned int, unsigned int, MetaData::HotTablesDirectory*, unsigned int) [/home/vagrant/coreclr/src/md/inc/../tables/table.h:73]
00007FFFFFFFD930 00007ffff612a24a libcoreclr.so!Thread::SetFrame(Frame*) + 0x16a [/home/vagrant/coreclr/src/vm/threads.cpp:193]
00007FFFFFFFD950 00007ffff607fad5 libcoreclr.so!Frame::Push(Thread*) + 0xb5 [/home/vagrant/coreclr/src/vm/frames.cpp:419], calling libcoreclr.so!GetOsPageSize() [/home/vagrant/coreclr/src/utilcode/util.cpp:1358]
00007FFFFFFFD990 00007ffff631865e libcoreclr.so!Assembly::GetEntryPoint() + 0x29e [/home/vagrant/coreclr/src/vm/assembly.cpp:1811], calling libcoreclr.so!ClassLoader::LoadTypeDefOrRefThrowing(Module*, unsigned int, ClassLoader::NotFoundAction, ClassLoader::PermitUninstantiatedFlag, unsigned int, ClassLoadLevel) [/home/vagrant/coreclr/src/vm/clsload.cpp:2705]
00007FFFFFFFDA00 00007ffff62f7a03 libcoreclr.so!DelayLoad_Helper + 0x77, calling libcoreclr.so!DynamicHelperWorker [/home/vagrant/coreclr/src/vm/prestub.cpp:3130]
00007FFFFFFFDAC0 00007ffff6650e55 libcoreclr.so!ObtainCurrentThreadIdImpl(CorUnix::CPalThread*, char const*) + 0x25 [/home/vagrant/coreclr/src/pal/src/sync/cs.cpp:184], calling libcoreclr.so!syscall
00007FFFFFFFDAF0 00007ffff6650e55 libcoreclr.so!ObtainCurrentThreadIdImpl(CorUnix::CPalThread*, char const*) + 0x25 [/home/vagrant/coreclr/src/pal/src/sync/cs.cpp:184], calling libcoreclr.so!syscall
00007FFFFFFFDB20 00007ffff6650777 libcoreclr.so!CorUnix::InternalLeaveCriticalSection(CorUnix::CPalThread*, _CRITICAL_SECTION*) + 0xf7 [/home/vagrant/coreclr/src/pal/src/sync/cs.cpp:865], calling libcoreclr.so!ObtainCurrentThreadIdImpl(CorUnix::CPalThread*, char const*) [/home/vagrant/coreclr/src/pal/src/sync/cs.cpp:179]
00007FFFFFFFDB30 00007ffff667db35 libcoreclr.so!GetCurrentThreadId + 0x75 [/home/vagrant/coreclr/src/pal/src/thread/thread.cpp:396], calling libcoreclr.so!syscall
00007FFFFFFFDB70 00007ffff665061d libcoreclr.so!LeaveCriticalSection + 0x8d [/home/vagrant/coreclr/src/pal/src/sync/cs.cpp:331], calling libcoreclr.so!CorUnix::InternalLeaveCriticalSection(CorUnix::CPalThread*, _CRITICAL_SECTION*) [/home/vagrant/coreclr/src/pal/src/sync/cs.cpp:854]
00007FFFFFFFDB80 00007ffff6055104 libcoreclr.so!CExecutionEngine::GetTlsData() + 0x14 [/home/vagrant/coreclr/src/vm/corhost.cpp:2738], calling libcoreclr.so!__tls_get_addr
00007FFFFFFFDB90 00007ffff6058ba0 libcoreclr.so!CrstBase::Leave() + 0x80 [/home/vagrant/coreclr/src/inc/clrhost.h:97]
00007FFFFFFFDBF0 00007ffff6055104 libcoreclr.so!CExecutionEngine::GetTlsData() + 0x14 [/home/vagrant/coreclr/src/vm/corhost.cpp:2738], calling libcoreclr.so!__tls_get_addr
00007FFFFFFFDC00 00007ffff6137c39 libcoreclr.so!Thread::SetDebugCantStop(bool) + 0x19 [/home/vagrant/coreclr/src/inc/clrhost.h:97]
00007FFFFFFFDC60 00007ffff63180b7 libcoreclr.so!Assembly::ExecuteMainMethod(REF<PtrArray>*, int) + 0x77 [/home/vagrant/coreclr/src/vm/assembly.cpp:1689], calling libcoreclr.so!Assembly::GetEntryPoint() [/home/vagrant/coreclr/src/vm/assembly.cpp:1738]
00007FFFFFFFDCD0 00007ffff60ef68d libcoreclr.so!OBJECTREF::OBJECTREF(Object*) + 0x9d [/home/vagrant/coreclr/src/vm/threads.inl:34], calling libcoreclr.so!__tls_get_addr
00007FFFFFFFDD00 00007ffff61dbd65 libcoreclr.so!AllocateArrayEx(MethodTable*, int*, unsigned int, int, int) + 0xad5 [/home/vagrant/coreclr/src/vm/gchelpers.cpp:0], calling libcoreclr.so!OBJECTREF::OBJECTREF(Object*) [/home/vagrant/coreclr/src/vm/object.cpp:1358]
00007FFFFFFFDD70 00007ffff613f83e libcoreclr.so!ArrayTypeDesc::Verify() + 0x14e [/home/vagrant/coreclr/src/vm/typedesc.cpp:65], calling libcoreclr.so!ParamTypeDesc::Verify() [/home/vagrant/coreclr/src/vm/typedesc.cpp:34]
00007FFFFFFFDDD0 00007ffff60ea996 libcoreclr.so!MethodTable::Validate() + 0x156 [/home/vagrant/coreclr/src/inc/volatile.h:213]
00007FFFFFFFDDE0 00007ffff6188183 libcoreclr.so!CLRException::HandlerState::CleanupTry() + 0xa3 [/home/vagrant/coreclr/src/vm/threads.h:2191], calling libcoreclr.so!__tls_get_addr
00007FFFFFFFDE10 00007ffff604e1cc libcoreclr.so!CAutoTryCleanup<CLRException::HandlerState>::~CAutoTryCleanup() + 0xc [/home/vagrant/coreclr/src/inc/ex.h:633], calling libcoreclr.so!CLRException::HandlerState::CleanupTry() [/home/vagrant/coreclr/src/vm/clrex.cpp:901]
00007FFFFFFFDE20 00007ffff60edc78 libcoreclr.so!Object::ValidateInner(int, int, int) + 0x4c8 [/home/vagrant/coreclr/src/vm/object.cpp:777], calling libcoreclr.so!CAutoTryCleanup<CLRException::HandlerState>::~CAutoTryCleanup() [/home/vagrant/coreclr/src/inc/ex.h:622]
00007FFFFFFFDF10 00007ffff604f897 libcoreclr.so!CorHost2::ExecuteAssembly(unsigned int, char16_t const*, int, char16_t const**, unsigned int*) + 0x337 [/home/vagrant/coreclr/src/vm/corhost.cpp:479], calling libcoreclr.so!Assembly::ExecuteMainMethod(REF<PtrArray>*, int) [/home/vagrant/coreclr/src/vm/assembly.cpp:1661]
00007FFFFFFFDFF0 00007ffff6017077 libcoreclr.so!coreclr_execute_assembly + 0x1a7 [/home/vagrant/coreclr/src/dlls/mscoree/unixinterface.cpp:412]
00007FFFFFFFE000 00007ffff601679f libcoreclr.so!coreclr_initialize + 0x2cf [/home/vagrant/coreclr/src/inc/holder.h:316], calling libcoreclr.so!operator delete[](void*) [/home/vagrant/coreclr/src/utilcode/clrhost_nodependencies.cpp:501]

@janvorli
Copy link
Member

@am11 I've tried to build stuff with your change locally and it seems the issue is that System.Globalization.Native.so doesn't export any symbols (it failed on my box when trying to get GlobalizationNative_LoadICU export). So the setting of the visibility leaked into the build of this shared library too. Which is not bad per se, but we need to take care of marking the exposed APIs visibility in there too.

@am11 am11 changed the title WIP: Set visibility option to hidden Set visibility option to hidden Jan 23, 2019
@am11
Copy link
Member Author

am11 commented Jan 23, 2019

@dotnet-bot, test Windows_NT x64 Checked Innerloop Build and Test please.

@am11
Copy link
Member Author

am11 commented Jan 23, 2019

@janvorli, thank you for pointing it out! Exporting symbols in System.Globalization.Native fixed the exception. 🎉

I have not redefined compiler option in globalization's cmake, as compileoptions.cmake are being inherited via CMakeLists.txt at the root of the repo. Is it by accident or design? If it is former, I will add that option in src/corefx/System.Globalization.Native/CMakeLists.txt next to add_compile_options(-fPIC) (which is also redefined), otherwise fPIC could be removed too?

@janvorli
Copy link
Member

The inheritance of build options is by design, I've just haven't realized we need to update the System.Globalization.Native exports too.
Btw, we need to enable exports from the optional standalone gc shared library (libclrgc.so) too (GC_Initialize and GC_VersionInfo).

@am11
Copy link
Member Author

am11 commented Jan 23, 2019

libclrgc.so

I think it is already covered:

  • In CMakeLists.txt, include(clrdefinitions.cmake) precedes if(FEATURE_STANDALONE_GC .. add_subdirectory(src/gc), so it inherits the visibility flag.
  • In gcload.cpp, there is an existing GC_Export based on DLLEXPORT defined in master branch, I had to only guard it for reentrance with ifndef: https://github.com/dotnet/coreclr/pull/21924/files#diff-a8589d65ed3b7592ff60a2d82d6d71f2 (as removing the existing #defines broke build at one stage and keeping both was failing the build at different stage)

@janvorli
Copy link
Member

  • In gcload.cpp, there is an existing GC_Export based on DLLEXPORT defined in master branch

Ah, great then!

@am11
Copy link
Member Author

am11 commented Jan 30, 2019

@dotnet-bot, test this please.

@am11
Copy link
Member Author

am11 commented Jan 30, 2019

(only five jobs get triggered after the merge, trying the remainder)
test CentOS7.1 x64 Checked Innerloop Build and Test
test CentOS7.1 x64 Debug Innerloop Build
test Linux-musl x64 Debug Build
test OSX10.12 x64 Checked Innerloop Build and Test
test Ubuntu arm Cross Checked crossgen_comparison Build and Test
test Ubuntu arm Cross Release crossgen_comparison Build and Test
test Ubuntu x64 Checked CoreFX Tests
test Ubuntu x64 Checked Innerloop Build and Test
test Ubuntu x64 Checked Innerloop Build and Test (Jit - TieredCompilation=0)
test Ubuntu x64 Formatting
test Windows_NT x64 Checked CoreFX Tests
test Windows_NT x64 Checked Innerloop Build and Test
test Windows_NT x64 Checked Innerloop Build and Test (Jit - TieredCompilation=0)
test Windows_NT x64 Formatting
test Windows_NT x64 Release CoreFX Tests
test Windows_NT x86 Checked Innerloop Build and Test
test Windows_NT x86 Checked Innerloop Build and Test (Jit - TieredCompilation=0)
test Windows_NT x86 Release Innerloop Build and Test

@am11
Copy link
Member Author

am11 commented Jan 30, 2019

@jkotas, @janvorli, could you please take another look? :)

@janvorli
Copy link
Member

The only thing I keep thinking about is the fact that we manually mark (almost?) all of the PAL APIs as DLLEXPORT and so we had to touch so many files. I wonder if we could include the DLLEXPORT in the PALAPI macro and handle the few cases (IIRC you've mentioned there are some) in a special way - e.g. by creating PALAPI_NOEXPORT macro that would be the same as the original PALAPI.

@am11
Copy link
Member Author

am11 commented Feb 3, 2019

@janvorli, added DLLEXPORT to PALAPI definition and PALAPI_NOEXPORT to counter the affect in few places.
tidbit: https://github.com/dotnet/coreclr/pull/21924.patch for grep'able review (.patch works for pull, commit and compare links) :)

@jkotas
Copy link
Member

jkotas commented Feb 4, 2019

Could you please resolve conflicts / undo most the changes under src/corefx/System.Globalization.Native/? Those were fixed in a better way by rewriting the globalization shim in C.

@am11
Copy link
Member Author

am11 commented Feb 4, 2019

Sure, I have rebased against master and removed the re-definition of visibility compiler option from src/corefx/System.Globalization.Native/CMakeLists.txt.

Copy link
Member

@janvorli janvorli left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thank you a lot!

@am11
Copy link
Member Author

am11 commented Feb 7, 2019

@janvorli, thanks, there was a merge conflict, I have resolved it. Could this be merged?

@janvorli
Copy link
Member

janvorli commented Feb 7, 2019

@am11 yes, once the CI legs complete, I'll merge it.

@janvorli
Copy link
Member

janvorli commented Feb 8, 2019

@dotnet-bot test OSX10.12 x64 Checked Innerloop Build and Test please

@janvorli janvorli merged commit 5bb7eb6 into dotnet:master Feb 9, 2019
@sandreenko
Copy link

This change produces desktop build errors:
311:5>src\jit\ee_il_dll.cpp(57): error C2144: syntax error: 'void' should be preceded by ';' [jit\crossgen\jit_crossgen.nativeproj]

Could you please push a PR with the fix for that?

@am11 am11 deleted the reduced-symbols branch February 9, 2019 08:12
@am11
Copy link
Member Author

am11 commented Feb 9, 2019

@sandreenko, sorry about that. Is there any CI job configured for desktop build? I will try to reproduce it locally.

@jkotas
Copy link
Member

jkotas commented Feb 9, 2019

@am11 The "desktop build" is a special closed source build of .NET Framework with CoreCLR RyuJIT. There is no CI for it; not any way for you to do it.

@sandreenko I think it would be best if you or somebody else who has the "desktop build" environment setup took care of fixing it. I guess the fix should be to define DLLEXPORT somewhere; but it is hard to tell what exactly will make the desktop build happy.

@jkotas
Copy link
Member

jkotas commented Feb 9, 2019

(It may need a fix in the closed source part of the desktop build.)

#ifndef FEATURE_MERGE_JIT_AND_ENGINE

extern "C" BOOL WINAPI DllMain(HANDLE hInstance, DWORD dwReason, LPVOID pvReserved)
extern "C" DLLEXPORT BOOL WINAPI DllMain(HANDLE hInstance, DWORD dwReason, LPVOID pvReserved)
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why is DllMain exported?

@mikedn
Copy link

mikedn commented Feb 9, 2019

jit's CMake file generates a .def file on the file. Is that still needed?

And coreclr's CMake does something similar.

@janvorli
Copy link
Member

janvorli commented Feb 9, 2019

It is still needed. It is a "post filter" that prunes the exported symbols. The symbols that we export now are symbols that need to be exported by libmscordac.so, libclrjit.so and libmscordi.so, but each of them should export only subset of those.

@mikedn
Copy link

mikedn commented Feb 9, 2019

Not sure I understand, are you referring to PAL_RegisterModule and PAL_UnregisterModule? OK but on Windows the JIT exports only 3 functions and those are all DLLEXPORT now.

@janvorli
Copy link
Member

janvorli commented Feb 9, 2019

libclrjit.so links to PAL on Unix, so by default, it would export all the functions that are exported by PAL. That's why we need to have the generated linker script that ensures that we expose only the three functions defined in it. The linker script on Linux prunes the list of exports to only the functions listed in the script.
On Windows, it is different though, as the .def files don't prune the list of DLLEXPORT marked functions. So it seems the .def should not be needed there anymore.

As for the DllMain, we still need to mark it as DLLEXPORT for Unix. I believe that Windows linker exports that automatically for dlls, so having the DLLEXPORT on it for Windows doesn't change anything.

@mikedn
Copy link

mikedn commented Feb 9, 2019

I believe that Windows linker exports that automatically for dlls, so having the DLLEXPORT on it for Windows doesn't change anything.

The DllMain that one writes in a DLL is not exported nor otherwise exposed externally. It's only called by the statically linked CRT startup code. It's the CRT that supplies the actual DLL entrypoint, and that is too not exported, it's only available in the PE header.

@jkotas
Copy link
Member

jkotas commented Feb 9, 2019

DLLEXPORT is defined to nothing on Windows, so DllMain is not actually getting exported.

DllMain needs to be exported from clrjit on Unix, so that the PAL Win32 emulator can call it. We have been trimming the PAL over time and the DllMain emulation is one part that is a good candidate to trim, but we are not there yet.

I have noticed other inconsistencies and DLLEXPORTs that should not be needed. Submitted WIP #22500 that should make this easier to understand.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants