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

Commit 18a57b3

Browse files
author
Mike McLaughlin
authored
Fix "LTTng-UST: Error (-17) while registering..." error when debugging (20874) (#21218)
Fixes issue #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.
1 parent 8429614 commit 18a57b3

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

src/dlls/mscoree/coreclr/CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -121,6 +121,7 @@ else()
121121
list(APPEND CORECLR_LIBRARIES
122122
${START_WHOLE_ARCHIVE} # force all PAL objects to be included so all exports are available
123123
coreclrpal
124+
tracepointprovider
124125
${END_WHOLE_ARCHIVE}
125126
mscorrc_debug
126127
palrt

src/pal/src/CMakeLists.txt

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -196,7 +196,6 @@ set(SOURCES
196196
misc/strutil.cpp
197197
misc/sysinfo.cpp
198198
misc/time.cpp
199-
misc/tracepointprovider.cpp
200199
misc/utils.cpp
201200
numa/numa.cpp
202201
objmgr/palobjbase.cpp
@@ -261,6 +260,11 @@ add_library(coreclrpal
261260
${LIBUNWIND_OBJECTS}
262261
)
263262

263+
add_library(tracepointprovider
264+
STATIC
265+
misc/tracepointprovider.cpp
266+
)
267+
264268
if(CMAKE_SYSTEM_NAME STREQUAL Darwin)
265269
find_library(COREFOUNDATION CoreFoundation)
266270
find_library(CORESERVICES CoreServices)

0 commit comments

Comments
 (0)