Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Thread sanitizer tests failing in GitHub actions #121946

Open
colesbury opened this issue Jul 18, 2024 · 9 comments
Open

Thread sanitizer tests failing in GitHub actions #121946

colesbury opened this issue Jul 18, 2024 · 9 comments
Labels
build The build process and cross-build tests Tests in the Lib/test dir

Comments

@colesbury
Copy link
Contributor

colesbury commented Jul 18, 2024

EDIT: The cause was due to a change in LLVM's Ubuntu package.

I think this is due to a change in GitHub actions, not any particular commit. Commits that previously succeeded are now failing. I cannot reproduce the issue locally.

The only difference I see is in the reported clang build:

CC.version: Ubuntu clang version 18.1.8 (++20240717045746+3b5b5c1ec4a3-1~exp1~20240717165903.140) (bad)
CC.version: Ubuntu clang version 18.1.8 (++20240714071213+3b5b5c1ec4a3-1~exp1~20240714191314.138) (good)

However, the runner IMAGE_VERSION doesn't look like it's changed:

IMAGE_VERSION: 20240714.1.0

Nearly every test is failing:

https://github.com/python/cpython/actions/runs/9982293102/job/27587742397

0:00:00 load avg: 2.83 Run 22 tests in parallel using 4 worker processes
0:00:01 load avg: 2.93 [ 1/22/1] test_capi.test_pyatomic worker non-zero exit code (Exit code 66)
0:00:03 load avg: 2.93 [ 2/22/2] test_code worker non-zero exit code (Exit code 66)
0:00:06 load avg: 3.01 [ 3/22/3] test_functools worker non-zero exit code (Exit code 66)
0:00:11 load avg: 3.01 [ 4/22/4] test_capi.test_mem worker non-zero exit code (Exit code 66)
0:00:12 load avg: 3.01 [ 5/22/5] test_httpservers worker non-zero exit code (Exit code 66)
0:00:16 load avg: 3.01 [ 6/22/6] test_enum worker non-zero exit code (Exit code 66)
0:00:21 load avg: 3.01 [ 7/22/7] test_imaplib worker non-zero exit code (Exit code 66)
0:00:39 load avg: 3.83 [ 8/22/8] test_importlib worker non-zero exit code (Exit code 66)
0:00:41 load avg: 4.01 [ 9/22/9] test_logging worker non-zero exit code (Exit code 66)
0:01:03 load avg: 3.79 [10/22/10] test_io worker non-zero exit code (Exit code 66) -- running (1): test_queue (42.2 sec)
0:01:08 load avg: 4.21 [11/22/11] test_signal worker non-zero exit code (Exit code 66) -- running (1): test_queue (47.1 sec)
0:01:09 load avg: 4.21 [12/22/12] test_sqlite3 worker non-zero exit code (Exit code 66) -- running (1): test_queue (48.0 sec)
0:01:11 load avg: 4.11 [13/22/13] test_syslog worker non-zero exit code (Exit code 66) -- running (2): test_queue (50.3 sec), test_socket (30.1 sec)
0:01:15 load avg: 4.82 [14/22/14] test_thread worker non-zero exit code (Exit code 66) -- running (2): test_queue (54.4 sec), test_socket (34.3 sec)
0:01:17 load avg: 4.82 [15/22/15] test_threadedtempfile worker non-zero exit code (Exit code 66) -- running (2): test_queue (56.2 sec), test_socket (36.1 sec)
0:01:20 load avg: 4.82 [16/22/16] test_queue worker non-zero exit code (Exit code 66) -- running (1): test_socket (39.0 sec)
0:01:23 load avg: 4.68 [17/22/17] test_threading_local worker non-zero exit code (Exit code 66) -- running (1): test_socket (41.8 sec)
0:01:24 load avg: 4.68 [18/22/18] test_ssl worker non-zero exit code (Exit code 66) -- running (1): test_socket (43.3 sec)
0:01:29 load avg: 4.54 [19/22/19] test_threadsignals worker non-zero exit code (Exit code 66) -- running (1): test_socket (48.1 sec)
0:01:50 load avg: 3.91 [20/22/20] test_weakref worker non-zero exit code (Exit code 66) -- running (2): test_threading (32.6 sec), test_socket (1 min 8 sec)
0:01:53 load avg: 3.68 [21/22/21] test_socket worker non-zero exit code (Exit code 66) -- running (1): test_threading (35.4 sec)
0:01:56 load avg: 3.46 [22/22/22] test_threading worker non-zero exit code (Exit code 66)

TSan logs are useless:

