From 3bab68e7feee42ba22cb826b216efe12c6c053fd Mon Sep 17 00:00:00 2001 From: eduponz Date: Fri, 5 Apr 2024 16:37:22 +0200 Subject: [PATCH 01/12] Refs #20542: Add Fast DDS Sanitizer worflow with support for asan fastdds Signed-off-by: eduponz --- .github/workflows/config/asan_colcon.meta | 7 - .github/workflows/sanitizers-ci.yaml | 239 ++++++++++++++++++++++ 2 files changed, 239 insertions(+), 7 deletions(-) create mode 100644 .github/workflows/sanitizers-ci.yaml diff --git a/.github/workflows/config/asan_colcon.meta b/.github/workflows/config/asan_colcon.meta index 5ea0dad1d3d..b35d778421d 100644 --- a/.github/workflows/config/asan_colcon.meta +++ b/.github/workflows/config/asan_colcon.meta @@ -1,12 +1,6 @@ names: fastrtps: cmake-args: - - "-DCMAKE_BUILD_TYPE=Debug" - - "-DEPROSIMA_BUILD_TESTS=ON" - - "-DRTPS_API_TESTS=ON" - - "-DFASTRTPS_API_TESTS=ON" - - "-DFASTDDS_PIM_API_TESTS=ON" - - "-DPERFORMANCE_TESTS=ON" - "-DNO_TLS=OFF" - "-DSECURITY=ON" - "-DFASTDDS_STATISTICS=ON" @@ -14,7 +8,6 @@ names: - "-DCMAKE_CXX_FLAGS='-Werror'" discovery-server: cmake-args: - - "-DCMAKE_BUILD_TYPE=Debug" - "-DSANITIZER=Address" googletest-distribution: cmake-args: diff --git a/.github/workflows/sanitizers-ci.yaml b/.github/workflows/sanitizers-ci.yaml new file mode 100644 index 00000000000..3b8cf58cfef --- /dev/null +++ b/.github/workflows/sanitizers-ci.yaml @@ -0,0 +1,239 @@ +name: Fast DDS Sanitizers Analysis + +on: + workflow_dispatch: + inputs: + label: + description: 'ID associated to the workflow' + required: true + type: string + run_asan_fastdds: + description: 'Run Addess Sanitizer job for Fast DDS' + required: false + type: boolean + colcon_meta: + description: 'Optional Path of the colcon meta file' + required: false + type: string + colcon_build_args: + description: 'Optional colcon build arguments' + required: false + type: string + colcon_test_args: + description: 'Optional colcon test arguments' + required: false + type: string + cmake_args: + description: 'Optional CMake Compilation Flags' + required: false + type: string + ctest_args: + description: 'Optional CTest Testing Flags' + required: false + type: string + fastdds_ref: + description: 'Branch or tag of Fast DDS repository (https://github.com/eProsima/Fast-DDS)' + required: true + + pull_request: + paths-ignore: + - '**.md' + - '**.txt' + - '!**/CMakeLists.txt' + + schedule: + - cron: '0 1 * * *' + +concurrency: + group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} + cancel-in-progress: true + +env: + label: ${{ inputs.label || 'fastdds-sanitizers-ci' }} + build_asan_fastdds: ${{ + inputs.run_asan_fastdds || + github.event_name == 'schedule' || + github.event_name == 'pull_request' }} + run_asan_fastdds: ${{ inputs.run_asan_fastdds || + github.event_name == 'schedule' || + github.event_name == 'pull_request' }} + asan_colcon_meta: ${{ inputs.colcon_meta || '' }} + colcon_build_args: ${{ inputs.colcon_build_args || '' }} + colcon_test_args: ${{ inputs.colcon_test_args || '' }} + cmake_args: ${{ inputs.cmake_args || '' }} + ctest_args: ${{ inputs.ctest_args || '' }} + fastdds_ref: ${{ inputs.fastdds_ref || github.ref || 'master' }} + +jobs: + asan_fastdds_build: + if: ${{ ( + !contains(github.event.pull_request.labels.*.name, 'skip-ci') && + !contains(github.event.pull_request.labels.*.name, 'no-test') && + !contains(github.event.pull_request.labels.*.name, 'conflicts') && + ( + (inputs.run_asan_fastdds == true) || + contains(fromJSON('["schedule", "pull_request"]'), github.event_name) + ) + ) }} + runs-on: ubuntu-22.04 + steps: + - name: Add ci-pending label if PR + if: ${{ github.event_name == 'pull_request' }} + uses: eProsima/eProsima-CI/external/add_labels@v0 + with: + labels: ci-pending + number: ${{ github.event.number }} + repo: eProsima/Fast-DDS + + # https://github.com/actions/runner-images/issues/9491 + - name: Fix kernel mmap rnd bits + run: sudo sysctl vm.mmap_rnd_bits=28 + + - name: Sync eProsima/Fast-DDS repository + uses: eProsima/eProsima-CI/external/checkout@v0 + with: + path: src/fastrtps + ref: ${{ env.fastdds_ref }} + + - name: Get minimum supported version of CMake + uses: eProsima/eProsima-CI/external/get-cmake@v0 + with: + cmakeVersion: '3.22.6' + + - name: Install apt packages + uses: eProsima/eProsima-CI/ubuntu/install_apt_packages@v0 + with: + packages: curl grep libasio-dev libtinyxml2-dev python3 python3-pip software-properties-common wget + + - name: Install colcon + uses: eProsima/eProsima-CI/ubuntu/install_colcon@v0 + + - name: Install Python dependencies + uses: eProsima/eProsima-CI/ubuntu/install_python_packages@v0 + with: + packages: vcstool xmlschema + + - name: Setup CCache + uses: eProsima/eProsima-CI/external/setup-ccache-action@v0 + + - name: Fetch Fast DDS dependencies + uses: eProsima/eProsima-CI/multiplatform/vcs_import@v0 + with: + vcs_repos_file: ${{ github.workspace }}/src/fastrtps/fastrtps.repos + destination_workspace: src + skip_existing: 'true' + + - name: Fetch Fast DDS CI dependencies + uses: eProsima/eProsima-CI/multiplatform/vcs_import@v0 + with: + vcs_repos_file: ${{ github.workspace }}/src/fastrtps/.github/workflows/config/asan.repos + destination_workspace: src + skip_existing: 'true' + + - name: Select .meta file + id: select_meta + if: ${{ env.asan_colcon_meta == '' }} + run: | + echo "asan_colcon_meta=${{ github.workspace }}/src/fastrtps/.github/workflows/config/asan_colcon.meta" >> $GITHUB_ENV + cat ${{ github.workspace }}/src/fastrtps/.github/workflows/config/asan_colcon.meta + + - name: Colcon build + continue-on-error: false + uses: eProsima/eProsima-CI/multiplatform/colcon_build@v0 + with: + colcon_meta_file: ${{ env.asan_colcon_meta }} + colcon_build_args: ${{ env.colcon_build_args }} + cmake_args: ${{ env.cmake_args }} + cmake_args_default: '' + cmake_build_type: 'Debug' + workspace: ${{ github.workspace }} + workspace_dependencies: '' + + - name: Upload build artifacts + uses: eProsima/eProsima-CI/external/upload-artifact@v0 + with: + name: build_artifacts_fastdds_asan_${{ env.label }} + path: ${{ github.workspace }} + + asan_fastdds_test: + needs: asan_fastdds_build + runs-on: ubuntu-22.04 + steps: + - name: Download build artifacts + uses: eProsima/eProsima-CI/external/download-artifact@v0 + with: + name: build_artifacts_fastdds_asan_${{ env.label }} + path: ${{ github.workspace }} + + # https://github.com/actions/runner-images/issues/9491 + - name: Fix kernel mmap rnd bits + run: sudo sysctl vm.mmap_rnd_bits=28 + + - name: Get minimum supported version of CMake + uses: eProsima/eProsima-CI/external/get-cmake@v0 + with: + cmakeVersion: '3.22.6' + + - name: Install apt packages + uses: eProsima/eProsima-CI/ubuntu/install_apt_packages@v0 + with: + packages: curl grep libasio-dev libtinyxml2-dev python3 python3-pip software-properties-common wget + + - name: Install colcon + uses: eProsima/eProsima-CI/ubuntu/install_colcon@v0 + + - name: Install Python dependencies + uses: eProsima/eProsima-CI/ubuntu/install_python_packages@v0 + with: + packages: vcstool xmlschema + + - name: Setup CCache + uses: eProsima/eProsima-CI/external/setup-ccache-action@v0 + + - name: Select .meta file + id: select_meta + if: ${{ env.asan_colcon_meta == '' }} + run: | + echo "asan_colcon_meta=${{ github.workspace }}/src/fastrtps/.github/workflows/config/asan_colcon.meta" >> $GITHUB_ENV + cat ${{ github.workspace }}/src/fastrtps/.github/workflows/config/asan_colcon.meta + + - name: Colcon build + continue-on-error: false + uses: eProsima/eProsima-CI/multiplatform/colcon_build@v0 + with: + colcon_meta_file: ${{ env.asan_colcon_meta }} + colcon_build_args: ${{ env.colcon_build_args }} + cmake_args: ${{ env.cmake_args }} + cmake_args_default: -DEPROSIMA_BUILD_TESTS=ON -DRTPS_API_TESTS=ON -DFASTRTPS_API_TESTS=ON -DFASTDDS_PIM_API_TESTS=ON -DPERFORMANCE_TESTS=ON + cmake_build_type: 'Debug' + workspace: ${{ github.workspace }} + workspace_dependencies: '' + + - name: Colcon test + if: ${{ env.run_asan_fastdds }} + id: test + continue-on-error: true + uses: eProsima/eProsima-CI/multiplatform/colcon_test@v0 + with: + colcon_test_args: ${{ env.colcon_test_args }} + colcon_test_args_default: '--event-handlers=console_direct+ --return-code-on-test-failure' + ctest_args: ${{ env.ctest_args }} + ctest_args_default: '--timeout 300 --label-exclude "xfail"' + packages_names: fastrtps + workspace: ${{ github.workspace }} + workspace_dependencies: '' + test_report_artifact: ${{ format('test_report_{0}_{1}', env.label, github.job) }} + + - name: Report sanitizer errors + if: ${{ env.run_asan_fastdds }} + run: | + bash src/fastrtps/.github/workflows/utils/specific_errors_filter.sh \ + "==ERROR:" \ + log/latest_test/fastrtps/stdout_stderr.log \ + _tmp_specific_error_file.log + + python3 src/fastrtps/.github/workflows/utils/log_parser.py \ + --log-file log/latest_test/fastrtps/stdout_stderr.log \ + --specific-error-file _tmp_specific_error_file.log \ + --output-file $GITHUB_STEP_SUMMARY \ + --sanitizer asan From 1dc6e0e5de852db75e9208dbde038f2e164698dd Mon Sep 17 00:00:00 2001 From: eduponz Date: Sat, 6 Apr 2024 09:22:06 +0200 Subject: [PATCH 02/12] Refs #20542: Add asan_discovery_server_test job Signed-off-by: eduponz --- .github/workflows/sanitizers-ci.yaml | 119 +++++++++++++++++++++++++++ 1 file changed, 119 insertions(+) diff --git a/.github/workflows/sanitizers-ci.yaml b/.github/workflows/sanitizers-ci.yaml index 3b8cf58cfef..1ff17288257 100644 --- a/.github/workflows/sanitizers-ci.yaml +++ b/.github/workflows/sanitizers-ci.yaml @@ -11,6 +11,10 @@ on: description: 'Run Addess Sanitizer job for Fast DDS' required: false type: boolean + run_asan_discovery_server: + description: 'Run Addess Sanitizer job for Discovery Server' + required: false + type: boolean colcon_meta: description: 'Optional Path of the colcon meta file' required: false @@ -34,6 +38,11 @@ on: fastdds_ref: description: 'Branch or tag of Fast DDS repository (https://github.com/eProsima/Fast-DDS)' required: true + discovery_server_ref: + description: > + Branch or tag of Discovery Server repository (https://github.com/eProsima/Discovery-Server) + Required only if the Discovery Server job is requested + required: false pull_request: paths-ignore: @@ -57,12 +66,16 @@ env: run_asan_fastdds: ${{ inputs.run_asan_fastdds || github.event_name == 'schedule' || github.event_name == 'pull_request' }} + run_asan_discovery_server: ${{ inputs.run_asan_discovery_server || + github.event_name == 'schedule' || + github.event_name == 'pull_request' }} asan_colcon_meta: ${{ inputs.colcon_meta || '' }} colcon_build_args: ${{ inputs.colcon_build_args || '' }} colcon_test_args: ${{ inputs.colcon_test_args || '' }} cmake_args: ${{ inputs.cmake_args || '' }} ctest_args: ${{ inputs.ctest_args || '' }} fastdds_ref: ${{ inputs.fastdds_ref || github.ref || 'master' }} + discovery_server_ref: ${{ inputs.discovery_server_ref }} jobs: asan_fastdds_build: @@ -237,3 +250,109 @@ jobs: --specific-error-file _tmp_specific_error_file.log \ --output-file $GITHUB_STEP_SUMMARY \ --sanitizer asan + + asan_discovery_server_test: + if: ${{ ( + !contains(github.event.pull_request.labels.*.name, 'skip-ci') && + !contains(github.event.pull_request.labels.*.name, 'no-test') && + !contains(github.event.pull_request.labels.*.name, 'conflicts') && + ( + (inputs.run_asan_discovery_server == true) || + contains(fromJSON('["schedule", "pull_request"]'), github.event_name) + ) + ) }} + needs: asan_fastdds_build + runs-on: ubuntu-22.04 + steps: + - name: Download build artifacts + uses: eProsima/eProsima-CI/external/download-artifact@v0 + with: + name: build_artifacts_fastdds_asan_${{ env.label }} + path: ${{ github.workspace }} + + # https://github.com/actions/runner-images/issues/9491 + - name: Fix kernel mmap rnd bits + run: sudo sysctl vm.mmap_rnd_bits=28 + + - name: Get minimum supported version of CMake + uses: eProsima/eProsima-CI/external/get-cmake@v0 + with: + cmakeVersion: '3.22.6' + + - name: Install apt packages + uses: eProsima/eProsima-CI/ubuntu/install_apt_packages@v0 + with: + packages: curl grep libasio-dev libtinyxml2-dev python3 python3-pip software-properties-common wget + + - name: Install colcon + uses: eProsima/eProsima-CI/ubuntu/install_colcon@v0 + + - name: Install Python dependencies + uses: eProsima/eProsima-CI/ubuntu/install_python_packages@v0 + with: + packages: vcstool setuptools gcovr tomark xmltodict jsondiff pandas + + - name: Setup CCache + uses: eProsima/eProsima-CI/external/setup-ccache-action@v0 + + - name: Get Discovery Server branch + id: get_discovery_server_branch + uses: eProsima/eProsima-CI/ubuntu/get_related_branch_from_repo@v0 + with: + remote_repository: eProsima/Discovery-Server + fallback_branch: ${{ env.discovery_server_ref || 'master' }} + + - name: Download Discovery Server repo + uses: eProsima/eProsima-CI/external/checkout@v0 + with: + repository: eProsima/Discovery-Server + path: src/discovery-server + ref: ${{ steps.get_discovery_server_branch.outputs.deduced_branch }} + + - name: Select .meta file + id: select_meta + if: ${{ env.asan_colcon_meta == '' }} + run: | + echo "asan_colcon_meta=${{ github.workspace }}/src/fastrtps/.github/workflows/config/asan_colcon.meta" >> $GITHUB_ENV + cat ${{ github.workspace }}/src/fastrtps/.github/workflows/config/asan_colcon.meta + + - name: Colcon build + continue-on-error: false + uses: eProsima/eProsima-CI/multiplatform/colcon_build@v0 + with: + colcon_meta_file: ${{ env.asan_colcon_meta }} + colcon_build_args: ${{ env.colcon_build_args }} + cmake_args: ${{ env.cmake_args }} + cmake_args_default: '' + cmake_build_type: 'Debug' + workspace: ${{ github.workspace }} + workspace_dependencies: '' + + - name: Colcon test + if: ${{ env.run_asan_fastdds }} + id: test + continue-on-error: true + uses: eProsima/eProsima-CI/multiplatform/colcon_test@v0 + with: + colcon_test_args: ${{ env.colcon_test_args }} + colcon_test_args_default: '--event-handlers=console_direct+ --return-code-on-test-failure' + ctest_args: ${{ env.ctest_args }} + ctest_args_default: '' + packages_names: discovery-server + workspace: ${{ github.workspace }} + workspace_dependencies: '' + test_report_artifact: ${{ format('test_report_{0}_{1}', env.label, github.job) }} + + - name: Report sanitizer errors + if: ${{ env.run_asan_discovery_server }} + run: | + bash src/fastrtps/.github/workflows/utils/specific_errors_filter.sh \ + "==ERROR:" \ + log/latest_test/discovery-server/stdout_stderr.log \ + _tmp_specific_error_file.log + + python3 src/fastrtps/.github/workflows/utils/log_parser.py \ + --log-file log/latest_test/discovery-server/stdout_stderr.log \ + --specific-error-file _tmp_specific_error_file.log \ + --output-file $GITHUB_STEP_SUMMARY \ + --sanitizer=asan From 488a0842fbc41ed8d508e552e832a9d000b47c4b Mon Sep 17 00:00:00 2001 From: eduponz Date: Sat, 6 Apr 2024 09:41:20 +0200 Subject: [PATCH 03/12] Refs #20542: Add tsan_fastdds_test job Signed-off-by: eduponz --- .github/workflows/sanitizers-ci.yaml | 174 +++++++++++++++++++++++++++ 1 file changed, 174 insertions(+) diff --git a/.github/workflows/sanitizers-ci.yaml b/.github/workflows/sanitizers-ci.yaml index 1ff17288257..a3e9aa67511 100644 --- a/.github/workflows/sanitizers-ci.yaml +++ b/.github/workflows/sanitizers-ci.yaml @@ -15,6 +15,10 @@ on: description: 'Run Addess Sanitizer job for Discovery Server' required: false type: boolean + run_tsan_fastdds: + description: 'Run Thread Sanitizer job for Fast DDS' + required: false + type: boolean colcon_meta: description: 'Optional Path of the colcon meta file' required: false @@ -69,7 +73,11 @@ env: run_asan_discovery_server: ${{ inputs.run_asan_discovery_server || github.event_name == 'schedule' || github.event_name == 'pull_request' }} + run_tsan_fastdds: ${{ inputs.run_tsan_fastdds || + github.event_name == 'schedule' || + github.event_name == 'pull_request' }} asan_colcon_meta: ${{ inputs.colcon_meta || '' }} + tsan_colcon_meta: ${{ inputs.colcon_meta || '' }} colcon_build_args: ${{ inputs.colcon_build_args || '' }} colcon_test_args: ${{ inputs.colcon_test_args || '' }} cmake_args: ${{ inputs.cmake_args || '' }} @@ -356,3 +364,169 @@ jobs: --specific-error-file _tmp_specific_error_file.log \ --output-file $GITHUB_STEP_SUMMARY \ --sanitizer=asan + + tsan_fastdds_test: + if: ${{ ( + !contains(github.event.pull_request.labels.*.name, 'skip-ci') && + !contains(github.event.pull_request.labels.*.name, 'no-test') && + !contains(github.event.pull_request.labels.*.name, 'conflicts') && + ( + (inputs.run_tsan_fastdds == true) || + contains(fromJSON('["schedule", "pull_request"]'), github.event_name) + ) + ) }} + runs-on: ubuntu-22.04 + env: + TSAN_OPTIONS: second_deadlock_stack=1 history_size=7 memory_limit_mb=5000 + # GCC 11.3 (Ubuntu Jammy default) produces several false positives regarding timed synchronization protocols + # These issues were fixed in GCC 12 so we upgrade to that version. + CC: gcc-12 + CXX: g++-12 + steps: + - name: Add ci-pending label if PR + if: ${{ github.event_name == 'pull_request' }} + uses: eProsima/eProsima-CI/external/add_labels@v0 + with: + labels: ci-pending + number: ${{ github.event.number }} + repo: eProsima/Fast-DDS + + # https://github.com/actions/runner-images/issues/9491 + - name: Fix kernel mmap rnd bits + run: sudo sysctl vm.mmap_rnd_bits=28 + + - name: Sync eProsima/Fast-DDS repository + uses: eProsima/eProsima-CI/external/checkout@v0 + with: + path: src/fastrtps + ref: ${{ env.fastdds_ref }} + + - name: Get minimum supported version of CMake + uses: eProsima/eProsima-CI/external/get-cmake@v0 + with: + cmakeVersion: '3.22.6' + + - name: Install apt packages + uses: eProsima/eProsima-CI/ubuntu/install_apt_packages@v0 + with: + packages: curl grep libasio-dev libtinyxml2-dev python3 python3-pip software-properties-common wget + + - name: Install colcon + uses: eProsima/eProsima-CI/ubuntu/install_colcon@v0 + + - name: Install Python dependencies + uses: eProsima/eProsima-CI/ubuntu/install_python_packages@v0 + with: + packages: vcstool setuptools gcovr tomark xmltodict jsondiff pandas + + - name: Setup CCache + uses: eProsima/eProsima-CI/external/setup-ccache-action@v0 + + - name: Fetch Fast DDS dependencies + uses: eProsima/eProsima-CI/multiplatform/vcs_import@v0 + with: + vcs_repos_file: ${{ github.workspace }}/src/fastrtps/fastrtps.repos + destination_workspace: src + skip_existing: 'true' + + - name: Fetch Fast DDS CI dependencies + uses: eProsima/eProsima-CI/multiplatform/vcs_import@v0 + with: + vcs_repos_file: ${{ github.workspace }}/src/fastrtps/.github/workflows/config/ci.repos + destination_workspace: src + skip_existing: 'true' + + - name: Select .meta file + id: select_meta + if: ${{ env.tsan_colcon_meta == '' }} + run: | + echo "tsan_colcon_meta=${{ github.workspace }}/src/fastrtps/.github/workflows/config/tsan_colcon.meta" >> $GITHUB_ENV + cat ${{ github.workspace }}/src/fastrtps/.github/workflows/config/tsan_colcon.meta + + - name: Colcon build + continue-on-error: false + uses: eProsima/eProsima-CI/multiplatform/colcon_build@v0 + with: + colcon_meta_file: ${{ env.tsan_colcon_meta }} + colcon_build_args: ${{ env.colcon_build_args }} + cmake_args: ${{ env.cmake_args }} + cmake_args_default: '' + cmake_build_type: 'Debug' + workspace: ${{ github.workspace }} + workspace_dependencies: '' + + - name: Colcon test + if: ${{ env.run_asan_fastdds }} + id: test + continue-on-error: true + uses: eProsima/eProsima-CI/multiplatform/colcon_test@v0 + with: + colcon_test_args: ${{ env.colcon_test_args }} + colcon_test_args_default: '--event-handlers=console_direct+ --return-code-on-test-failure' + ctest_args: ${{ env.ctest_args }} + ctest_args_default: '--timeout 300 --label-exclude "xfail" -V -E DDSSQLFilterValueTests' + packages_names: fastrtps + workspace: ${{ github.workspace }} + workspace_dependencies: '' + test_report_artifact: ${{ format('test_report_{0}_{1}', env.label, github.job) }} + + - name: Process sanitizer reports + id: report_summary + shell: pwsh + continue-on-error: true + run: | + # Create a dir for the exports + $exports = New-Item -ItemType Directory -Path ./exports + # Move to the reports dir + pushd ./log/latest_test/fastrtps + # Install the report parser module + Find-Module -Repository PSGallery -Name SanReportParser | Install-Module -Scope CurrentUser -Force + # Parse the report files + $rp = Show-Tsan -Path ./stdout_stderr.log + # filter duplicates + $rp = $rp | group md5hash | % { $_.group[0] } + # Export raw data + $rp | Export-CliXML (Join-Path $exports all_reports.xml) + # Group the reports by issue + $g = $rp | group fuzzhash + # Split up deadlocks and race reports + $gd = $rp | ? type -match dead | group fuzzhash + $gr = $rp | ? type -match race | group fuzzhash + # Simplified deadlock summary (only one representative report and tests associated) + $sd = $gd | Sort-Object count -desc | select @{l="fuzzhash";e="name"}, count, ` + @{l="échantillon";e={$_.group[0].report}}, @{l="tests"; ` + e={$_.group.file | sls "(.*)\.\d+$" | % { $_.Matches.Groups[1].Value } | Sort-Object | get-unique}} + # Simplified race summary (only one representative report and tests associated) + $sr = $gr | Sort-Object count -desc | select @{l="fuzzhash";e="name"}, count, ` + @{l="échantillon";e={$_.group[0].report}}, @{l="tests"; ` + e={$_.group.file | sls "(.*)\.\d+$" | % { $_.Matches.Groups[1].Value } | Sort-Object | get-unique}} + # Export simplified summaries + $sd, $sr | Export-Clixml (Join-Path $exports summary_data.xml) + # Export CSV summary of frequencies + $sd | select fuzzhash, count | Export-CSV -Path (Join-Path $exports deadlocks.csv) + $sr | select fuzzhash, count | Export-CSV -Path (Join-Path $exports races.csv) + # Export test mappings + & {$sd; $sr} | Sort-Object { [int]$_.fuzzhash} | % { $fuzzy=$_.fuzzhash;$_.tests | + select @{l="fuzzhash";e={$fuzzy}}, @{l="test";e={$_}}} | + Export-Csv (Join-Path $exports issue_test_map.csv) + # Keep a file per issue + $dir = New-Item -ItemType Directory -Path (Join-Path $exports reports) + & {$sd; $sr} | % { $_.échantillon | Out-File (Join-Path $dir "$($_.fuzzhash).tsan") } + # Create a summary table + @{Type="Deadlock";Failed=$sd.count;Hashes=$sd.fuzzhash}, + @{Type="Data race";Failed=$sr.count;Hashes=$sr.fuzzhash} | + % { $_.Summary = $_.Hashes | select -First 5 | Join-String -Separator ", " + if ($_.Hashes.count -gt 5 ) { + $_.Summary += ", ..." }; $_ } | + % { [PSCustomObject]$_} | + New-MDTable -Columns ([ordered]@{Failed=$null;Type=$null;Summary=$null}) | + Out-File $Env:GITHUB_STEP_SUMMARY + # The step fails on new deadlocks + $LASTEXITCODE=$sd.count + + - name: Check on failures + if: ${{ steps.report_summary.outcome == 'failure' }} + shell: pwsh + run: | + Write-Host ${{ steps.report_summary.outcome }} + exit 1 From 8fcbbfc5272c399ee79afd5d000df3827f7d3de0 Mon Sep 17 00:00:00 2001 From: eduponz Date: Sat, 6 Apr 2024 09:47:11 +0200 Subject: [PATCH 04/12] Refs #20542: Remove colcon_meta input as max inputs for workflow_dispath is 10 Signed-off-by: eduponz --- .github/workflows/sanitizers-ci.yaml | 38 +++++++++------------------- 1 file changed, 12 insertions(+), 26 deletions(-) diff --git a/.github/workflows/sanitizers-ci.yaml b/.github/workflows/sanitizers-ci.yaml index a3e9aa67511..f8e7dffcf4c 100644 --- a/.github/workflows/sanitizers-ci.yaml +++ b/.github/workflows/sanitizers-ci.yaml @@ -19,10 +19,6 @@ on: description: 'Run Thread Sanitizer job for Fast DDS' required: false type: boolean - colcon_meta: - description: 'Optional Path of the colcon meta file' - required: false - type: string colcon_build_args: description: 'Optional colcon build arguments' required: false @@ -76,8 +72,6 @@ env: run_tsan_fastdds: ${{ inputs.run_tsan_fastdds || github.event_name == 'schedule' || github.event_name == 'pull_request' }} - asan_colcon_meta: ${{ inputs.colcon_meta || '' }} - tsan_colcon_meta: ${{ inputs.colcon_meta || '' }} colcon_build_args: ${{ inputs.colcon_build_args || '' }} colcon_test_args: ${{ inputs.colcon_test_args || '' }} cmake_args: ${{ inputs.cmake_args || '' }} @@ -151,18 +145,16 @@ jobs: destination_workspace: src skip_existing: 'true' - - name: Select .meta file - id: select_meta - if: ${{ env.asan_colcon_meta == '' }} + - name: Show .meta file + id: show_meta run: | - echo "asan_colcon_meta=${{ github.workspace }}/src/fastrtps/.github/workflows/config/asan_colcon.meta" >> $GITHUB_ENV cat ${{ github.workspace }}/src/fastrtps/.github/workflows/config/asan_colcon.meta - name: Colcon build continue-on-error: false uses: eProsima/eProsima-CI/multiplatform/colcon_build@v0 with: - colcon_meta_file: ${{ env.asan_colcon_meta }} + colcon_meta_file: ${{ github.workspace }}/src/fastrtps/.github/workflows/config/asan_colcon.meta colcon_build_args: ${{ env.colcon_build_args }} cmake_args: ${{ env.cmake_args }} cmake_args_default: '' @@ -211,18 +203,16 @@ jobs: - name: Setup CCache uses: eProsima/eProsima-CI/external/setup-ccache-action@v0 - - name: Select .meta file - id: select_meta - if: ${{ env.asan_colcon_meta == '' }} + - name: Show .meta file + id: show_meta run: | - echo "asan_colcon_meta=${{ github.workspace }}/src/fastrtps/.github/workflows/config/asan_colcon.meta" >> $GITHUB_ENV cat ${{ github.workspace }}/src/fastrtps/.github/workflows/config/asan_colcon.meta - name: Colcon build continue-on-error: false uses: eProsima/eProsima-CI/multiplatform/colcon_build@v0 with: - colcon_meta_file: ${{ env.asan_colcon_meta }} + colcon_meta_file: ${{ github.workspace }}/src/fastrtps/.github/workflows/config/asan_colcon.meta colcon_build_args: ${{ env.colcon_build_args }} cmake_args: ${{ env.cmake_args }} cmake_args_default: -DEPROSIMA_BUILD_TESTS=ON -DRTPS_API_TESTS=ON -DFASTRTPS_API_TESTS=ON -DFASTDDS_PIM_API_TESTS=ON -DPERFORMANCE_TESTS=ON @@ -317,18 +307,16 @@ jobs: path: src/discovery-server ref: ${{ steps.get_discovery_server_branch.outputs.deduced_branch }} - - name: Select .meta file - id: select_meta - if: ${{ env.asan_colcon_meta == '' }} + - name: Show .meta file + id: show_meta run: | - echo "asan_colcon_meta=${{ github.workspace }}/src/fastrtps/.github/workflows/config/asan_colcon.meta" >> $GITHUB_ENV cat ${{ github.workspace }}/src/fastrtps/.github/workflows/config/asan_colcon.meta - name: Colcon build continue-on-error: false uses: eProsima/eProsima-CI/multiplatform/colcon_build@v0 with: - colcon_meta_file: ${{ env.asan_colcon_meta }} + colcon_meta_file: ${{ github.workspace }}/src/fastrtps/.github/workflows/config/asan_colcon.meta colcon_build_args: ${{ env.colcon_build_args }} cmake_args: ${{ env.cmake_args }} cmake_args_default: '' @@ -436,18 +424,16 @@ jobs: destination_workspace: src skip_existing: 'true' - - name: Select .meta file - id: select_meta - if: ${{ env.tsan_colcon_meta == '' }} + - name: Show .meta file + id: show_meta run: | - echo "tsan_colcon_meta=${{ github.workspace }}/src/fastrtps/.github/workflows/config/tsan_colcon.meta" >> $GITHUB_ENV cat ${{ github.workspace }}/src/fastrtps/.github/workflows/config/tsan_colcon.meta - name: Colcon build continue-on-error: false uses: eProsima/eProsima-CI/multiplatform/colcon_build@v0 with: - colcon_meta_file: ${{ env.tsan_colcon_meta }} + colcon_meta_file: ${{ github.workspace }}/src/fastrtps/.github/workflows/config/tsan_colcon.meta colcon_build_args: ${{ env.colcon_build_args }} cmake_args: ${{ env.cmake_args }} cmake_args_default: '' From 9aa92aa9c7cb9c654aa32dc67ec862e220dd1641 Mon Sep 17 00:00:00 2001 From: eduponz Date: Sat, 6 Apr 2024 10:21:50 +0200 Subject: [PATCH 05/12] Refs #20542: Create a reusable workflow and a CI one for PRs or manual Signed-off-by: eduponz --- .github/workflows/reusable-sanitizers-ci.yaml | 480 ++++++++++++++++++ .github/workflows/sanitizers-ci.yaml | 479 +---------------- 2 files changed, 498 insertions(+), 461 deletions(-) create mode 100644 .github/workflows/reusable-sanitizers-ci.yaml diff --git a/.github/workflows/reusable-sanitizers-ci.yaml b/.github/workflows/reusable-sanitizers-ci.yaml new file mode 100644 index 00000000000..c11a7792bfb --- /dev/null +++ b/.github/workflows/reusable-sanitizers-ci.yaml @@ -0,0 +1,480 @@ +name: Fast DDS Sanitizers reusable workflow + +on: + workflow_call: + inputs: + label: + description: 'ID associated to the workflow' + required: true + type: string + run_asan_fastdds: + description: 'Run Addess Sanitizer job for Fast DDS' + required: false + type: boolean + run_asan_discovery_server: + description: 'Run Addess Sanitizer job for Discovery Server' + required: false + type: boolean + run_tsan_fastdds: + description: 'Run Thread Sanitizer job for Fast DDS' + required: false + type: boolean + colcon_build_args: + description: 'Optional colcon build arguments' + required: false + type: string + colcon_test_args: + description: 'Optional colcon test arguments' + required: false + type: string + cmake_args: + description: 'Optional CMake Compilation Flags' + required: false + type: string + ctest_args: + description: 'Optional CTest Testing Flags' + required: false + type: string + fastdds_ref: + description: 'Branch or tag of Fast DDS repository (https://github.com/eProsima/Fast-DDS)' + required: true + type: string + discovery_server_ref: + description: > + Branch or tag of Discovery Server repository (https://github.com/eProsima/Discovery-Server) + Required only if the Discovery Server job is requested + required: false + type: string + +defaults: + run: + shell: bash + +jobs: + asan_fastdds_build: + if: ${{ ( + !contains(github.event.pull_request.labels.*.name, 'skip-ci') && + !contains(github.event.pull_request.labels.*.name, 'no-test') && + !contains(github.event.pull_request.labels.*.name, 'conflicts') && + (inputs.run_asan_fastdds == true) + ) }} + runs-on: ubuntu-22.04 + steps: + - name: Add ci-pending label if PR + if: ${{ github.event_name == 'pull_request' }} + uses: eProsima/eProsima-CI/external/add_labels@v0 + with: + labels: ci-pending + number: ${{ github.event.number }} + repo: eProsima/Fast-DDS + + # https://github.com/actions/runner-images/issues/9491 + - name: Fix kernel mmap rnd bits + run: sudo sysctl vm.mmap_rnd_bits=28 + + - name: Sync eProsima/Fast-DDS repository + uses: eProsima/eProsima-CI/external/checkout@v0 + with: + path: src/fastrtps + ref: ${{ inputs.fastdds_ref }} + + - name: Get minimum supported version of CMake + uses: eProsima/eProsima-CI/external/get-cmake@v0 + with: + cmakeVersion: '3.22.6' + + - name: Install apt packages + uses: eProsima/eProsima-CI/ubuntu/install_apt_packages@v0 + with: + packages: curl grep libasio-dev libtinyxml2-dev python3 python3-pip software-properties-common wget + + - name: Install colcon + uses: eProsima/eProsima-CI/ubuntu/install_colcon@v0 + + - name: Install Python dependencies + uses: eProsima/eProsima-CI/ubuntu/install_python_packages@v0 + with: + packages: vcstool xmlschema + + - name: Setup CCache + uses: eProsima/eProsima-CI/external/setup-ccache-action@v0 + + - name: Fetch Fast DDS dependencies + uses: eProsima/eProsima-CI/multiplatform/vcs_import@v0 + with: + vcs_repos_file: ${{ github.workspace }}/src/fastrtps/fastrtps.repos + destination_workspace: src + skip_existing: 'true' + + - name: Fetch Fast DDS CI dependencies + uses: eProsima/eProsima-CI/multiplatform/vcs_import@v0 + with: + vcs_repos_file: ${{ github.workspace }}/src/fastrtps/.github/workflows/config/asan.repos + destination_workspace: src + skip_existing: 'true' + + - name: Show .meta file + id: show_meta + run: | + cat ${{ github.workspace }}/src/fastrtps/.github/workflows/config/asan_colcon.meta + + - name: Colcon build + continue-on-error: false + uses: eProsima/eProsima-CI/multiplatform/colcon_build@v0 + with: + colcon_meta_file: ${{ github.workspace }}/src/fastrtps/.github/workflows/config/asan_colcon.meta + colcon_build_args: ${{ inputs.colcon_build_args }} + cmake_args: ${{ inputs.cmake_args }} + cmake_args_default: '' + cmake_build_type: 'Debug' + workspace: ${{ github.workspace }} + workspace_dependencies: '' + + - name: Upload build artifacts + uses: eProsima/eProsima-CI/external/upload-artifact@v0 + with: + name: build_artifacts_fastdds_asan_${{ inputs.label }} + path: ${{ github.workspace }} + + asan_fastdds_test: + needs: asan_fastdds_build + runs-on: ubuntu-22.04 + steps: + - name: Download build artifacts + uses: eProsima/eProsima-CI/external/download-artifact@v0 + with: + name: build_artifacts_fastdds_asan_${{ inputs.label }} + path: ${{ github.workspace }} + + # https://github.com/actions/runner-images/issues/9491 + - name: Fix kernel mmap rnd bits + run: sudo sysctl vm.mmap_rnd_bits=28 + + - name: Get minimum supported version of CMake + uses: eProsima/eProsima-CI/external/get-cmake@v0 + with: + cmakeVersion: '3.22.6' + + - name: Install apt packages + uses: eProsima/eProsima-CI/ubuntu/install_apt_packages@v0 + with: + packages: curl grep libasio-dev libtinyxml2-dev python3 python3-pip software-properties-common wget + + - name: Install colcon + uses: eProsima/eProsima-CI/ubuntu/install_colcon@v0 + + - name: Install Python dependencies + uses: eProsima/eProsima-CI/ubuntu/install_python_packages@v0 + with: + packages: vcstool xmlschema + + - name: Setup CCache + uses: eProsima/eProsima-CI/external/setup-ccache-action@v0 + + - name: Show .meta file + id: show_meta + run: | + cat ${{ github.workspace }}/src/fastrtps/.github/workflows/config/asan_colcon.meta + + - name: Colcon build + continue-on-error: false + uses: eProsima/eProsima-CI/multiplatform/colcon_build@v0 + with: + colcon_meta_file: ${{ github.workspace }}/src/fastrtps/.github/workflows/config/asan_colcon.meta + colcon_build_args: ${{ inputs.colcon_build_args }} + cmake_args: ${{ inputs.cmake_args }} + cmake_args_default: -DEPROSIMA_BUILD_TESTS=ON -DRTPS_API_TESTS=ON -DFASTRTPS_API_TESTS=ON -DFASTDDS_PIM_API_TESTS=ON -DPERFORMANCE_TESTS=ON + cmake_build_type: 'Debug' + workspace: ${{ github.workspace }} + workspace_dependencies: '' + + - name: Colcon test + if: ${{ inputs.run_asan_fastdds }} + id: test + continue-on-error: true + uses: eProsima/eProsima-CI/multiplatform/colcon_test@v0 + with: + colcon_test_args: ${{ inputs.colcon_test_args }} + colcon_test_args_default: '--event-handlers=console_direct+ --return-code-on-test-failure' + ctest_args: ${{ inputs.ctest_args }} + ctest_args_default: '--timeout 300 --label-exclude "xfail"' + packages_names: fastrtps + workspace: ${{ github.workspace }} + workspace_dependencies: '' + test_report_artifact: ${{ format('test_report_{0}_{1}', inputs.label, github.job) }} + + - name: Report sanitizer errors + if: ${{ inputs.run_asan_fastdds }} + run: | + bash src/fastrtps/.github/workflows/utils/specific_errors_filter.sh \ + "==ERROR:" \ + log/latest_test/fastrtps/stdout_stderr.log \ + _tmp_specific_error_file.log + + python3 src/fastrtps/.github/workflows/utils/log_parser.py \ + --log-file log/latest_test/fastrtps/stdout_stderr.log \ + --specific-error-file _tmp_specific_error_file.log \ + --output-file $GITHUB_STEP_SUMMARY \ + --sanitizer asan + + asan_discovery_server_test: + if: ${{ ( + !contains(github.event.pull_request.labels.*.name, 'skip-ci') && + !contains(github.event.pull_request.labels.*.name, 'no-test') && + !contains(github.event.pull_request.labels.*.name, 'conflicts') && + (inputs.run_asan_discovery_server == true) + ) }} + needs: asan_fastdds_build + runs-on: ubuntu-22.04 + steps: + - name: Download build artifacts + uses: eProsima/eProsima-CI/external/download-artifact@v0 + with: + name: build_artifacts_fastdds_asan_${{ inputs.label }} + path: ${{ github.workspace }} + + # https://github.com/actions/runner-images/issues/9491 + - name: Fix kernel mmap rnd bits + run: sudo sysctl vm.mmap_rnd_bits=28 + + - name: Get minimum supported version of CMake + uses: eProsima/eProsima-CI/external/get-cmake@v0 + with: + cmakeVersion: '3.22.6' + + - name: Install apt packages + uses: eProsima/eProsima-CI/ubuntu/install_apt_packages@v0 + with: + packages: curl grep libasio-dev libtinyxml2-dev python3 python3-pip software-properties-common wget + + - name: Install colcon + uses: eProsima/eProsima-CI/ubuntu/install_colcon@v0 + + - name: Install Python dependencies + uses: eProsima/eProsima-CI/ubuntu/install_python_packages@v0 + with: + packages: vcstool setuptools gcovr tomark xmltodict jsondiff pandas + + - name: Setup CCache + uses: eProsima/eProsima-CI/external/setup-ccache-action@v0 + + - name: Get Discovery Server branch + id: get_discovery_server_branch + uses: eProsima/eProsima-CI/ubuntu/get_related_branch_from_repo@v0 + with: + remote_repository: eProsima/Discovery-Server + fallback_branch: ${{ inputs.discovery_server_ref }} + + - name: Download Discovery Server repo + uses: eProsima/eProsima-CI/external/checkout@v0 + with: + repository: eProsima/Discovery-Server + path: src/discovery-server + ref: ${{ steps.get_discovery_server_branch.outputs.deduced_branch }} + + - name: Show .meta file + id: show_meta + run: | + cat ${{ github.workspace }}/src/fastrtps/.github/workflows/config/asan_colcon.meta + + - name: Colcon build + continue-on-error: false + uses: eProsima/eProsima-CI/multiplatform/colcon_build@v0 + with: + colcon_meta_file: ${{ github.workspace }}/src/fastrtps/.github/workflows/config/asan_colcon.meta + colcon_build_args: ${{ inputs.colcon_build_args }} + cmake_args: ${{ inputs.cmake_args }} + cmake_args_default: '' + cmake_build_type: 'Debug' + workspace: ${{ github.workspace }} + workspace_dependencies: '' + + - name: Colcon test + if: ${{ inputs.run_asan_fastdds }} + id: test + continue-on-error: true + uses: eProsima/eProsima-CI/multiplatform/colcon_test@v0 + with: + colcon_test_args: ${{ inputs.colcon_test_args }} + colcon_test_args_default: '--event-handlers=console_direct+ --return-code-on-test-failure' + ctest_args: ${{ inputs.ctest_args }} + ctest_args_default: '' + packages_names: discovery-server + workspace: ${{ github.workspace }} + workspace_dependencies: '' + test_report_artifact: ${{ format('test_report_{0}_{1}', inputs.label, github.job) }} + + - name: Report sanitizer errors + if: ${{ inputs.run_asan_discovery_server }} + run: | + bash src/fastrtps/.github/workflows/utils/specific_errors_filter.sh \ + "==ERROR:" \ + log/latest_test/discovery-server/stdout_stderr.log \ + _tmp_specific_error_file.log + + python3 src/fastrtps/.github/workflows/utils/log_parser.py \ + --log-file log/latest_test/discovery-server/stdout_stderr.log \ + --specific-error-file _tmp_specific_error_file.log \ + --output-file $GITHUB_STEP_SUMMARY \ + --sanitizer=asan + + tsan_fastdds_test: + if: ${{ ( + !contains(github.event.pull_request.labels.*.name, 'skip-ci') && + !contains(github.event.pull_request.labels.*.name, 'no-test') && + !contains(github.event.pull_request.labels.*.name, 'conflicts') && + (inputs.run_tsan_fastdds == true) + ) }} + runs-on: ubuntu-22.04 + env: + TSAN_OPTIONS: second_deadlock_stack=1 history_size=7 memory_limit_mb=5000 + # GCC 11.3 (Ubuntu Jammy default) produces several false positives regarding timed synchronization protocols + # These issues were fixed in GCC 12 so we upgrade to that version. + CC: gcc-12 + CXX: g++-12 + steps: + - name: Add ci-pending label if PR + if: ${{ github.event_name == 'pull_request' }} + uses: eProsima/eProsima-CI/external/add_labels@v0 + with: + labels: ci-pending + number: ${{ github.event.number }} + repo: eProsima/Fast-DDS + + # https://github.com/actions/runner-images/issues/9491 + - name: Fix kernel mmap rnd bits + run: sudo sysctl vm.mmap_rnd_bits=28 + + - name: Sync eProsima/Fast-DDS repository + uses: eProsima/eProsima-CI/external/checkout@v0 + with: + path: src/fastrtps + ref: ${{ inputs.fastdds_ref }} + + - name: Get minimum supported version of CMake + uses: eProsima/eProsima-CI/external/get-cmake@v0 + with: + cmakeVersion: '3.22.6' + + - name: Install apt packages + uses: eProsima/eProsima-CI/ubuntu/install_apt_packages@v0 + with: + packages: curl grep libasio-dev libtinyxml2-dev python3 python3-pip software-properties-common wget + + - name: Install colcon + uses: eProsima/eProsima-CI/ubuntu/install_colcon@v0 + + - name: Install Python dependencies + uses: eProsima/eProsima-CI/ubuntu/install_python_packages@v0 + with: + packages: vcstool setuptools gcovr tomark xmltodict jsondiff pandas + + - name: Setup CCache + uses: eProsima/eProsima-CI/external/setup-ccache-action@v0 + + - name: Fetch Fast DDS dependencies + uses: eProsima/eProsima-CI/multiplatform/vcs_import@v0 + with: + vcs_repos_file: ${{ github.workspace }}/src/fastrtps/fastrtps.repos + destination_workspace: src + skip_existing: 'true' + + - name: Fetch Fast DDS CI dependencies + uses: eProsima/eProsima-CI/multiplatform/vcs_import@v0 + with: + vcs_repos_file: ${{ github.workspace }}/src/fastrtps/.github/workflows/config/ci.repos + destination_workspace: src + skip_existing: 'true' + + - name: Show .meta file + id: show_meta + run: | + cat ${{ github.workspace }}/src/fastrtps/.github/workflows/config/tsan_colcon.meta + + - name: Colcon build + continue-on-error: false + uses: eProsima/eProsima-CI/multiplatform/colcon_build@v0 + with: + colcon_meta_file: ${{ github.workspace }}/src/fastrtps/.github/workflows/config/tsan_colcon.meta + colcon_build_args: ${{ inputs.colcon_build_args }} + cmake_args: ${{ inputs.cmake_args }} + cmake_args_default: '' + cmake_build_type: 'Debug' + workspace: ${{ github.workspace }} + workspace_dependencies: '' + + - name: Colcon test + if: ${{ inputs.run_asan_fastdds }} + id: test + continue-on-error: true + uses: eProsima/eProsima-CI/multiplatform/colcon_test@v0 + with: + colcon_test_args: ${{ inputs.colcon_test_args }} + colcon_test_args_default: '--event-handlers=console_direct+ --return-code-on-test-failure' + ctest_args: ${{ inputs.ctest_args }} + ctest_args_default: '--timeout 300 --label-exclude "xfail" -V -E DDSSQLFilterValueTests' + packages_names: fastrtps + workspace: ${{ github.workspace }} + workspace_dependencies: '' + test_report_artifact: ${{ format('test_report_{0}_{1}', inputs.label, github.job) }} + + - name: Process sanitizer reports + id: report_summary + shell: pwsh + continue-on-error: true + run: | + # Create a dir for the exports + $exports = New-Item -ItemType Directory -Path ./exports + # Move to the reports dir + pushd ./log/latest_test/fastrtps + # Install the report parser module + Find-Module -Repository PSGallery -Name SanReportParser | Install-Module -Scope CurrentUser -Force + # Parse the report files + $rp = Show-Tsan -Path ./stdout_stderr.log + # filter duplicates + $rp = $rp | group md5hash | % { $_.group[0] } + # Export raw data + $rp | Export-CliXML (Join-Path $exports all_reports.xml) + # Group the reports by issue + $g = $rp | group fuzzhash + # Split up deadlocks and race reports + $gd = $rp | ? type -match dead | group fuzzhash + $gr = $rp | ? type -match race | group fuzzhash + # Simplified deadlock summary (only one representative report and tests associated) + $sd = $gd | Sort-Object count -desc | select @{l="fuzzhash";e="name"}, count, ` + @{l="échantillon";e={$_.group[0].report}}, @{l="tests"; ` + e={$_.group.file | sls "(.*)\.\d+$" | % { $_.Matches.Groups[1].Value } | Sort-Object | get-unique}} + # Simplified race summary (only one representative report and tests associated) + $sr = $gr | Sort-Object count -desc | select @{l="fuzzhash";e="name"}, count, ` + @{l="échantillon";e={$_.group[0].report}}, @{l="tests"; ` + e={$_.group.file | sls "(.*)\.\d+$" | % { $_.Matches.Groups[1].Value } | Sort-Object | get-unique}} + # Export simplified summaries + $sd, $sr | Export-Clixml (Join-Path $exports summary_data.xml) + # Export CSV summary of frequencies + $sd | select fuzzhash, count | Export-CSV -Path (Join-Path $exports deadlocks.csv) + $sr | select fuzzhash, count | Export-CSV -Path (Join-Path $exports races.csv) + # Export test mappings + & {$sd; $sr} | Sort-Object { [int]$_.fuzzhash} | % { $fuzzy=$_.fuzzhash;$_.tests | + select @{l="fuzzhash";e={$fuzzy}}, @{l="test";e={$_}}} | + Export-Csv (Join-Path $exports issue_test_map.csv) + # Keep a file per issue + $dir = New-Item -ItemType Directory -Path (Join-Path $exports reports) + & {$sd; $sr} | % { $_.échantillon | Out-File (Join-Path $dir "$($_.fuzzhash).tsan") } + # Create a summary table + @{Type="Deadlock";Failed=$sd.count;Hashes=$sd.fuzzhash}, + @{Type="Data race";Failed=$sr.count;Hashes=$sr.fuzzhash} | + % { $_.Summary = $_.Hashes | select -First 5 | Join-String -Separator ", " + if ($_.Hashes.count -gt 5 ) { + $_.Summary += ", ..." }; $_ } | + % { [PSCustomObject]$_} | + New-MDTable -Columns ([ordered]@{Failed=$null;Type=$null;Summary=$null}) | + Out-File $Env:GITHUB_STEP_SUMMARY + # The step fails on new deadlocks + $LASTEXITCODE=$sd.count + + - name: Check on failures + if: ${{ steps.report_summary.outcome == 'failure' }} + shell: pwsh + run: | + Write-Host ${{ steps.report_summary.outcome }} + exit 1 diff --git a/.github/workflows/sanitizers-ci.yaml b/.github/workflows/sanitizers-ci.yaml index f8e7dffcf4c..fb7d60d3324 100644 --- a/.github/workflows/sanitizers-ci.yaml +++ b/.github/workflows/sanitizers-ci.yaml @@ -1,4 +1,4 @@ -name: Fast DDS Sanitizers Analysis +name: Fast DDS Sanitizers CI on: workflow_dispatch: @@ -50,469 +50,26 @@ on: - '**.txt' - '!**/CMakeLists.txt' - schedule: - - cron: '0 1 * * *' - concurrency: group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} cancel-in-progress: true -env: - label: ${{ inputs.label || 'fastdds-sanitizers-ci' }} - build_asan_fastdds: ${{ - inputs.run_asan_fastdds || - github.event_name == 'schedule' || - github.event_name == 'pull_request' }} - run_asan_fastdds: ${{ inputs.run_asan_fastdds || - github.event_name == 'schedule' || - github.event_name == 'pull_request' }} - run_asan_discovery_server: ${{ inputs.run_asan_discovery_server || - github.event_name == 'schedule' || - github.event_name == 'pull_request' }} - run_tsan_fastdds: ${{ inputs.run_tsan_fastdds || - github.event_name == 'schedule' || - github.event_name == 'pull_request' }} - colcon_build_args: ${{ inputs.colcon_build_args || '' }} - colcon_test_args: ${{ inputs.colcon_test_args || '' }} - cmake_args: ${{ inputs.cmake_args || '' }} - ctest_args: ${{ inputs.ctest_args || '' }} - fastdds_ref: ${{ inputs.fastdds_ref || github.ref || 'master' }} - discovery_server_ref: ${{ inputs.discovery_server_ref }} - jobs: - asan_fastdds_build: + sanitizers-ci: if: ${{ ( - !contains(github.event.pull_request.labels.*.name, 'skip-ci') && - !contains(github.event.pull_request.labels.*.name, 'no-test') && - !contains(github.event.pull_request.labels.*.name, 'conflicts') && - ( - (inputs.run_asan_fastdds == true) || - contains(fromJSON('["schedule", "pull_request"]'), github.event_name) - ) - ) }} - runs-on: ubuntu-22.04 - steps: - - name: Add ci-pending label if PR - if: ${{ github.event_name == 'pull_request' }} - uses: eProsima/eProsima-CI/external/add_labels@v0 - with: - labels: ci-pending - number: ${{ github.event.number }} - repo: eProsima/Fast-DDS - - # https://github.com/actions/runner-images/issues/9491 - - name: Fix kernel mmap rnd bits - run: sudo sysctl vm.mmap_rnd_bits=28 - - - name: Sync eProsima/Fast-DDS repository - uses: eProsima/eProsima-CI/external/checkout@v0 - with: - path: src/fastrtps - ref: ${{ env.fastdds_ref }} - - - name: Get minimum supported version of CMake - uses: eProsima/eProsima-CI/external/get-cmake@v0 - with: - cmakeVersion: '3.22.6' - - - name: Install apt packages - uses: eProsima/eProsima-CI/ubuntu/install_apt_packages@v0 - with: - packages: curl grep libasio-dev libtinyxml2-dev python3 python3-pip software-properties-common wget - - - name: Install colcon - uses: eProsima/eProsima-CI/ubuntu/install_colcon@v0 - - - name: Install Python dependencies - uses: eProsima/eProsima-CI/ubuntu/install_python_packages@v0 - with: - packages: vcstool xmlschema - - - name: Setup CCache - uses: eProsima/eProsima-CI/external/setup-ccache-action@v0 - - - name: Fetch Fast DDS dependencies - uses: eProsima/eProsima-CI/multiplatform/vcs_import@v0 - with: - vcs_repos_file: ${{ github.workspace }}/src/fastrtps/fastrtps.repos - destination_workspace: src - skip_existing: 'true' - - - name: Fetch Fast DDS CI dependencies - uses: eProsima/eProsima-CI/multiplatform/vcs_import@v0 - with: - vcs_repos_file: ${{ github.workspace }}/src/fastrtps/.github/workflows/config/asan.repos - destination_workspace: src - skip_existing: 'true' - - - name: Show .meta file - id: show_meta - run: | - cat ${{ github.workspace }}/src/fastrtps/.github/workflows/config/asan_colcon.meta - - - name: Colcon build - continue-on-error: false - uses: eProsima/eProsima-CI/multiplatform/colcon_build@v0 - with: - colcon_meta_file: ${{ github.workspace }}/src/fastrtps/.github/workflows/config/asan_colcon.meta - colcon_build_args: ${{ env.colcon_build_args }} - cmake_args: ${{ env.cmake_args }} - cmake_args_default: '' - cmake_build_type: 'Debug' - workspace: ${{ github.workspace }} - workspace_dependencies: '' - - - name: Upload build artifacts - uses: eProsima/eProsima-CI/external/upload-artifact@v0 - with: - name: build_artifacts_fastdds_asan_${{ env.label }} - path: ${{ github.workspace }} - - asan_fastdds_test: - needs: asan_fastdds_build - runs-on: ubuntu-22.04 - steps: - - name: Download build artifacts - uses: eProsima/eProsima-CI/external/download-artifact@v0 - with: - name: build_artifacts_fastdds_asan_${{ env.label }} - path: ${{ github.workspace }} - - # https://github.com/actions/runner-images/issues/9491 - - name: Fix kernel mmap rnd bits - run: sudo sysctl vm.mmap_rnd_bits=28 - - - name: Get minimum supported version of CMake - uses: eProsima/eProsima-CI/external/get-cmake@v0 - with: - cmakeVersion: '3.22.6' - - - name: Install apt packages - uses: eProsima/eProsima-CI/ubuntu/install_apt_packages@v0 - with: - packages: curl grep libasio-dev libtinyxml2-dev python3 python3-pip software-properties-common wget - - - name: Install colcon - uses: eProsima/eProsima-CI/ubuntu/install_colcon@v0 - - - name: Install Python dependencies - uses: eProsima/eProsima-CI/ubuntu/install_python_packages@v0 - with: - packages: vcstool xmlschema - - - name: Setup CCache - uses: eProsima/eProsima-CI/external/setup-ccache-action@v0 - - - name: Show .meta file - id: show_meta - run: | - cat ${{ github.workspace }}/src/fastrtps/.github/workflows/config/asan_colcon.meta - - - name: Colcon build - continue-on-error: false - uses: eProsima/eProsima-CI/multiplatform/colcon_build@v0 - with: - colcon_meta_file: ${{ github.workspace }}/src/fastrtps/.github/workflows/config/asan_colcon.meta - colcon_build_args: ${{ env.colcon_build_args }} - cmake_args: ${{ env.cmake_args }} - cmake_args_default: -DEPROSIMA_BUILD_TESTS=ON -DRTPS_API_TESTS=ON -DFASTRTPS_API_TESTS=ON -DFASTDDS_PIM_API_TESTS=ON -DPERFORMANCE_TESTS=ON - cmake_build_type: 'Debug' - workspace: ${{ github.workspace }} - workspace_dependencies: '' - - - name: Colcon test - if: ${{ env.run_asan_fastdds }} - id: test - continue-on-error: true - uses: eProsima/eProsima-CI/multiplatform/colcon_test@v0 - with: - colcon_test_args: ${{ env.colcon_test_args }} - colcon_test_args_default: '--event-handlers=console_direct+ --return-code-on-test-failure' - ctest_args: ${{ env.ctest_args }} - ctest_args_default: '--timeout 300 --label-exclude "xfail"' - packages_names: fastrtps - workspace: ${{ github.workspace }} - workspace_dependencies: '' - test_report_artifact: ${{ format('test_report_{0}_{1}', env.label, github.job) }} - - - name: Report sanitizer errors - if: ${{ env.run_asan_fastdds }} - run: | - bash src/fastrtps/.github/workflows/utils/specific_errors_filter.sh \ - "==ERROR:" \ - log/latest_test/fastrtps/stdout_stderr.log \ - _tmp_specific_error_file.log - - python3 src/fastrtps/.github/workflows/utils/log_parser.py \ - --log-file log/latest_test/fastrtps/stdout_stderr.log \ - --specific-error-file _tmp_specific_error_file.log \ - --output-file $GITHUB_STEP_SUMMARY \ - --sanitizer asan - - asan_discovery_server_test: - if: ${{ ( - !contains(github.event.pull_request.labels.*.name, 'skip-ci') && - !contains(github.event.pull_request.labels.*.name, 'no-test') && - !contains(github.event.pull_request.labels.*.name, 'conflicts') && - ( - (inputs.run_asan_discovery_server == true) || - contains(fromJSON('["schedule", "pull_request"]'), github.event_name) - ) - ) }} - needs: asan_fastdds_build - runs-on: ubuntu-22.04 - steps: - - name: Download build artifacts - uses: eProsima/eProsima-CI/external/download-artifact@v0 - with: - name: build_artifacts_fastdds_asan_${{ env.label }} - path: ${{ github.workspace }} - - # https://github.com/actions/runner-images/issues/9491 - - name: Fix kernel mmap rnd bits - run: sudo sysctl vm.mmap_rnd_bits=28 - - - name: Get minimum supported version of CMake - uses: eProsima/eProsima-CI/external/get-cmake@v0 - with: - cmakeVersion: '3.22.6' - - - name: Install apt packages - uses: eProsima/eProsima-CI/ubuntu/install_apt_packages@v0 - with: - packages: curl grep libasio-dev libtinyxml2-dev python3 python3-pip software-properties-common wget - - - name: Install colcon - uses: eProsima/eProsima-CI/ubuntu/install_colcon@v0 - - - name: Install Python dependencies - uses: eProsima/eProsima-CI/ubuntu/install_python_packages@v0 - with: - packages: vcstool setuptools gcovr tomark xmltodict jsondiff pandas - - - name: Setup CCache - uses: eProsima/eProsima-CI/external/setup-ccache-action@v0 - - - name: Get Discovery Server branch - id: get_discovery_server_branch - uses: eProsima/eProsima-CI/ubuntu/get_related_branch_from_repo@v0 - with: - remote_repository: eProsima/Discovery-Server - fallback_branch: ${{ env.discovery_server_ref || 'master' }} - - - name: Download Discovery Server repo - uses: eProsima/eProsima-CI/external/checkout@v0 - with: - repository: eProsima/Discovery-Server - path: src/discovery-server - ref: ${{ steps.get_discovery_server_branch.outputs.deduced_branch }} - - - name: Show .meta file - id: show_meta - run: | - cat ${{ github.workspace }}/src/fastrtps/.github/workflows/config/asan_colcon.meta - - - name: Colcon build - continue-on-error: false - uses: eProsima/eProsima-CI/multiplatform/colcon_build@v0 - with: - colcon_meta_file: ${{ github.workspace }}/src/fastrtps/.github/workflows/config/asan_colcon.meta - colcon_build_args: ${{ env.colcon_build_args }} - cmake_args: ${{ env.cmake_args }} - cmake_args_default: '' - cmake_build_type: 'Debug' - workspace: ${{ github.workspace }} - workspace_dependencies: '' - - - name: Colcon test - if: ${{ env.run_asan_fastdds }} - id: test - continue-on-error: true - uses: eProsima/eProsima-CI/multiplatform/colcon_test@v0 - with: - colcon_test_args: ${{ env.colcon_test_args }} - colcon_test_args_default: '--event-handlers=console_direct+ --return-code-on-test-failure' - ctest_args: ${{ env.ctest_args }} - ctest_args_default: '' - packages_names: discovery-server - workspace: ${{ github.workspace }} - workspace_dependencies: '' - test_report_artifact: ${{ format('test_report_{0}_{1}', env.label, github.job) }} - - - name: Report sanitizer errors - if: ${{ env.run_asan_discovery_server }} - run: | - bash src/fastrtps/.github/workflows/utils/specific_errors_filter.sh \ - "==ERROR:" \ - log/latest_test/discovery-server/stdout_stderr.log \ - _tmp_specific_error_file.log - - python3 src/fastrtps/.github/workflows/utils/log_parser.py \ - --log-file log/latest_test/discovery-server/stdout_stderr.log \ - --specific-error-file _tmp_specific_error_file.log \ - --output-file $GITHUB_STEP_SUMMARY \ - --sanitizer=asan - - tsan_fastdds_test: - if: ${{ ( - !contains(github.event.pull_request.labels.*.name, 'skip-ci') && - !contains(github.event.pull_request.labels.*.name, 'no-test') && - !contains(github.event.pull_request.labels.*.name, 'conflicts') && - ( - (inputs.run_tsan_fastdds == true) || - contains(fromJSON('["schedule", "pull_request"]'), github.event_name) - ) - ) }} - runs-on: ubuntu-22.04 - env: - TSAN_OPTIONS: second_deadlock_stack=1 history_size=7 memory_limit_mb=5000 - # GCC 11.3 (Ubuntu Jammy default) produces several false positives regarding timed synchronization protocols - # These issues were fixed in GCC 12 so we upgrade to that version. - CC: gcc-12 - CXX: g++-12 - steps: - - name: Add ci-pending label if PR - if: ${{ github.event_name == 'pull_request' }} - uses: eProsima/eProsima-CI/external/add_labels@v0 - with: - labels: ci-pending - number: ${{ github.event.number }} - repo: eProsima/Fast-DDS - - # https://github.com/actions/runner-images/issues/9491 - - name: Fix kernel mmap rnd bits - run: sudo sysctl vm.mmap_rnd_bits=28 - - - name: Sync eProsima/Fast-DDS repository - uses: eProsima/eProsima-CI/external/checkout@v0 - with: - path: src/fastrtps - ref: ${{ env.fastdds_ref }} - - - name: Get minimum supported version of CMake - uses: eProsima/eProsima-CI/external/get-cmake@v0 - with: - cmakeVersion: '3.22.6' - - - name: Install apt packages - uses: eProsima/eProsima-CI/ubuntu/install_apt_packages@v0 - with: - packages: curl grep libasio-dev libtinyxml2-dev python3 python3-pip software-properties-common wget - - - name: Install colcon - uses: eProsima/eProsima-CI/ubuntu/install_colcon@v0 - - - name: Install Python dependencies - uses: eProsima/eProsima-CI/ubuntu/install_python_packages@v0 - with: - packages: vcstool setuptools gcovr tomark xmltodict jsondiff pandas - - - name: Setup CCache - uses: eProsima/eProsima-CI/external/setup-ccache-action@v0 - - - name: Fetch Fast DDS dependencies - uses: eProsima/eProsima-CI/multiplatform/vcs_import@v0 - with: - vcs_repos_file: ${{ github.workspace }}/src/fastrtps/fastrtps.repos - destination_workspace: src - skip_existing: 'true' - - - name: Fetch Fast DDS CI dependencies - uses: eProsima/eProsima-CI/multiplatform/vcs_import@v0 - with: - vcs_repos_file: ${{ github.workspace }}/src/fastrtps/.github/workflows/config/ci.repos - destination_workspace: src - skip_existing: 'true' - - - name: Show .meta file - id: show_meta - run: | - cat ${{ github.workspace }}/src/fastrtps/.github/workflows/config/tsan_colcon.meta - - - name: Colcon build - continue-on-error: false - uses: eProsima/eProsima-CI/multiplatform/colcon_build@v0 - with: - colcon_meta_file: ${{ github.workspace }}/src/fastrtps/.github/workflows/config/tsan_colcon.meta - colcon_build_args: ${{ env.colcon_build_args }} - cmake_args: ${{ env.cmake_args }} - cmake_args_default: '' - cmake_build_type: 'Debug' - workspace: ${{ github.workspace }} - workspace_dependencies: '' - - - name: Colcon test - if: ${{ env.run_asan_fastdds }} - id: test - continue-on-error: true - uses: eProsima/eProsima-CI/multiplatform/colcon_test@v0 - with: - colcon_test_args: ${{ env.colcon_test_args }} - colcon_test_args_default: '--event-handlers=console_direct+ --return-code-on-test-failure' - ctest_args: ${{ env.ctest_args }} - ctest_args_default: '--timeout 300 --label-exclude "xfail" -V -E DDSSQLFilterValueTests' - packages_names: fastrtps - workspace: ${{ github.workspace }} - workspace_dependencies: '' - test_report_artifact: ${{ format('test_report_{0}_{1}', env.label, github.job) }} - - - name: Process sanitizer reports - id: report_summary - shell: pwsh - continue-on-error: true - run: | - # Create a dir for the exports - $exports = New-Item -ItemType Directory -Path ./exports - # Move to the reports dir - pushd ./log/latest_test/fastrtps - # Install the report parser module - Find-Module -Repository PSGallery -Name SanReportParser | Install-Module -Scope CurrentUser -Force - # Parse the report files - $rp = Show-Tsan -Path ./stdout_stderr.log - # filter duplicates - $rp = $rp | group md5hash | % { $_.group[0] } - # Export raw data - $rp | Export-CliXML (Join-Path $exports all_reports.xml) - # Group the reports by issue - $g = $rp | group fuzzhash - # Split up deadlocks and race reports - $gd = $rp | ? type -match dead | group fuzzhash - $gr = $rp | ? type -match race | group fuzzhash - # Simplified deadlock summary (only one representative report and tests associated) - $sd = $gd | Sort-Object count -desc | select @{l="fuzzhash";e="name"}, count, ` - @{l="échantillon";e={$_.group[0].report}}, @{l="tests"; ` - e={$_.group.file | sls "(.*)\.\d+$" | % { $_.Matches.Groups[1].Value } | Sort-Object | get-unique}} - # Simplified race summary (only one representative report and tests associated) - $sr = $gr | Sort-Object count -desc | select @{l="fuzzhash";e="name"}, count, ` - @{l="échantillon";e={$_.group[0].report}}, @{l="tests"; ` - e={$_.group.file | sls "(.*)\.\d+$" | % { $_.Matches.Groups[1].Value } | Sort-Object | get-unique}} - # Export simplified summaries - $sd, $sr | Export-Clixml (Join-Path $exports summary_data.xml) - # Export CSV summary of frequencies - $sd | select fuzzhash, count | Export-CSV -Path (Join-Path $exports deadlocks.csv) - $sr | select fuzzhash, count | Export-CSV -Path (Join-Path $exports races.csv) - # Export test mappings - & {$sd; $sr} | Sort-Object { [int]$_.fuzzhash} | % { $fuzzy=$_.fuzzhash;$_.tests | - select @{l="fuzzhash";e={$fuzzy}}, @{l="test";e={$_}}} | - Export-Csv (Join-Path $exports issue_test_map.csv) - # Keep a file per issue - $dir = New-Item -ItemType Directory -Path (Join-Path $exports reports) - & {$sd; $sr} | % { $_.échantillon | Out-File (Join-Path $dir "$($_.fuzzhash).tsan") } - # Create a summary table - @{Type="Deadlock";Failed=$sd.count;Hashes=$sd.fuzzhash}, - @{Type="Data race";Failed=$sr.count;Hashes=$sr.fuzzhash} | - % { $_.Summary = $_.Hashes | select -First 5 | Join-String -Separator ", " - if ($_.Hashes.count -gt 5 ) { - $_.Summary += ", ..." }; $_ } | - % { [PSCustomObject]$_} | - New-MDTable -Columns ([ordered]@{Failed=$null;Type=$null;Summary=$null}) | - Out-File $Env:GITHUB_STEP_SUMMARY - # The step fails on new deadlocks - $LASTEXITCODE=$sd.count - - - name: Check on failures - if: ${{ steps.report_summary.outcome == 'failure' }} - shell: pwsh - run: | - Write-Host ${{ steps.report_summary.outcome }} - exit 1 + !contains(github.event.pull_request.labels.*.name, 'skip-ci') && + !contains(github.event.pull_request.labels.*.name, 'no-test') && + !contains(github.event.pull_request.labels.*.name, 'conflicts') + ) }} + uses: ./.github/workflows/reusable-sanitizers-ci.yaml + with: + label: ${{ inputs.label || 'fastdds-sanitizers-ci' }} + run_asan_fastdds: ${{ inputs.run_asan_fastdds || github.event_name == 'pull_request' }} + run_asan_discovery_server: ${{ inputs.run_asan_discovery_server || github.event_name == 'pull_request' }} + run_tsan_fastdds: ${{ inputs.run_tsan_fastdds || github.event_name == 'pull_request' }} + colcon_build_args: ${{ inputs.colcon_build_args || '' }} + colcon_test_args: ${{ inputs.colcon_test_args || '' }} + cmake_args: ${{ inputs.cmake_args || '' }} + ctest_args: ${{ inputs.ctest_args || '' }} + fastdds_ref: ${{ inputs.fastdds_ref || github.ref || 'master' }} + discovery_server_ref: ${{ inputs.discovery_server_ref || 'master' }} \ No newline at end of file From 3c5baf414120e1d293d197380e61a510f0f30218 Mon Sep 17 00:00:00 2001 From: eduponz Date: Sat, 6 Apr 2024 10:34:14 +0200 Subject: [PATCH 06/12] Refs #20542: Add nightly sanitizer CI for all supported branches Signed-off-by: eduponz --- .github/workflows/nightly-sanitizers-ci.yaml | 77 ++++++++++++++++++++ 1 file changed, 77 insertions(+) create mode 100644 .github/workflows/nightly-sanitizers-ci.yaml diff --git a/.github/workflows/nightly-sanitizers-ci.yaml b/.github/workflows/nightly-sanitizers-ci.yaml new file mode 100644 index 00000000000..3789faa663a --- /dev/null +++ b/.github/workflows/nightly-sanitizers-ci.yaml @@ -0,0 +1,77 @@ +name: Fast DDS Sanitizers CI + +on: + workflow_dispatch: + schedule: + - cron: '0 1 * * *' + +jobs: + nightly-sanitizers-ci-master: + uses: ./.github/workflows/reusable-sanitizers-ci.yaml + with: + label: 'nightly-sec-sanitizers-ci-master' + run_asan_fastdds: true + run_asan_discovery_server: true + run_tsan_fastdds: true + colcon_build_args: '' + colcon_test_args: '' + cmake_args: '' + ctest_args: '' + fastdds_ref: 'master' + discovery_server_ref: 'master' + + nightly-sanitizers-ci-2_13_x: + uses: ./.github/workflows/reusable-sanitizers-ci.yaml + with: + label: 'nightly-sec-sanitizers-ci-2.13.x' + run_asan_fastdds: true + run_asan_discovery_server: true + run_tsan_fastdds: true + colcon_build_args: '' + colcon_test_args: '' + cmake_args: '' + ctest_args: '' + fastdds_ref: '2.13.x' + discovery_server_ref: 'master' + + nightly-sanitizers-ci-2_10_x: + uses: ./.github/workflows/reusable-sanitizers-ci.yaml + with: + label: 'nightly-sec-sanitizers-ci-2.10.x' + run_asan_fastdds: true + run_asan_discovery_server: true + run_tsan_fastdds: true + colcon_build_args: '' + colcon_test_args: '' + cmake_args: '' + ctest_args: '' + fastdds_ref: '2.10.x' + discovery_server_ref: 'v1.2.1' + + nightly-sanitizers-ci-2_6_x: + uses: ./.github/workflows/reusable-sanitizers-ci.yaml + with: + label: 'nightly-sec-sanitizers-ci-2.6.x' + run_asan_fastdds: true + run_asan_discovery_server: true + run_tsan_fastdds: true + colcon_build_args: '' + colcon_test_args: '' + cmake_args: '' + ctest_args: '' + fastdds_ref: '2.6.x' + discovery_server_ref: 'v1.2.1' + + nightly-sanitizers-ci-3_0_x-devel: + uses: ./.github/workflows/reusable-sanitizers-ci.yaml + with: + label: 'nightly-sec-sanitizers-ci-3.0.x-devel' + run_asan_fastdds: true + run_asan_discovery_server: true + run_tsan_fastdds: true + colcon_build_args: '' + colcon_test_args: '' + cmake_args: '' + ctest_args: '' + fastdds_ref: '3.0.x-devel' + discovery_server_ref: '3.0.x-devel' From e0cfc6f023463013d62cb1ef073005c83f21aa1d Mon Sep 17 00:00:00 2001 From: eduponz Date: Sat, 6 Apr 2024 10:35:34 +0200 Subject: [PATCH 07/12] Refs #20542: Change extension to .yml Signed-off-by: eduponz --- ...ly-sanitizers-ci.yaml => nightly-sanitizers-ci.yml} | 10 +++++----- ...e-sanitizers-ci.yaml => reusable-sanitizers-ci.yml} | 0 .../{sanitizers-ci.yaml => sanitizers-ci.yml} | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) rename .github/workflows/{nightly-sanitizers-ci.yaml => nightly-sanitizers-ci.yml} (86%) rename .github/workflows/{reusable-sanitizers-ci.yaml => reusable-sanitizers-ci.yml} (100%) rename .github/workflows/{sanitizers-ci.yaml => sanitizers-ci.yml} (97%) diff --git a/.github/workflows/nightly-sanitizers-ci.yaml b/.github/workflows/nightly-sanitizers-ci.yml similarity index 86% rename from .github/workflows/nightly-sanitizers-ci.yaml rename to .github/workflows/nightly-sanitizers-ci.yml index 3789faa663a..c9b19bf01f9 100644 --- a/.github/workflows/nightly-sanitizers-ci.yaml +++ b/.github/workflows/nightly-sanitizers-ci.yml @@ -7,7 +7,7 @@ on: jobs: nightly-sanitizers-ci-master: - uses: ./.github/workflows/reusable-sanitizers-ci.yaml + uses: ./.github/workflows/reusable-sanitizers-ci.yml with: label: 'nightly-sec-sanitizers-ci-master' run_asan_fastdds: true @@ -21,7 +21,7 @@ jobs: discovery_server_ref: 'master' nightly-sanitizers-ci-2_13_x: - uses: ./.github/workflows/reusable-sanitizers-ci.yaml + uses: ./.github/workflows/reusable-sanitizers-ci.yml with: label: 'nightly-sec-sanitizers-ci-2.13.x' run_asan_fastdds: true @@ -35,7 +35,7 @@ jobs: discovery_server_ref: 'master' nightly-sanitizers-ci-2_10_x: - uses: ./.github/workflows/reusable-sanitizers-ci.yaml + uses: ./.github/workflows/reusable-sanitizers-ci.yml with: label: 'nightly-sec-sanitizers-ci-2.10.x' run_asan_fastdds: true @@ -49,7 +49,7 @@ jobs: discovery_server_ref: 'v1.2.1' nightly-sanitizers-ci-2_6_x: - uses: ./.github/workflows/reusable-sanitizers-ci.yaml + uses: ./.github/workflows/reusable-sanitizers-ci.yml with: label: 'nightly-sec-sanitizers-ci-2.6.x' run_asan_fastdds: true @@ -63,7 +63,7 @@ jobs: discovery_server_ref: 'v1.2.1' nightly-sanitizers-ci-3_0_x-devel: - uses: ./.github/workflows/reusable-sanitizers-ci.yaml + uses: ./.github/workflows/reusable-sanitizers-ci.yml with: label: 'nightly-sec-sanitizers-ci-3.0.x-devel' run_asan_fastdds: true diff --git a/.github/workflows/reusable-sanitizers-ci.yaml b/.github/workflows/reusable-sanitizers-ci.yml similarity index 100% rename from .github/workflows/reusable-sanitizers-ci.yaml rename to .github/workflows/reusable-sanitizers-ci.yml diff --git a/.github/workflows/sanitizers-ci.yaml b/.github/workflows/sanitizers-ci.yml similarity index 97% rename from .github/workflows/sanitizers-ci.yaml rename to .github/workflows/sanitizers-ci.yml index fb7d60d3324..43820fca8f4 100644 --- a/.github/workflows/sanitizers-ci.yaml +++ b/.github/workflows/sanitizers-ci.yml @@ -61,7 +61,7 @@ jobs: !contains(github.event.pull_request.labels.*.name, 'no-test') && !contains(github.event.pull_request.labels.*.name, 'conflicts') ) }} - uses: ./.github/workflows/reusable-sanitizers-ci.yaml + uses: ./.github/workflows/reusable-sanitizers-ci.yml with: label: ${{ inputs.label || 'fastdds-sanitizers-ci' }} run_asan_fastdds: ${{ inputs.run_asan_fastdds || github.event_name == 'pull_request' }} From 52f33cd5ea4f692cb010e974778127a1b3ad89e3 Mon Sep 17 00:00:00 2001 From: eduponz Date: Sat, 6 Apr 2024 10:38:57 +0200 Subject: [PATCH 08/12] Refs #20542: Remove old workflows Signed-off-by: eduponz --- .github/workflows/address-sanitizers.yaml | 248 ---------------------- .github/workflows/thread-sanitizer.yaml | 206 ------------------ 2 files changed, 454 deletions(-) delete mode 100644 .github/workflows/address-sanitizers.yaml delete mode 100644 .github/workflows/thread-sanitizer.yaml diff --git a/.github/workflows/address-sanitizers.yaml b/.github/workflows/address-sanitizers.yaml deleted file mode 100644 index a4b311318fd..00000000000 --- a/.github/workflows/address-sanitizers.yaml +++ /dev/null @@ -1,248 +0,0 @@ -name: Address Sanitizer analysis - -on: - workflow_dispatch: - inputs: - discovery_server_branch: - description: 'Branch or tag of Discovery Server repository (https://github.com/eProsima/Discovery-Server)' - required: true - default: 'master' - fastdds_branch: - description: 'Branch or tag of Fast DDS repository (https://github.com/eProsima/Fast-DDS)' - required: true - default: 'master' - - pull_request: - types: - - review_requested - paths-ignore: - - '**.md' - - '**.txt' - - '!**/CMakeLists.txt' - - schedule: - - cron: '0 1 * * *' - -concurrency: - group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} - cancel-in-progress: true - -jobs: - asan-test: - - if: ${{ ( - !contains(github.event.pull_request.labels.*.name, 'skip-ci') && - !contains(github.event.pull_request.labels.*.name, 'no-test') && - !contains(github.event.pull_request.labels.*.name, 'conflicts') - ) }} - - runs-on: ubuntu-22.04 - - env: - FASTDDS_BRANCH: ${{ github.head_ref || github.event.inputs.fastdds_branch || 'master' }} - - steps: - - name: Add ci-pending label if PR - if: ${{ github.event_name == 'pull_request' }} - uses: eProsima/eProsima-CI/external/add_labels@v0 - with: - labels: ci-pending - number: ${{ github.event.number }} - repo: eProsima/Fast-DDS - - # https://github.com/actions/runner-images/issues/9491 - - name: Fix kernel mmap rnd bits - run: sudo sysctl vm.mmap_rnd_bits=28 - - - name: Install apt packages - uses: eProsima/eProsima-CI/ubuntu/install_apt_packages@v0 - with: - packages: curl grep libasio-dev libtinyxml2-dev python3 python3-pip software-properties-common wget - - - name: Get minimum supported version of CMake - uses: eProsima/eProsima-CI/external/get-cmake@v0 - with: - cmakeVersion: '3.22.6' - - - name: Setup CCache - uses: eProsima/eProsima-CI/external/setup-ccache-action@v0 - - - name: Install colcon - uses: eProsima/eProsima-CI/ubuntu/install_colcon@v0 - - - name: Install Python dependencies - uses: eProsima/eProsima-CI/ubuntu/install_python_packages@v0 - with: - packages: vcstool setuptools gcovr tomark xmltodict jsondiff pandas - - - name: Get fastrtps.repos file - uses: eProsima/eProsima-CI/ubuntu/get_file_from_repo@v0 - with: - source_repository: eProsima/Fast-DDS - source_repository_branch: ${{ env.FASTDDS_BRANCH }} - file_name: fastrtps.repos - file_result: fastrtps.repos - - - name: Fetch Fast DDS & dependencies - uses: eProsima/eProsima-CI/ubuntu/vcs_import@v0 - with: - vcs_repos_file: fastrtps.repos - destination_workspace: src - - - name: Checkout Fast DDS branch - run: | - cd ./src/fastrtps - git checkout ${{ env.FASTDDS_BRANCH }} - - - name: Fetch Fast DDS ASan dependencies - uses: eProsima/eProsima-CI/multiplatform/vcs_import@v0 - with: - vcs_repos_file: ${{ github.workspace }}/src/fastrtps/.github/workflows/config/asan.repos - destination_workspace: src - skip_existing: 'true' - - - name: Build workspace - run: | - cat src/fastrtps/.github/workflows/config/asan_colcon.meta - colcon build \ - --event-handlers=console_direct+ \ - --metas src/fastrtps/.github/workflows/config/asan_colcon.meta - - - name: Run tests Fast DDS - run: | - source install/setup.bash && \ - colcon test \ - --packages-select fastrtps \ - --event-handlers=console_direct+ \ - --return-code-on-test-failure \ - --ctest-args \ - --label-exclude xfail \ - --timeout 300 - continue-on-error: true - - - name: Upload Logs - uses: actions/upload-artifact@v1 - with: - name: asan-logs - path: log/ - if: always() - - - name: Report ASAN errors - if: always() - run: | - bash src/fastrtps/.github/workflows/utils/specific_errors_filter.sh "==ERROR:" log/latest_test/fastrtps/stdout_stderr.log _tmp_specific_error_file.log - python3 src/fastrtps/.github/workflows/utils/log_parser.py --log-file log/latest_test/fastrtps/stdout_stderr.log --specific-error-file _tmp_specific_error_file.log --output-file $GITHUB_STEP_SUMMARY --sanitizer asan - - - asan-discovery-server-test: - - if: ${{ ( - !contains(github.event.pull_request.labels.*.name, 'skip-ci') && - !contains(github.event.pull_request.labels.*.name, 'no-test') && - !contains(github.event.pull_request.labels.*.name, 'conflicts') - ) }} - - runs-on: ubuntu-22.04 - - env: - FASTDDS_BRANCH: ${{ github.head_ref || github.event.inputs.fastdds_branch || 'master' }} - DEFAULT_DISCOVERY_SERVER_BRANCH: ${{ github.event.inputs.discovery_server_branch || 'master' }} - - steps: - - name: Add ci-pending label if PR - if: ${{ github.event_name == 'pull_request' }} - uses: eProsima/eProsima-CI/external/add_labels@v0 - with: - labels: ci-pending - number: ${{ github.event.number }} - repo: eProsima/Fast-DDS - - # https://github.com/actions/runner-images/issues/9491 - - name: Fix kernel mmap rnd bits - run: sudo sysctl vm.mmap_rnd_bits=28 - - - name: Install apt packages - uses: eProsima/eProsima-CI/ubuntu/install_apt_packages@v0 - with: - packages: curl grep libasio-dev libtinyxml2-dev python3 python3-pip software-properties-common wget - - - name: Get minimum supported version of CMake - uses: eProsima/eProsima-CI/external/get-cmake@v0 - with: - cmakeVersion: '3.22.6' - - - name: Setup CCache - uses: eProsima/eProsima-CI/external/setup-ccache-action@v0 - - - name: Install colcon - uses: eProsima/eProsima-CI/ubuntu/install_colcon@v0 - - - name: Install Python dependencies - uses: eProsima/eProsima-CI/ubuntu/install_python_packages@v0 - with: - packages: vcstool setuptools gcovr tomark xmltodict jsondiff pandas - - - name: Get fastrtps.repos file - uses: eProsima/eProsima-CI/ubuntu/get_file_from_repo@v0 - with: - source_repository: eProsima/Fast-DDS - source_repository_branch: ${{ env.FASTDDS_BRANCH }} - file_name: fastrtps.repos - file_result: fastrtps.repos - - - name: Fetch Fast DDS & dependencies - uses: eProsima/eProsima-CI/ubuntu/vcs_import@v0 - with: - vcs_repos_file: fastrtps.repos - destination_workspace: src - - - name: Checkout Fast DDS branch - run: | - cd ./src/fastrtps - git checkout ${{ env.FASTDDS_BRANCH }} - - - name: Sync eProsima/Discovery-Server repository - uses: actions/checkout@v4 - with: - path: src/discovery_server - repository: eProsima/Discovery-Server - ref: ${{ env.DEFAULT_DISCOVERY_SERVER_BRANCH }} - - - name: Fetch Fast DDS ASan dependencies - uses: eProsima/eProsima-CI/multiplatform/vcs_import@v0 - with: - vcs_repos_file: ${{ github.workspace }}/src/fastrtps/.github/workflows/config/asan.repos - destination_workspace: src - skip_existing: 'true' - - - name: Build workspace - run: | - cat src/fastrtps/.github/workflows/config/asan_colcon.meta - colcon build \ - --event-handlers=console_direct+ \ - --metas src/fastrtps/.github/workflows/config/asan_colcon.meta - - - name: Run tests Fast DDS - run: | - source install/setup.bash && \ - colcon test \ - --packages-select discovery-server \ - --event-handlers=console_direct+ \ - --return-code-on-test-failure \ - --ctest-args \ - --label-exclude xfail \ - --timeout 300 - continue-on-error: true - - - name: Upload Logs - uses: actions/upload-artifact@v1 - with: - name: asan-ds-logs - path: log/ - if: always() - - - name: Report ASAN errors - if: always() - run: | - bash src/fastrtps/.github/workflows/utils/specific_errors_filter.sh "==ERROR:" log/latest_test/discovery-server/stdout_stderr.log _tmp_specific_error_file.log - python3 src/fastrtps/.github/workflows/utils/log_parser.py --log-file log/latest_test/discovery-server/stdout_stderr.log --specific-error-file _tmp_specific_error_file.log --output-file $GITHUB_STEP_SUMMARY --sanitizer=asan diff --git a/.github/workflows/thread-sanitizer.yaml b/.github/workflows/thread-sanitizer.yaml deleted file mode 100644 index b64852f73b8..00000000000 --- a/.github/workflows/thread-sanitizer.yaml +++ /dev/null @@ -1,206 +0,0 @@ -name: Thread Sanitizer analysis -on: - workflow_dispatch: - inputs: - fastdds_branch: - description: 'Branch or tag of Fast DDS repository (https://github.com/eProsima/Fast-DDS)' - required: true - default: 'master' - optional_cmake_args: - description: 'Optional CMake Compilation Flags' - required: false - type: string - optional_ctest_args: - description: 'Optional CTest Testing Flags' - required: false - type: string - - pull_request: - types: - - review_requested - paths-ignore: - - '**.md' - - '**.txt' - - '!**/CMakeLists.txt' - - schedule: - - cron: '0 1 * * *' - -concurrency: - group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} - cancel-in-progress: true - -jobs: - - ubuntu-sanitizer-run: - name: Sanitizer Evaluation - - if: ${{ ( - !contains(github.event.pull_request.labels.*.name, 'skip-ci') && - !contains(github.event.pull_request.labels.*.name, 'no-test') && - !contains(github.event.pull_request.labels.*.name, 'conflicts') - ) }} - - runs-on: ubuntu-22.04 - - env: - FASTDDS_BRANCH: ${{ github.head_ref || github.event.inputs.fastdds_branch || 'master' }} - TSAN_OPTIONS: second_deadlock_stack=1 history_size=7 memory_limit_mb=5000 - # GCC 11.3 (Ubuntu Jammy default) produces several false positives regarding timed synchronization protocols - # These issues were fixed in GCC 12 so we upgrade to that version. - CC: gcc-12 - CXX: g++-12 - - steps: - - name: Add ci-pending label if PR - if: ${{ github.event_name == 'pull_request' }} - uses: eProsima/eProsima-CI/external/add_labels@v0 - with: - labels: ci-pending - number: ${{ github.event.number }} - repo: eProsima/Fast-DDS - - # https://github.com/actions/runner-images/issues/9491 - - name: Fix kernel mmap rnd bits - run: sudo sysctl vm.mmap_rnd_bits=28 - - - name: Install apt packages - uses: eProsima/eProsima-CI/ubuntu/install_apt_packages@v0 - with: - packages: curl grep libasio-dev libtinyxml2-dev python3 python3-pip software-properties-common wget - - - name: Get minimum supported version of CMake - uses: eProsima/eProsima-CI/external/get-cmake@v0 - with: - cmakeVersion: '3.22.6' - - - name: Setup CCache - uses: eProsima/eProsima-CI/external/setup-ccache-action@v0 - - - name: Install colcon - uses: eProsima/eProsima-CI/ubuntu/install_colcon@v0 - - - name: Install Python dependencies - uses: eProsima/eProsima-CI/ubuntu/install_python_packages@v0 - with: - packages: vcstool setuptools gcovr tomark xmltodict jsondiff pandas - - - name: Get fastrtps.repos file - uses: eProsima/eProsima-CI/ubuntu/get_file_from_repo@v0 - with: - source_repository: eProsima/Fast-DDS - source_repository_branch: ${{ env.FASTDDS_BRANCH }} - file_name: fastrtps.repos - file_result: fastrtps.repos - - - name: Fetch Fast DDS & dependencies - uses: eProsima/eProsima-CI/ubuntu/vcs_import@v0 - with: - vcs_repos_file: fastrtps.repos - destination_workspace: src - - - name: Checkout Fast DDS branch - run: | - cd ./src/fastrtps - git checkout ${{ env.FASTDDS_BRANCH }} - - - name: Fetch Fast DDS CI dependencies - uses: eProsima/eProsima-CI/multiplatform/vcs_import@v0 - with: - vcs_repos_file: ${{ github.workspace }}/src/fastrtps/.github/workflows/config/ci.repos - destination_workspace: src - skip_existing: 'true' - - - name: Build workspace - run: | - cat src/fastrtps/.github/workflows/config/tsan_colcon.meta - colcon build \ - --event-handlers=console_direct+ \ - --metas src/fastrtps/.github/workflows/config/tsan_colcon.meta \ - --cmake-args -DCMAKE_BUILD_TYPE=Debug ${{ inputs.optional_cmake_args }} - - - name: Run tests Fast DDS - run: | - source install/setup.bash && \ - colcon test \ - --packages-select fastrtps \ - --event-handlers=console_direct+ \ - --return-code-on-test-failure \ - --ctest-args \ - --timeout 30 \ - -V -E DDSSQLFilterValueTests ${{ inputs.optional_ctest_args }} - continue-on-error: true - - - name: Upload Logs - uses: actions/upload-artifact@v3 - with: - name: tsan-logs - path: log/ - if: always() - - - name: Process sanitizer reports - id: report_summary - shell: pwsh - continue-on-error: true - run: | - # Create a dir for the exports - $exports = New-Item -ItemType Directory -Path ./exports - # Move to the reports dir - pushd ./log/latest_test/fastrtps - # Install the report parser module - Find-Module -Repository PSGallery -Name SanReportParser | Install-Module -Scope CurrentUser -Force - # Parse the report files - $rp = Show-Tsan -Path ./stdout_stderr.log - # filter duplicates - $rp = $rp | group md5hash | % { $_.group[0] } - # Export raw data - $rp | Export-CliXML (Join-Path $exports all_reports.xml) - # Group the reports by issue - $g = $rp | group fuzzhash - # Split up deadlocks and race reports - $gd = $rp | ? type -match dead | group fuzzhash - $gr = $rp | ? type -match race | group fuzzhash - # Simplified deadlock summary (only one representative report and tests associated) - $sd = $gd | Sort-Object count -desc | select @{l="fuzzhash";e="name"}, count, ` - @{l="échantillon";e={$_.group[0].report}}, @{l="tests"; ` - e={$_.group.file | sls "(.*)\.\d+$" | % { $_.Matches.Groups[1].Value } | Sort-Object | get-unique}} - # Simplified race summary (only one representative report and tests associated) - $sr = $gr | Sort-Object count -desc | select @{l="fuzzhash";e="name"}, count, ` - @{l="échantillon";e={$_.group[0].report}}, @{l="tests"; ` - e={$_.group.file | sls "(.*)\.\d+$" | % { $_.Matches.Groups[1].Value } | Sort-Object | get-unique}} - # Export simplified summaries - $sd, $sr | Export-Clixml (Join-Path $exports summary_data.xml) - # Export CSV summary of frequencies - $sd | select fuzzhash, count | Export-CSV -Path (Join-Path $exports deadlocks.csv) - $sr | select fuzzhash, count | Export-CSV -Path (Join-Path $exports races.csv) - # Export test mappings - & {$sd; $sr} | Sort-Object { [int]$_.fuzzhash} | % { $fuzzy=$_.fuzzhash;$_.tests | - select @{l="fuzzhash";e={$fuzzy}}, @{l="test";e={$_}}} | - Export-Csv (Join-Path $exports issue_test_map.csv) - # Keep a file per issue - $dir = New-Item -ItemType Directory -Path (Join-Path $exports reports) - & {$sd; $sr} | % { $_.échantillon | Out-File (Join-Path $dir "$($_.fuzzhash).tsan") } - # Create a summary table - @{Type="Deadlock";Failed=$sd.count;Hashes=$sd.fuzzhash}, - @{Type="Data race";Failed=$sr.count;Hashes=$sr.fuzzhash} | - % { $_.Summary = $_.Hashes | select -First 5 | Join-String -Separator ", " - if ($_.Hashes.count -gt 5 ) { - $_.Summary += ", ..." }; $_ } | - % { [PSCustomObject]$_} | - New-MDTable -Columns ([ordered]@{Failed=$null;Type=$null;Summary=$null}) | - Out-File $Env:GITHUB_STEP_SUMMARY - # The step fails on new deadlocks - $LASTEXITCODE=$sd.count - - - name: Archive sanitation results - uses: actions/upload-artifact@v3 - with: - name: sanitation-report - path: exports/* - - - name: Check on failures - if: ${{ steps.report_summary.outcome == 'failure' }} - shell: pwsh - run: | - Write-Host ${{ steps.report_summary.outcome }} - exit 1 From 704059ae11ae2e745eb62329f7950f0f6c2c53c0 Mon Sep 17 00:00:00 2001 From: eduponz Date: Sat, 6 Apr 2024 10:39:43 +0200 Subject: [PATCH 09/12] Refs #20542: Run sanitizers CI on PR review request Signed-off-by: eduponz --- .github/workflows/sanitizers-ci.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/sanitizers-ci.yml b/.github/workflows/sanitizers-ci.yml index 43820fca8f4..44e388b3680 100644 --- a/.github/workflows/sanitizers-ci.yml +++ b/.github/workflows/sanitizers-ci.yml @@ -45,6 +45,8 @@ on: required: false pull_request: + types: + - review_requested paths-ignore: - '**.md' - '**.txt' From 111de04a60789c2ce0435ee4428e5642ea1b7181 Mon Sep 17 00:00:00 2001 From: eduponz Date: Sat, 6 Apr 2024 14:21:40 +0200 Subject: [PATCH 10/12] Refs #20542: Exclude xfail tests in discovery server test run Signed-off-by: eduponz --- .github/workflows/reusable-sanitizers-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/reusable-sanitizers-ci.yml b/.github/workflows/reusable-sanitizers-ci.yml index c11a7792bfb..14c1bfdf948 100644 --- a/.github/workflows/reusable-sanitizers-ci.yml +++ b/.github/workflows/reusable-sanitizers-ci.yml @@ -298,7 +298,7 @@ jobs: colcon_test_args: ${{ inputs.colcon_test_args }} colcon_test_args_default: '--event-handlers=console_direct+ --return-code-on-test-failure' ctest_args: ${{ inputs.ctest_args }} - ctest_args_default: '' + ctest_args_default: '--timeout 300 --label-exclude "xfail"' packages_names: discovery-server workspace: ${{ github.workspace }} workspace_dependencies: '' From 0023ad0b9239d6285408197b9d5788057a60c891 Mon Sep 17 00:00:00 2001 From: eduponz Date: Sun, 7 Apr 2024 08:17:16 +0200 Subject: [PATCH 11/12] Refs #20542: Install all python packages needed for asan_fastdds_test reporting Signed-off-by: eduponz --- .github/workflows/reusable-sanitizers-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/reusable-sanitizers-ci.yml b/.github/workflows/reusable-sanitizers-ci.yml index 14c1bfdf948..d7d2d594377 100644 --- a/.github/workflows/reusable-sanitizers-ci.yml +++ b/.github/workflows/reusable-sanitizers-ci.yml @@ -166,7 +166,7 @@ jobs: - name: Install Python dependencies uses: eProsima/eProsima-CI/ubuntu/install_python_packages@v0 with: - packages: vcstool xmlschema + packages: vcstool setuptools gcovr tomark xmltodict jsondiff pandas - name: Setup CCache uses: eProsima/eProsima-CI/external/setup-ccache-action@v0 From 85a3de9e672b3c386ccb2aaeb9efd09d1dbd2ab5 Mon Sep 17 00:00:00 2001 From: eduponz Date: Mon, 8 Apr 2024 14:39:15 +0200 Subject: [PATCH 12/12] =?UTF-8?q?Refs=20#20542:=20Apply=20Jes=C3=BAs'=20su?= =?UTF-8?q?ggestions?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: eduponz --- .github/workflows/nightly-sanitizers-ci.yml | 2 +- .github/workflows/reusable-sanitizers-ci.yml | 16 ---------------- .github/workflows/sanitizers-ci.yml | 2 +- 3 files changed, 2 insertions(+), 18 deletions(-) diff --git a/.github/workflows/nightly-sanitizers-ci.yml b/.github/workflows/nightly-sanitizers-ci.yml index c9b19bf01f9..1ae72bb441f 100644 --- a/.github/workflows/nightly-sanitizers-ci.yml +++ b/.github/workflows/nightly-sanitizers-ci.yml @@ -32,7 +32,7 @@ jobs: cmake_args: '' ctest_args: '' fastdds_ref: '2.13.x' - discovery_server_ref: 'master' + discovery_server_ref: 'v1.2.2' nightly-sanitizers-ci-2_10_x: uses: ./.github/workflows/reusable-sanitizers-ci.yml diff --git a/.github/workflows/reusable-sanitizers-ci.yml b/.github/workflows/reusable-sanitizers-ci.yml index d7d2d594377..a08587bf322 100644 --- a/.github/workflows/reusable-sanitizers-ci.yml +++ b/.github/workflows/reusable-sanitizers-ci.yml @@ -68,10 +68,6 @@ jobs: number: ${{ github.event.number }} repo: eProsima/Fast-DDS - # https://github.com/actions/runner-images/issues/9491 - - name: Fix kernel mmap rnd bits - run: sudo sysctl vm.mmap_rnd_bits=28 - - name: Sync eProsima/Fast-DDS repository uses: eProsima/eProsima-CI/external/checkout@v0 with: @@ -146,10 +142,6 @@ jobs: name: build_artifacts_fastdds_asan_${{ inputs.label }} path: ${{ github.workspace }} - # https://github.com/actions/runner-images/issues/9491 - - name: Fix kernel mmap rnd bits - run: sudo sysctl vm.mmap_rnd_bits=28 - - name: Get minimum supported version of CMake uses: eProsima/eProsima-CI/external/get-cmake@v0 with: @@ -233,10 +225,6 @@ jobs: name: build_artifacts_fastdds_asan_${{ inputs.label }} path: ${{ github.workspace }} - # https://github.com/actions/runner-images/issues/9491 - - name: Fix kernel mmap rnd bits - run: sudo sysctl vm.mmap_rnd_bits=28 - - name: Get minimum supported version of CMake uses: eProsima/eProsima-CI/external/get-cmake@v0 with: @@ -341,10 +329,6 @@ jobs: number: ${{ github.event.number }} repo: eProsima/Fast-DDS - # https://github.com/actions/runner-images/issues/9491 - - name: Fix kernel mmap rnd bits - run: sudo sysctl vm.mmap_rnd_bits=28 - - name: Sync eProsima/Fast-DDS repository uses: eProsima/eProsima-CI/external/checkout@v0 with: diff --git a/.github/workflows/sanitizers-ci.yml b/.github/workflows/sanitizers-ci.yml index 44e388b3680..bb13baecd13 100644 --- a/.github/workflows/sanitizers-ci.yml +++ b/.github/workflows/sanitizers-ci.yml @@ -74,4 +74,4 @@ jobs: cmake_args: ${{ inputs.cmake_args || '' }} ctest_args: ${{ inputs.ctest_args || '' }} fastdds_ref: ${{ inputs.fastdds_ref || github.ref || 'master' }} - discovery_server_ref: ${{ inputs.discovery_server_ref || 'master' }} \ No newline at end of file + discovery_server_ref: ${{ inputs.discovery_server_ref || 'master' }}