Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit7dc9e92

Browse files
[3.13]gh-117657: Log TSAN warnings to separate files and archive them (GH-118747) (#118931)
This ensures we don't lose races that occur in subprocesses orinterleave races from workers running in parallel.Log files are collected and packaged into a zipfile that can bedownloaded from the "Artifacts" section of the workflow run.(cherry picked from commitb88889e)Co-authored-by: mpage <mpage@meta.com>
1 parentcceb758 commit7dc9e92

File tree

3 files changed

+20
-1
lines changed

3 files changed

+20
-1
lines changed

‎.github/workflows/build.yml‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -486,6 +486,7 @@ jobs:
486486
config_hash:${{ needs.check_source.outputs.config_hash }}
487487
options:./configure --config-cache --with-thread-sanitizer --with-pydebug
488488
suppressions_path:Tools/tsan/supressions.txt
489+
tsan_logs_artifact_name:tsan-logs-default
489490

490491
build_tsan_free_threading:
491492
name:'Thread sanitizer (free-threading)'
@@ -496,6 +497,7 @@ jobs:
496497
config_hash:${{ needs.check_source.outputs.config_hash }}
497498
options:./configure --config-cache --disable-gil --with-thread-sanitizer --with-pydebug
498499
suppressions_path:Tools/tsan/suppressions_free_threading.txt
500+
tsan_logs_artifact_name:tsan-logs-free-threading
499501

500502
# CIFuzz job based on https://google.github.io/oss-fuzz/getting-started/continuous-integration/
501503
cifuzz:

‎.github/workflows/reusable-tsan.yml‎

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,10 @@ on:
1111
description:'A repo relative path to the suppressions file'
1212
required:true
1313
type:string
14+
tsan_logs_artifact_name:
15+
description:'Name of the TSAN logs artifact. Must be unique for each job.'
16+
required:true
17+
type:string
1418

1519
jobs:
1620
build_tsan_reusable:
@@ -41,7 +45,7 @@ jobs:
4145
sudo sysctl -w vm.mmap_rnd_bits=28
4246
-name:TSAN Option Setup
4347
run:|
44-
echo "TSAN_OPTIONS=suppressions=${GITHUB_WORKSPACE}/${{ inputs.suppressions_path }}" >> $GITHUB_ENV
48+
echo "TSAN_OPTIONS=log_path=${GITHUB_WORKSPACE}/tsan_logsuppressions=${GITHUB_WORKSPACE}/${{ inputs.suppressions_path }} handle_segv=0" >> $GITHUB_ENV
4549
echo "CC=clang" >> $GITHUB_ENV
4650
echo "CXX=clang++" >> $GITHUB_ENV
4751
-name:Add ccache to PATH
@@ -60,3 +64,13 @@ jobs:
6064
run:make pythoninfo
6165
-name:Tests
6266
run:./python -m test --tsan -j4
67+
-name:Display TSAN logs
68+
if:always()
69+
run:find ${GITHUB_WORKSPACE} -name 'tsan_log.*' | xargs head -n 1000
70+
-name:Archive TSAN logs
71+
if:always()
72+
uses:actions/upload-artifact@v4
73+
with:
74+
name:${{ inputs.tsan_logs_artifact_name }}
75+
path:tsan_log.*
76+
if-no-files-found:ignore

‎Tools/tsan/supressions.txt‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,6 @@
22
# reference: https://github.com/google/sanitizers/wiki/ThreadSanitizerSuppressions
33
race:get_allocator_unlocked
44
race:set_allocator_unlocked
5+
6+
# https://gist.github.com/mpage/daaf32b39180c1989572957b943eb665
7+
thread:pthread_create

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp