From ecfe3bca7cfbd413415af9d2bcccb5f9a361f962 Mon Sep 17 00:00:00 2001 From: Brian Robbins Date: Tue, 15 Oct 2019 11:23:19 -0700 Subject: [PATCH 1/7] Fix Segfault in PerfInfo Image Logging (#26910) --- src/vm/perfinfo.cpp | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/src/vm/perfinfo.cpp b/src/vm/perfinfo.cpp index 7075137010f0..3667503bbfa3 100644 --- a/src/vm/perfinfo.cpp +++ b/src/vm/perfinfo.cpp @@ -41,8 +41,21 @@ void PerfInfo::LogImage(PEFile* pFile, WCHAR* guid) SString value; const SString& path = pFile->GetPath(); - PEImageLayout *pLoadedLayout = pFile->GetLoaded(); - SIZE_T baseAddr = (SIZE_T)pLoadedLayout->GetBase(); + if (path.IsEmpty()) + { + return; + } + + SIZE_T baseAddr = 0; + if (pFile->IsILImageReadyToRun()) + { + PEImageLayout *pLoadedLayout = pFile->GetLoaded(); + if (pLoadedLayout) + { + baseAddr = (SIZE_T)pLoadedLayout->GetBase(); + } + } + value.Printf("%S%c%S%c%p", path.GetUnicode(), sDelimiter, guid, sDelimiter, baseAddr); SString command; From 97c8353ed0868645484438e6a0aa375e90af7a72 Mon Sep 17 00:00:00 2001 From: Anirudh Agnihotry Date: Wed, 20 Nov 2019 09:20:31 -0800 Subject: [PATCH 2/7] update branding for 3.0.2 (#27896) * update branding * remove stable properties from coreclr as it never stablises --- dir.common.props | 7 +------ eng/Versions.props | 2 +- 2 files changed, 2 insertions(+), 7 deletions(-) diff --git a/dir.common.props b/dir.common.props index c1799c1a62ff..1c5646ed91cf 100644 --- a/dir.common.props +++ b/dir.common.props @@ -65,12 +65,7 @@ - 3.0.1 - - - false - $(PackageVersion) - + 3.0.2 servicing diff --git a/eng/Versions.props b/eng/Versions.props index bc0f27faaea4..7a2d8c501209 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -2,7 +2,7 @@ - 3.0.1 + 3.0.2 4 7 From 64ac634e59fa082bde45634455b4705e9f84f5ca Mon Sep 17 00:00:00 2001 From: Juan Hoyos Date: Wed, 20 Nov 2019 18:56:05 -0800 Subject: [PATCH 3/7] [release/3.0] Fix use of ilasm during test builds when using a 3.0 SDK (#27820) * Add fix for restore of ilasm The restore logic in buildtools tried to use a netcoreapp2.1 TFM for Linux-musl. This ended up restoring Linux-x64 binaries which then broke the test build. This change works around this by saving a copy of the depproj that BuildTools used into the tree and restore it as a 3.0 app manually in init-tools on our side of the build. * Change to a 3.0 SDK for servicing * Bump test versions of ilasm and runtime package to match the RC --- ILAsmVersion.txt | 2 +- dependencies.props | 2 +- global.json | 2 +- init-tools.cmd | 9 ++++--- init-tools.sh | 15 ++++++----- tests/ilasm-restore/Directory.Build.props | 6 +++++ tests/ilasm-restore/Directory.Build.targets | 6 +++++ tests/ilasm-restore/ilasm.depproj | 30 +++++++++++++++++++++ 8 files changed, 59 insertions(+), 13 deletions(-) create mode 100644 tests/ilasm-restore/Directory.Build.props create mode 100644 tests/ilasm-restore/Directory.Build.targets create mode 100644 tests/ilasm-restore/ilasm.depproj diff --git a/ILAsmVersion.txt b/ILAsmVersion.txt index 9d451b5b66f6..2a6e60c71e7e 100644 --- a/ILAsmVersion.txt +++ b/ILAsmVersion.txt @@ -1 +1 @@ -3.0.0-preview6.19280.1 +3.0.0-rc2.19462.5 diff --git a/dependencies.props b/dependencies.props index 774b169ac78e..4874fbe3ad73 100644 --- a/dependencies.props +++ b/dependencies.props @@ -22,7 +22,7 @@ - 3.0.0-preview6.19280.1 + 3.0.0-rc2.19462.5 2.4.1-pre.build.4059 1.0.0-beta-build0015 2.0.43 diff --git a/global.json b/global.json index ecfdff806f6f..8ef11e2107fa 100644 --- a/global.json +++ b/global.json @@ -1,6 +1,6 @@ { "tools": { - "dotnet": "3.0.100-preview6-012264" + "dotnet": "3.0.100" }, "native-tools": { "cmake": "3.11.1", diff --git a/init-tools.cmd b/init-tools.cmd index 0905e913b96c..b483d72571ca 100644 --- a/init-tools.cmd +++ b/init-tools.cmd @@ -105,9 +105,6 @@ if NOT exist "%BUILD_TOOLS_PATH%\init-tools.cmd" ( :afterbuildtoolsrestore -:: Ask init-tools to also restore ILAsm -set /p ILASMCOMPILER_VERSION=< "%~dp0ILAsmVersion.txt" - echo Initializing BuildTools... echo Running: "%BUILD_TOOLS_PATH%\init-tools.cmd" "%~dp0" "%DOTNET_CMD%" "%TOOLRUNTIME_DIR%" >> "%INIT_TOOLS_LOG%" call "%BUILD_TOOLS_PATH%\init-tools.cmd" "%~dp0" "%DOTNET_CMD%" "%TOOLRUNTIME_DIR%" "%PACKAGES_DIR%" >> "%INIT_TOOLS_LOG%" @@ -117,6 +114,12 @@ if not [%INIT_TOOLS_ERRORLEVEL%]==[0] ( goto :error ) +REM ILasm/ILDasm used to be restored by buildtools. The reference there was a netocreapp2.0, which was prior to our support of linux-musl. We initialize it locally as a 3.0 with the new SDK. +set /p ILASM_VERSION=< "%~dp0ILAsmVersion.txt" +if [%NATIVE_TOOLS_RID%] == [] set NATIVE_TOOLS_RID=win-x64 +echo Running: call "%DOTNET_CMD%" build "%~dp0tests\ilasm-restore\ilasm.depproj" --no-cache --packages "%PACKAGES_DIR%" -r "%NATIVE_TOOLS_RID%" /p:ILAsmPackageVersion="%ILASM_VERSION%" /p:ExpectedILAsmPath="%TOOLRUNTIME_DIR%\ilasm" >> "%INIT_TOOLS_LOG%" +call "%DOTNET_CMD%" build "%~dp0tests\ilasm-restore\ilasm.depproj" --no-cache --packages "%PACKAGES_DIR%" -r "%NATIVE_TOOLS_RID%" /p:ILAsmPackageVersion="%ILASM_VERSION%" /p:ExpectedILAsmPath="%TOOLRUNTIME_DIR%\ilasm" + :: Create semaphore file echo Done initializing tools. if NOT exist "%BUILD_TOOLS_SEMAPHORE_DIR%" mkdir "%BUILD_TOOLS_SEMAPHORE_DIR%" diff --git a/init-tools.sh b/init-tools.sh index 42bbc0972ff8..5ac2b44d7d87 100755 --- a/init-tools.sh +++ b/init-tools.sh @@ -153,15 +153,8 @@ if [ -z "${__ILASM_RID-}" ]; then fi echo "Using RID $__ILASM_RID for BuildTools native tools" - -export ILASMCOMPILER_VERSION=$__ILASM_VERSION export NATIVE_TOOLS_RID=$__ILASM_RID -if [ -n "${DotNetBootstrapCliTarPath-}" ]; then - # Assume ilasm is not in nuget yet when bootstrapping... - unset ILASMCOMPILER_VERSION -fi - # Build tools only supported on x64 if [ "${__PKG_ARCH}" != "x64" ] && [ "${__PKG_ARCH}" != "arm" ]; then echo "Skipped installing build tools." @@ -178,6 +171,14 @@ else exit 1 fi + + if [ ! -n "${DotNetBootstrapCliTarPath-}" ]; then + # Assume ilasm is not in nuget yet when bootstrapping... + # ILasm/ILDasm used to be restored by buildtools. The reference there was a netocreapp2.0, which was prior to our support of linux-musl. We initialize it locally as a 3.0 with the new SDK. + echo "Running: eval $__DOTNET_CMD build ${__scriptpath}/tests/ilasm-restore/ilasm.depproj --no-cache --packages $__PACKAGES_DIR -r $NATIVE_TOOLS_RID -p:ILAsmPackageVersion=$__ILASM_VERSION -p:ExpectedILAsmPath=$__TOOLRUNTIME_DIR/ilasm" >> "$__init_tools_log" + eval "$__DOTNET_CMD" build "${__scriptpath}/tests/ilasm-restore/ilasm.depproj" --no-cache --packages "$__PACKAGES_DIR" -r "$NATIVE_TOOLS_RID" -p:ILAsmPackageVersion="$__ILASM_VERSION" -p:ExpectedILAsmPath="$__TOOLRUNTIME_DIR/ilasm" + fi + echo "Making all .sh files executable under Tools." # Executables restored with .NET Core 2.0 do not have executable permission flags. https://github.com/NuGet/Home/issues/4424 ls "$__scriptpath/Tools/"*.sh | xargs chmod +x diff --git a/tests/ilasm-restore/Directory.Build.props b/tests/ilasm-restore/Directory.Build.props new file mode 100644 index 000000000000..35fc3cdf4ac0 --- /dev/null +++ b/tests/ilasm-restore/Directory.Build.props @@ -0,0 +1,6 @@ + + + \ No newline at end of file diff --git a/tests/ilasm-restore/Directory.Build.targets b/tests/ilasm-restore/Directory.Build.targets new file mode 100644 index 000000000000..35fc3cdf4ac0 --- /dev/null +++ b/tests/ilasm-restore/Directory.Build.targets @@ -0,0 +1,6 @@ + + + \ No newline at end of file diff --git a/tests/ilasm-restore/ilasm.depproj b/tests/ilasm-restore/ilasm.depproj new file mode 100644 index 000000000000..d57773c22c90 --- /dev/null +++ b/tests/ilasm-restore/ilasm.depproj @@ -0,0 +1,30 @@ + + + + + false + true + + + + + + + + + + + .NETCoreApp,Version=v3.0 + netcoreapp3.0 + true + + + + + + + + + + + From 8d3bb937803b2a13ebf89aab0710eb7f70ca64a2 Mon Sep 17 00:00:00 2001 From: Jarret Shook Date: Wed, 20 Nov 2019 19:00:17 -0800 Subject: [PATCH 4/7] Move off of the old arm32 queue (#27905) --- eng/platform-matrix.yml | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/eng/platform-matrix.yml b/eng/platform-matrix.yml index 29f11a6f19e9..b0ef62ca2bc3 100644 --- a/eng/platform-matrix.yml +++ b/eng/platform-matrix.yml @@ -36,11 +36,11 @@ jobs: registry: mcr helixQueues: - ${{ if eq(variables['System.TeamProject'], 'public') }}: - - (Ubuntu.1804.Arm32.Open)Ubuntu.1604.Arm32.Open@mcr.microsoft.com/dotnet-buildtools/prereqs:ubuntu-18.04-helix-arm32v7-30f6673-20190814153226 + - (Ubuntu.1804.Arm32.Open)Ubuntu.1804.Armarch.Open@mcr.microsoft.com/dotnet-buildtools/prereqs:ubuntu-18.04-helix-arm32v7-30f6673-20190814153226 - ${{ if eq(variables['System.TeamProject'], 'internal') }}: - - (Debian.9.Arm32)Ubuntu.1604.Arm32@mcr.microsoft.com/dotnet-buildtools/prereqs:debian-9-helix-arm32v7-74c9941-20190620155841 - - (Ubuntu.1604.Arm32)Ubuntu.1604.Arm32@mcr.microsoft.com/dotnet-buildtools/prereqs:ubuntu-16.04-helix-arm32v7-a45aeeb-20190620160312 - - (Ubuntu.1804.Arm32)Ubuntu.1604.Arm32@mcr.microsoft.com/dotnet-buildtools/prereqs:ubuntu-18.04-helix-arm32v7-09a60ed-20190620155854 + - (Debian.9.Arm32)Ubuntu.1804.Armarch@mcr.microsoft.com/dotnet-buildtools/prereqs:debian-9-helix-arm32v7-74c9941-20190620155841 + - (Ubuntu.1804.Arm32)Ubuntu.1804.Armarch@mcr.microsoft.com/dotnet-buildtools/prereqs:ubuntu-16.04-helix-arm32v7-a45aeeb-20190620160312 + - (Ubuntu.1804.Arm32)Ubuntu.1804.Armarch@mcr.microsoft.com/dotnet-buildtools/prereqs:ubuntu-18.04-helix-arm32v7-09a60ed-20190620155854 crossrootfsDir: '/crossrootfs/arm' ${{ insert }}: ${{ parameters.jobParameters }} @@ -59,12 +59,12 @@ jobs: registry: mcr helixQueues: - ${{ if eq(variables['System.TeamProject'], 'public') }}: - - (Ubuntu.1804.Arm64.Open)Ubuntu.1604.Arm64.Docker.Open@mcr.microsoft.com/dotnet-buildtools/prereqs:ubuntu-18.04-helix-arm64v8-a45aeeb-20190620155855 + - (Ubuntu.1804.Arm64.Open)Ubuntu.1804.Armarch.Open@mcr.microsoft.com/dotnet-buildtools/prereqs:ubuntu-18.04-helix-arm64v8-a45aeeb-20190620155855 - ${{ if and(eq(variables['System.TeamProject'], 'public'), notIn(parameters.helixQueueGroup, 'pr', 'ci', 'corefx')) }}: - - (Debian.9.Arm64.Open)Ubuntu.1604.Arm64.Docker.Open@mcr.microsoft.com/dotnet-buildtools/prereqs:debian-9-helix-arm64v8-74c9941-20190620155840 + - (Debian.9.Arm64.Open)Ubuntu.1804.Armarch.Open@mcr.microsoft.com/dotnet-buildtools/prereqs:debian-9-helix-arm64v8-74c9941-20190620155840 - ${{ if eq(variables['System.TeamProject'], 'internal') }}: - - (Debian.9.Arm64)Ubuntu.1604.Arm64.Docker@mcr.microsoft.com/dotnet-buildtools/prereqs:debian-9-helix-arm64v8-74c9941-20190620155840 - - (Ubuntu.1804.Arm64)Ubuntu.1604.Arm64.Docker@mcr.microsoft.com/dotnet-buildtools/prereqs:ubuntu-18.04-helix-arm64v8-a45aeeb-20190620155855 + - (Debian.9.Arm64)Ubuntu.1804.Armarch@mcr.microsoft.com/dotnet-buildtools/prereqs:debian-9-helix-arm64v8-74c9941-20190620155840 + - (Ubuntu.1804.Arm64)Ubuntu.1804.Armarch@mcr.microsoft.com/dotnet-buildtools/prereqs:ubuntu-18.04-helix-arm64v8-a45aeeb-20190620155855 crossrootfsDir: '/crossrootfs/arm64' ${{ insert }}: ${{ parameters.jobParameters }} From bb3006f789d03dfb62e984d44fb58582df19506c Mon Sep 17 00:00:00 2001 From: Jarret Shook Date: Thu, 21 Nov 2019 11:02:45 -0800 Subject: [PATCH 5/7] Add alpine3.10 testing to 3.0 (#27214) --- eng/platform-matrix.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/eng/platform-matrix.yml b/eng/platform-matrix.yml index b0ef62ca2bc3..21f25882f5a4 100644 --- a/eng/platform-matrix.yml +++ b/eng/platform-matrix.yml @@ -87,6 +87,7 @@ jobs: - ${{ if eq(variables['System.TeamProject'], 'internal') }}: - (Alpine.38.Amd64)ubuntu.1604.amd64@mcr.microsoft.com/dotnet-buildtools/prereqs:alpine-3.8-helix-09ca40b-20190508143246 - (Alpine.39.Amd64)ubuntu.1604.amd64@mcr.microsoft.com/dotnet-buildtools/prereqs:alpine-3.9-helix-09ca40b-20190508143246 + - (Alpine.310.Amd64)Ubuntu.1604.Amd64@mcr.microsoft.com/dotnet-buildtools/prereqs:alpine-3.10-helix-3043688-20190918214010 ${{ insert }}: ${{ parameters.jobParameters }} # Linux musl arm64 From 8f60f146c6e474533a062b2a75d01a3cc9b2a7cd Mon Sep 17 00:00:00 2001 From: David Mason Date: Thu, 21 Nov 2019 13:08:01 -0800 Subject: [PATCH 6/7] Fix GetSequencePoints when profiler provides mapping via SetILInstrumentedCodeMap (#27843) Port #25802 to 3.0.2 --- src/debug/daccess/dacdbiimpl.cpp | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/debug/daccess/dacdbiimpl.cpp b/src/debug/daccess/dacdbiimpl.cpp index 4ef3bc7b20b6..a65233c2d063 100644 --- a/src/debug/daccess/dacdbiimpl.cpp +++ b/src/debug/daccess/dacdbiimpl.cpp @@ -1003,13 +1003,19 @@ void DacDbiInterfaceImpl::GetSequencePoints(MethodDesc * pMethodDesc, if (!success) ThrowHR(E_FAIL); - // if there is a rejit IL map for this function, apply that in preference to load-time mapping #ifdef FEATURE_REJIT CodeVersionManager * pCodeVersionManager = pMethodDesc->GetCodeVersionManager(); + ILCodeVersion ilVersion; NativeCodeVersion nativeCodeVersion = pCodeVersionManager->GetNativeCodeVersion(dac_cast(pMethodDesc), (PCODE)startAddr); if (!nativeCodeVersion.IsNull()) { - const InstrumentedILOffsetMapping * pRejitMapping = nativeCodeVersion.GetILCodeVersion().GetInstrumentedILMap(); + ilVersion = nativeCodeVersion.GetILCodeVersion(); + } + + // if there is a rejit IL map for this function, apply that in preference to load-time mapping + if (!ilVersion.IsNull() && !ilVersion.IsDefaultVersion()) + { + const InstrumentedILOffsetMapping * pRejitMapping = ilVersion.GetInstrumentedILMap(); ComposeMapping(pRejitMapping, mapCopy, &entryCount); } else From 4d14ed7fed6b4229a4c1ef92f76491f8ab29ae00 Mon Sep 17 00:00:00 2001 From: "dotnet-maestro[bot]" <42748379+dotnet-maestro[bot]@users.noreply.github.com> Date: Fri, 22 Nov 2019 11:01:42 -0800 Subject: [PATCH 7/7] [release/3.0] Update dependencies from dotnet/core-setup (#27910) * Update dependencies from https://github.com/dotnet/core-setup build 20191016.12 - Microsoft.NETCore.App - 3.0.1-servicing-19516-12 * Update dependencies from https://github.com/dotnet/core-setup build 20191121.02 - Microsoft.NETCore.App - 3.0.2-servicing-19571-02 --- eng/Version.Details.xml | 4 ++-- eng/Versions.props | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index 8a02dd6a771b..ef35ee1a260a 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -26,9 +26,9 @@ https://github.com/dotnet/corefx 144ebb6ff997bf7a777206a233cdd8c03e13f60c - + https://github.com/dotnet/core-setup - 4421cfb105df112492038e5c5a70c24bce48e72f + 07f338c15044f71b1ea6acdfcbb917d790fa4cc2 https://dev.azure.com/dnceng/internal/_git/dotnet-optimization diff --git a/eng/Versions.props b/eng/Versions.props index 7a2d8c501209..8659c6454067 100644 --- a/eng/Versions.props +++ b/eng/Versions.props @@ -25,7 +25,7 @@ 3.0.0-rc2.19461.13 1.0.0-preview7.19326.2 - 3.0.0-rc2-19460-02 + 3.0.2-servicing-19571-02 5.0.6-beta.19203.1