diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 5253831fd4..8030bbb276 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -157,6 +157,9 @@ jobs: $ManifestPath = ".\src\manifest\MsQuicEtw.man" wevtutil.exe um $ManifestPath wevtutil.exe im $ManifestPath /rf:$($MsQuicDll) /mf:$($MsQuicDll) + # - name: Stop lttng-sessiond + # if: matrix.vec.plat == 'linux' + # run: sudo systemctl stop lttng-sessiond - name: Test if: matrix.vec.os == 'WinServerPrerelease' shell: pwsh @@ -164,13 +167,8 @@ jobs: run: scripts/test.ps1 -Config ${{ matrix.vec.config }} -Arch ${{ matrix.vec.arch }} -Tls ${{ matrix.vec.tls }} -GHA -LogProfile Full.Light -GenerateXmlResults ${{ matrix.vec.xdp }} ${{ matrix.vec.qtip }} - name: Test if: matrix.vec.os != 'WinServerPrerelease' - shell: pwsh timeout-minutes: 120 - run: scripts/test.ps1 -Config ${{ matrix.vec.config }} -Arch ${{ matrix.vec.arch }} -Tls ${{ matrix.vec.tls }} -OsRunner ${{ matrix.vec.os }} -GHA -LogProfile Full.Light -GenerateXmlResults ${{ matrix.vec.xdp }} ${{ matrix.vec.qtip }} - - name: Fix log permissions for Linux XDP - if: failure() && matrix.vec.plat == 'linux' # (matrix.vec.plat == 'linux' && matrix.vec.xdp == '-UseXdp') doesn't work for some reason - run: | - sudo chmod -R 777 artifacts + run: pwsh ./scripts/test.ps1 -Config ${{ matrix.vec.config }} -Arch ${{ matrix.vec.arch }} -Tls ${{ matrix.vec.tls }} -OsRunner ${{ matrix.vec.os }} -GHA -LogProfile Full.Light -GenerateXmlResults ${{ matrix.vec.xdp }} ${{ matrix.vec.qtip }} -Filter "*UdpBind*" - name: Upload on Failure uses: actions/upload-artifact@50769540e7f4bd5e21e526ee35c689e35e0d6874 if: failure() diff --git a/scripts/log.ps1 b/scripts/log.ps1 index f7453d1b0c..999db91a5a 100644 --- a/scripts/log.ps1 +++ b/scripts/log.ps1 @@ -233,16 +233,25 @@ function Log-Start { } try { + $Env:LTTNG_UST_REGISTER_TIMEOUT=-1 # wait forever if ($Stream) { lttng -q create msquiclive --live } else { New-Item -Path $TempLTTngDir -ItemType Directory -Force | Out-Null + lttng-sessiond --verbose --verbose-consumer > ${TempLTTngDir}/lttng.log 2>&1 & + sleep 2 $Command = "lttng create $InstanceName -o=$TempLTTngDir" Invoke-Expression $Command | Write-Debug } lttng enable-event --userspace CLOG_* | Write-Debug lttng add-context --userspace --type=vpid --type=vtid | Write-Debug lttng start | Write-Debug + Write-Host "start ------------->" + whoami | Write-Host + # chmod -R 777 $TempLTTngDir | Write-Debug + ls -Rlh $TempLTTngDir | Write-Host + pgrep lttng | xargs ps -fH | Write-Host + Write-Host "<------------- start" if ($Stream) { lttng list | Write-Debug @@ -304,11 +313,37 @@ function Log-Stop { Write-Error "LTTng session ($InstanceName) not currently running!" } + Write-Host "end1 ------------->" + Write-Host " end2 [lttng list msquic] ======================================================" + lttng list msquic | Write-Host + Write-Host " end2 [lttng status] ======================================================" + lttng status | Write-Host + Write-Host " end2 [pgrep] ======================================================" + pgrep lttng | xargs ps -fH | Write-Host + Write-Host " end2 [ls -Rlh] ======================================================" + ls -Rlh $TempLTTngDir | Write-Host + Write-Host "<------------- end1" + Invoke-Expression "lttng stop $InstanceName" | Write-Debug + sleep 10 + $LTTNGTarFile = $OutputPath + ".tgz" $BableTraceFile = $OutputPath + ".babel.txt" + Write-Host "Copying LTTng log files to $OutputPath" + mv ${TempLTTngDir}/lttng.log ${OutputPath}/lttng.log + + Write-Host "end2 ------------->" + Write-Host " end2 [lttng list msquic] ======================================================" + lttng list msquic | Write-Host + Write-Host " end2 [lttng status] ======================================================" + lttng status | Write-Host + Write-Host " end2 [pgrep] ======================================================" + pgrep lttng | xargs ps -fH | Write-Host + Write-Host " end2 [ls -Rlh] ======================================================" + ls -Rlh $TempLTTngDir | Write-Host + Write-Host "<------------- end2" Write-Host "tar/gzip LTTng log files: $LTTNGTarFile" tar -cvzf $LTTNGTarFile -P $TempLTTngDir | Write-Debug diff --git a/scripts/prepare-machine.ps1 b/scripts/prepare-machine.ps1 index 318648076d..079cdd932b 100644 --- a/scripts/prepare-machine.ps1 +++ b/scripts/prepare-machine.ps1 @@ -460,11 +460,43 @@ function Install-DotnetTool { } } +function Install-Dotnet { + if (!$IsLinux) { + Write-Host "Linux only" + return + } + + Write-Host "Installing dotnet" + + # Check /etc/apt/preperences whether it has the known issue workaround + if (Test-Path /etc/apt/preferences) { + $hasKnownIssueWorkaround = (Get-Content /etc/apt/preferences | Select-String -Pattern "Package: dotnet* aspnet* netstandard*") -ne $null + if (!$hasKnownIssueWorkaround) { + # known issue https://learn.microsoft.com/en-us/dotnet/core/install/linux-package-mixup?pivots=os-linux-ubuntu + sudo bash -c "echo 'Package: dotnet* aspnet* netstandard*' >> /etc/apt/preferences" + sudo bash -c "echo 'Pin: origin packages.microsoft.com' >> /etc/apt/preferences" + sudo bash -c "echo 'Pin-Priority: -10' >> /etc/apt/preferences" + } else { + Write-Host "Known issue workaround already applied" + } + } + + sudo apt-get update -y + sudo apt-get install -y dotnet-sdk-6.0 aspnetcore-runtime-6.0 dotnet-runtime-6.0 +} + function Install-Clog2Text { + # Install-Dotnet + Write-Host "Initializing clog submodule" git submodule init $RootDir/submodules/clog git submodule update + apt list --installed | grep dotnet + which dotnet | xargs ls -lh + grep -R dotnet /etc/apt + dotnet --version + dotnet build (Join-Path $RootDir submodules clog) $NuGetPath = Join-Path $RootDir "submodules" "clog" "src" "nupkg" Install-DotnetTool -ToolName "Microsoft.Logging.CLOG2Text.Lttng" -Version "0.0.1" -NuGetPath $NuGetPath @@ -557,6 +589,10 @@ if ($IsLinux) { sudo apt-get install -y lttng-tools sudo apt-get install -y liblttng-ust-dev sudo apt-get install -y gdb + + lttng --version + lttng-sessiond --version + grep -R lttng /etc/apt if ($UseXdp) { if (!$IsUbuntu2404) { sudo apt-add-repository "deb http://mirrors.kernel.org/ubuntu noble main" -y diff --git a/src/platform/unittest/DataPathTest.cpp b/src/platform/unittest/DataPathTest.cpp index 33906ba672..76fd6eb98c 100644 --- a/src/platform/unittest/DataPathTest.cpp +++ b/src/platform/unittest/DataPathTest.cpp @@ -709,6 +709,9 @@ TEST_F(DataPathTest, UdpBind) VERIFY_QUIC_SUCCESS(Datapath.GetInitStatus()); ASSERT_NE(nullptr, Datapath.Datapath); + int* tmp = nullptr; + *tmp = 0; + CxPlatSocket Socket(Datapath); VERIFY_QUIC_SUCCESS(Socket.GetInitStatus()); ASSERT_NE(nullptr, Socket.Socket);