Skip to content

Commit

Permalink
Fix "LTTng-UST: Error (-17) while registering..." error when debuggin…
Browse files Browse the repository at this point in the history
…g (20874)

Fixes issue dotnet/coreclr#20205.

This has been happening in more and more scenarios:

1) SOS when the coreclr hosting the SOS managed code is a different version that the one being debugged
2) Lee ran into it with ClrMD for Linux
3) The dotnet-diagnostictests repo with the current arcade build changes because the coreclr version hosting mdbg is different than the version running the debuggees.

This fix is simple: only link the tracepointprovider.cpp code that loads libcoreclrtraceptprovider.so into libcoreclr.so and not in any other module that uses the PAL library (libdbgshim.so, libmscordaccore.so, etc.). Create a new "tracepointprovider" library with the tracepointprovider.cpp source file in it and remove it from the "coreclrpal".  Link this new lib into libcoreclr.so.

Commit migrated from dotnet/coreclr@c60869f
  • Loading branch information
mikem8361 authored Nov 8, 2018
1 parent 8bf1562 commit 0ded2c1
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
1 change: 1 addition & 0 deletions src/coreclr/src/dlls/mscoree/coreclr/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,7 @@ else()
list(APPEND CORECLR_LIBRARIES
${START_WHOLE_ARCHIVE} # force all PAL objects to be included so all exports are available
coreclrpal
tracepointprovider
${END_WHOLE_ARCHIVE}
mscorrc_debug
palrt
Expand Down
6 changes: 5 additions & 1 deletion src/coreclr/src/pal/src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -230,7 +230,6 @@ set(SOURCES
misc/strutil.cpp
misc/sysinfo.cpp
misc/time.cpp
misc/tracepointprovider.cpp
misc/utils.cpp
numa/numa.cpp
objmgr/palobjbase.cpp
Expand Down Expand Up @@ -295,6 +294,11 @@ add_library(coreclrpal
${LIBUNWIND_OBJECTS}
)

add_library(tracepointprovider
STATIC
misc/tracepointprovider.cpp
)

if(CMAKE_SYSTEM_NAME STREQUAL Darwin)
find_library(COREFOUNDATION CoreFoundation)
find_library(CORESERVICES CoreServices)
Expand Down

0 comments on commit 0ded2c1

Please sign in to comment.