WARNING: ThreadSanitizer: data race (pid=8535)
  Write of size 8 at 0x56136380acd0 by main thread:
    #0 <null> <null> (python+0x31a5ee) (BuildId: 243a59[16](https://github.com/python/cpython/actions/runs/9982293102/job/27587742397#step:13:17)b2751fda530fabbdb48342727b53c0b8)
    #1 <null> <null> (python+0x31a4a6) (BuildId: 243a5916b2751fda530fabbdb48342727b53c0b8)
    #2 <null> <null> (python+0x4f1242) (BuildId: 243a5916b2751fda530fabbdb48342727b53c0b8)
    #3 <null> <null> (python+0x522ef7) (BuildId: 243a5916b2751fda530fabbdb48342727b53c0b8)
...

Linked PRs

@colesbury colesbury added tests Tests in the Lib/test dir build The build process and cross-build labels Jul 18, 2024
@vstinner
Copy link
Member

Can we make the two TSan jobs as non-mandatory until the problem is solved? Right now, it's no longer possible to merge any change.

cc @ambv

@colesbury
Copy link
Contributor Author

I'm looking at this now

@colesbury
Copy link
Contributor Author

Ok, it looks like the llvm.sh script from https://apt.llvm.org/ no longer installs the llvm-18 (or llvm-18-dev) package. That means that llvm-symbolizer is missing, which apparently means that:

  1. The stack traces are garbage
  2. The suppressions don't work

@colesbury
Copy link
Contributor Author

Looks like this is related: llvm/llvm-project#99502

colesbury added a commit to colesbury/cpython that referenced this issue Jul 18, 2024
colesbury added a commit to colesbury/cpython that referenced this issue Jul 18, 2024
colesbury added a commit to colesbury/cpython that referenced this issue Jul 18, 2024
The Ubuntu package for llvm-18 is broken
colesbury added a commit that referenced this issue Jul 18, 2024
The Ubuntu package for llvm-18 is broken
miss-islington pushed a commit to miss-islington/cpython that referenced this issue Jul 18, 2024
…21975)

The Ubuntu package for llvm-18 is broken
(cherry picked from commit 12c1afa)

Co-authored-by: Sam Gross <colesbury@gmail.com>
colesbury added a commit that referenced this issue Jul 18, 2024
#121981)

The Ubuntu package for llvm-18 is broken
(cherry picked from commit 12c1afa)

Co-authored-by: Sam Gross <colesbury@gmail.com>
@brandtbucher
Copy link
Member

I believe this is affecting JIT builds as well (llvm.sh isn't installing llvm-readobj). Downgrading is more painful there, so hopefully it's resolved soon.

colesbury added a commit to colesbury/cpython that referenced this issue Jul 19, 2024
…thon#121975)"

This reverts commit 12c1afa.

The LLVM 18 Ubuntu package is working now.
colesbury added a commit to colesbury/cpython that referenced this issue Jul 22, 2024
colesbury added a commit that referenced this issue Jul 22, 2024
#122032)

This reverts commit 12c1afa.

The LLVM 18 Ubuntu package is working now.
miss-islington pushed a commit to miss-islington/cpython that referenced this issue Jul 22, 2024
…thonGH-121975)" (pythonGH-122032)

This reverts commit 12c1afa.

The LLVM 18 Ubuntu package is working now.
(cherry picked from commit ad935a9)

Co-authored-by: Sam Gross <colesbury@gmail.com>
@colesbury
Copy link
Contributor Author

This looks like it's resolved now.

colesbury added a commit that referenced this issue Jul 22, 2024
…H-121975)" (GH-122032) (#122131)

This reverts commit 53774e9.

The LLVM 18 Ubuntu package is working now.
(cherry picked from commit ad935a9)

Co-authored-by: Sam Gross <colesbury@gmail.com>
@encukou encukou reopened this Jul 30, 2024
@colesbury
Copy link
Contributor Author

Ugh... I guess we try the llvm-17 package again

colesbury added a commit to colesbury/cpython that referenced this issue Jul 30, 2024
ambv pushed a commit that referenced this issue Jul 30, 2024
miss-islington pushed a commit to miss-islington/cpython that referenced this issue Jul 30, 2024
…onGH-122466)

The Ubuntu package for llvm-18 is broken
(cherry picked from commit 8fb88b2)

Co-authored-by: Sam Gross <colesbury@gmail.com>
ambv pushed a commit that referenced this issue Jul 30, 2024
…122466) (GH-122467)

The Ubuntu package for llvm-18 is broken
(cherry picked from commit 8fb88b2)

Co-authored-by: Sam Gross <colesbury@gmail.com>
@mhsmith
Copy link
Member

mhsmith commented Jul 30, 2024

blhsing pushed a commit to blhsing/cpython that referenced this issue Aug 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
build The build process and cross-build tests Tests in the Lib/test dir
Projects
None yet
Development

No branches or pull requests

6 participants
@mhsmith @vstinner @encukou @colesbury @brandtbucher and others