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

Strange warning and failure of JIT workflow on aarch64-unknown-linux-gnu/gcc (Debug) #125521

Open
sobolevn opened this issue Oct 15, 2024 · 4 comments
Assignees
Labels
topic-JIT type-bug An unexpected behavior, bug, or error

Comments

@sobolevn
Copy link
Member

sobolevn commented Oct 15, 2024

Bug report

Link: https://github.com/python/cpython/actions/runs/11333284963/job/31517441366#step:8:9113

Report:

 Python/generated_cases.c.h: In function ‘_PyEval_EvalFrameDefault’:
Python/generated_cases.c.h:4738:46: warning: this statement may fall through [-Wimplicit-fallthrough=]
 4738 |         TARGET(INSTRUMENTED_LOAD_SUPER_ATTR) {
      |                                              ^
In file included from Python/ceval.c:679:
Python/ceval_macros.h:77:22: note: here
   77 | #  define TARGET(op) case op: TARGET_##op:
      |                      ^~~~
Python/generated_cases.c.h:4752:9: note: in expansion of macro ‘TARGET’
 4752 |         TARGET(INSTRUMENTED_POP_JUMP_IF_FALSE) {
      |         ^~~~~~
Python/generated_cases.c.h:5049:34: warning: this statement may fall through [-Wimplicit-fallthrough=]
 5049 |         TARGET(INTERPRETER_EXIT) {
      |                                  ^
Python/ceval_macros.h:77:22: note: here
   77 | #  define TARGET(op) case op: TARGET_##op:
      |                      ^~~~
Python/generated_cases.c.h:5066:9: note: in expansion of macro ‘TARGET’
 5066 |         TARGET(IS_OP) {
      |         ^~~~~~
Python/generated_cases.c.h:6817:31: warning: this statement may fall through [-Wimplicit-fallthrough=]
 6817 |         TARGET(RAISE_VARARGS) {
      |                               ^
Python/ceval_macros.h:77:22: note: here
   77 | #  define TARGET(op) case op: TARGET_##op:
      |                      ^~~~
Python/generated_cases.c.h:6842:9: note: in expansion of macro ‘TARGET’
 6842 |         TARGET(RERAISE) {
      |         ^~~~~~

Note that other builds do not have this warning.

Then this job gets canceled due to timeout:
Снимок экрана 2024-10-15 в 16 10 58

There are several other similar failures due to timeout: https://github.com/python/cpython/actions/runs/11333284963/job/31517441919

Снимок экрана 2024-10-15 в 16 12 49

Linked PRs

@sobolevn sobolevn added type-bug An unexpected behavior, bug, or error topic-JIT labels Oct 15, 2024
@brandtbucher
Copy link
Member

Something seems really off here. None of these can actually fall through... INSTRUMENTED_LOAD_SUPER_ATTR and RAISE_VARARGS have unconditional gotos, and INTERPRETER_EXIT has an unconditional return.

@brandtbucher
Copy link
Member

Theory: I think this has nothing to do with the JIT, the JIT CI is just the only place where we do AArch64 Linux builds in CI.

These look like two separate issues:

One is that the compiler is giving us spurious warnings, likely because:

  • It looks like computed gotos are disabled on this build.
  • Two instructions end with dead code (tracked separately in Multiple unused code warnings in Python/generated_cases.c.h #125515).
  • The other, RAISE_VARARGS, ends with if (true) goto error;, which might be confusing the compiler since it looks conditional, but isn't. This can likely be fixed in the cases generator.

Separately, I'm guessing the test failure is due to emulation in CI. We already need to skip test in test_posix (and other tests that use fork) in Tools/jit/ignore-tests-emulated-linux.txt. We should probably just confirm that the test passes on non-emulated hardware and add it to the skip-list.

@brandtbucher
Copy link
Member

@sobolevn, did you want to fix these?

@sobolevn
Copy link
Member Author

@brandtbucher no, sorry, I don't have time to dive into it right now :(

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
topic-JIT type-bug An unexpected behavior, bug, or error
Projects
None yet
Development

No branches or pull requests

3 participants