Uh oh!
There was an error while loading. Please reload this page.
gh-112536: Add --tsan test for reasonable TSAN execution times. - #116601
Conversation
| @@ -0,0 +1,3 @@ | |||
| ## reference: https://github.com/google/sanitizers/wiki/ThreadSanitizerSuppressions | |||
There was a problem hiding this comment.
I am going to update the list of supressions.txt when working on the CI things.
Uh oh!
There was an error while loading. Please reload this page.
| 'test_capi', | ||
| 'test_code', | ||
| 'test_compileall', | ||
| 'test_concurrent_futures', |
There was a problem hiding this comment.
==14799==ThreadSanitizer: starting new threads after multi-threaded fork is not supported. Dying (set die_after_fork=0 to override)
Uh oh!
There was an error while loading. Please reload this page.
corona10
commented
Mar 11, 2024
@colesbury
|
Uh oh!
There was an error while loading. Please reload this page.
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
corona10
commented
Mar 11, 2024
Anyway, we should exclude some of test from the list since it takes over 1 hours :) |
I think that this setting could be the minimum setup for adding TSAN in CI. |
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
| group.add_argument('--pgo-extended', action='store_true', | ||
| help='enable extended PGO training (slower training)') | ||
| group.add_argument('--tsan', dest='tsan', action='store_true', | ||
| help='enable TSAN test') |
There was a problem hiding this comment.
Can you explain what "TSAN test" means here? From the rest of the diff it sounds like it's "Tests that pass in a reasonable amount of time with TSAN enabled", but that's not clear from this help string.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
| 'test_importlib', | ||
| 'test_io', | ||
| 'test_logging', | ||
| 'test_tuple', |
There was a problem hiding this comment.
I don't think test_tuple uses threads. I don't think it's worthwhile to run tests that don't use threads, because we won't uncover anything new with TSAN.
There was a problem hiding this comment.
I got it; I removed more tests that are not using the thread currently.
Co-authored-by: Sam Gross <colesbury@gmail.com>
| group.add_argument('--pgo-extended', action='store_true', | ||
| help='enable extended PGO training (slower training)') | ||
| group.add_argument('--tsan', dest='tsan', action='store_true', | ||
| help='run a subset of test cases that are proper for the TSAN test') |
There was a problem hiding this comment.
Sorry, I completely missed this notification. Looks good to me :)
colesbury
left a comment
There was a problem hiding this comment.
This looks like a good start to me. We can build on it (edit the list of tests and suppressions) in the future.
… times. (pythongh-116601) (cherry picked from commit ebf29b3) Co-authored-by: Donghee Na <donghee.na@python.org>
GH-116929 is a backport of this pull request to the 3.12 branch. |
--with-thread-sanitizer#112536📚 Documentation preview 📚: https://cpython-previews--116601.org.readthedocs.build/