Skip to content

Various data races in subinterpreter tests under TSAN #129824

Open
@colesbury

Description

@colesbury

Bug report

Thread sanitizer reports a number of data races when running subinterpreter tests

InterpreterPoolMixin (test_concurrent_futures)

I think for now it would make sense to skip the InterpreterPoolMixin tests when running with TSAN.

test__interpchannels

test__interpreters and test_interpreters

  • type_ready_set_new:
    type->tp_flags |= Py_TPFLAGS_DISALLOW_INSTANTIATION;
  • type_ready: (see Data race on tp_flags with subinterpreters and static types #129817)
  • File descriptor race in test_api.LowLevelTests.test_is_running and test_running: close() concurrent with read() on the same file descriptor.
  • managed_static_type_state_init in test.test_interpreters.test_stress.StressTests.test_create_many_threaded: data race on the non-atomic read of interp_count.
  • pegen memo_statistics mutex is currently only used in free threading build (seen in test_create_many_threaded)
  • version tags on static types: NEXT_GLOBAL_VERSION_TAG, type->tp_versions_used, and tp->tp_version_tag modifications are not thread-safe (seen in test_create_many_threaded)

test_capi.test_misc.assign_version_tag

  • race on NEXT_GLOBAL_VERSION_TAG in assign_version_tag (see above)

Linked PRs

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    Status

    Todo

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions