GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — gh-128002: add more thread safety tests for asyncio by kumaraditya303 · Pull Request #128480 · python/cpython

Conversation

@kumaraditya303

@kumaraditya303 kumaraditya303 commented Jan 4, 2025 •
edited by bedevere-app Bot
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Contributor
  • Issue: Audit asyncio thread safety  #128002

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@kumaraditya303
add more thread safety tests
7344c48
@kumaraditya303 kumaraditya303 added topic-asyncio skip news topic-free-threading labels Jan 4, 2025
@kumaraditya303
kumaraditya303 requested review from 1st1, asvetlov and willingc as code owners January 4, 2025 11:46
@bedevere-app bedevere-app Bot mentioned this pull request Jan 4, 2025
Audit asyncio thread safety #128002
Closed
9 tasks done
@bedevere-app bedevere-app Bot added tests Tests in the Lib/test dir awaiting core review labels Jan 4, 2025
@kumaraditya303 kumaraditya303 mentioned this pull request Jan 5, 2025
data races in frame inspection and tracebacks #128421
Closed
kumaraditya303 added 2 commits January 9, 2025 16:20
@kumaraditya303
Merge branch 'main' of https://github.com/python/cpython into asyncio…
a5b78bc
…-tsafe
@kumaraditya303
fix tests
7984147
@kumaraditya303

kumaraditya303 commented Jan 12, 2025

Copy link
Copy Markdown
Contributor Author

While running tests locally with tsan I get data races in PyException_GetTraceback:

==================
WARNING: ThreadSanitizer: data race (pid=18363)
  Read of size 8 at 0x7fd525db9fc8 by thread T5:
    #0 PyException_GetTraceback Objects/exceptions.c:415 (python+0x18cbce) (BuildId: 96822fb590e3a59ef5f8327d5962e4dff015129c)
    #1 _PyErr_SetObject Python/errors.c:243 (python+0x39a9fb) (BuildId: 96822fb590e3a59ef5f8327d5962e4dff015129c)
    #2 do_raise Python/ceval.c:2077 (python+0x32da17) (BuildId: 96822fb590e3a59ef5f8327d5962e4dff015129c)
    #3 _PyEval_EvalFrameDefault Python/generated_cases.c.h:6897 (python+0x35f385) (BuildId: 96822fb590e3a59ef5f8327d5962e4dff015129c)
    #4 _PyEval_EvalFrame Include/internal/pycore_ceval.h:116 (python+0x3689ea) (BuildId: 96822fb590e3a59ef5f8327d5962e4dff015129c)
    #5 _PyEval_Vector Python/ceval.c:1911 (python+0x368c70) (BuildId: 96822fb590e3a59ef5f8327d5962e4dff015129c)
    #6 _PyFunction_Vectorcall Objects/call.c:413 (python+0x16a4e2) (BuildId: 96822fb590e3a59ef5f8327d5962e4dff015129c)
    #7 _PyObject_VectorcallTstate Include/internal/pycore_call.h:167 (python+0x16ec46) (BuildId: 96822fb590e3a59ef5f8327d5962e4dff015129c)
    #8 method_vectorcall Objects/classobject.c:71 (python+0x16ef66) (BuildId: 96822fb590e3a59ef5f8327d5962e4dff015129c)
    #9 _PyVectorcall_Call Objects/call.c:273 (python+0x16c922) (BuildId: 96822fb590e3a59ef5f8327d5962e4dff015129c)
    #10 _PyObject_Call Objects/call.c:348 (python+0x16cd6c) (BuildId: 96822fb590e3a59ef5f8327d5962e4dff015129c)
    #11 PyObject_Call Objects/call.c:373 (python+0x16cdd0) (BuildId: 96822fb590e3a59ef5f8327d5962e4dff015129c)
    #12 thread_run Modules/_threadmodule.c:346 (python+0x4d3ba3) (BuildId: 96822fb590e3a59ef5f8327d5962e4dff015129c)
    #13 pythread_wrapper Python/thread_pthread.h:242 (python+0x42a887) (BuildId: 96822fb590e3a59ef5f8327d5962e4dff015129c)

marking draft until #128728 is merged along with other fixes for exceptions

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@kumaraditya303
kumaraditya303 marked this pull request as draft January 12, 2025 06:52
@bedevere-app bedevere-app Bot removed the awaiting core review label Jan 12, 2025
@kumaraditya303
kumaraditya303 marked this pull request as ready for review January 13, 2025 14:58
@bedevere-app bedevere-app Bot added the awaiting core review label Jan 13, 2025
kumaraditya303 added 2 commits January 13, 2025 20:28
@kumaraditya303
Merge branch 'main' into asyncio-tsafe
83ab536
@kumaraditya303
fix test
025fd62
@kumaraditya303
kumaraditya303 enabled auto-merge (squash) January 13, 2025 15:14
@kumaraditya303
kumaraditya303 merged commit 3efe28a into python:main Jan 13, 2025
@bedevere-app bedevere-app Bot removed the awaiting core review label Jan 13, 2025
@kumaraditya303
kumaraditya303 deleted the asyncio-tsafe branch January 13, 2025 15:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@1st1 1st1 Awaiting requested review from 1st1 1st1 is a code owner
@asvetlov asvetlov Awaiting requested review from asvetlov asvetlov is a code owner
@willingc willingc Awaiting requested review from willingc willingc is a code owner

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

skip news tests Tests in the Lib/test dir topic-asyncio topic-free-threading

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

1 participant

@kumaraditya303
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.