Repository navigation
test_embed failures after switching configure options due to missing Makefile dependencies #114505
Description
Activity
- addedtype-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error
on Jan 23, 2024 - changed the title
[-]test_embed failing in free threaded build[/-][+]test_embed failing[/+]on Jan 23, 2024 I should add that I originally tried this with a
--disable-gilbuild. I later reproduced it on my Mac with the GIL enabled.Hi Skip - I tried running
test_embedon an M1 Mac (built from d22c066) and haven't seen any errors either with--disable-gilor with the default build.What is the error you are seeing? Have you tried running
make clean?Hrm... I guess it's a
makedependency problem. After amake cleanI'm not able to reproduce it either. Sorry for the noise.FWIW, here's the error I was seeing:
====================================================================== FAIL: test_init_isolated_config (test.test_embed.InitConfigTests.test_init_isolated_config) ---------------------------------------------------------------------- Traceback (most recent call last): File "/Users/skip/src/python/cpython/Lib/test/test_embed.py", line 1082, in test_init_isolated_config self.check_all_configs("test_init_isolated_config", api=API_ISOLATED) ~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/Users/skip/src/python/cpython/Lib/test/test_embed.py", line 800, in check_all_configs out, err = self.run_embedded_interpreter(testname, ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^ env=env, cwd=cwd) ^^^^^^^^^^^^^^^^^ File "/Users/skip/src/python/cpython/Lib/test/test_embed.py", line 119, in run_embedded_interpreter self.assertEqual(p.returncode, returncode, ~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^ "bad returncode %d, stderr is %r" % ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ (p.returncode, err)) ^^^^^^^^^^^^^^^^^^^^ AssertionError: -6 != 0 : bad returncode -6, stderr is 'Assertion failed: (rt_preconfig->isolated == 1), function check_preinit_isolated_config, file _testembed.c, line 1065.\n' ====================================================================== FAIL: test_preinit_isolated_config (test.test_embed.InitConfigTests.test_preinit_isolated_config) ---------------------------------------------------------------------- Traceback (most recent call last): File "/Users/skip/src/python/cpython/Lib/test/test_embed.py", line 1079, in test_preinit_isolated_config self.check_all_configs("test_preinit_isolated_config", api=API_ISOLATED) ~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/Users/skip/src/python/cpython/Lib/test/test_embed.py", line 800, in check_all_configs out, err = self.run_embedded_interpreter(testname, ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^ env=env, cwd=cwd) ^^^^^^^^^^^^^^^^^ File "/Users/skip/src/python/cpython/Lib/test/test_embed.py", line 119, in run_embedded_interpreter self.assertEqual(p.returncode, returncode, ~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^ "bad returncode %d, stderr is %r" % ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ (p.returncode, err)) ^^^^^^^^^^^^^^^^^^^^ AssertionError: -6 != 0 : bad returncode -6, stderr is 'Assertion failed: (rt_preconfig->isolated == 1), function check_preinit_isolated_config, file _testembed.c, line 1054.\n' ---------------------------------------------------------------------- Ran 69 tests in 3.743s FAILED (failures=2, skipped=5) test test_embed failed == Tests result: FAILURE == 10 slowest tests: - test_embed: 3.8 sec 1 test failed: test_embed 0:00:03 load avg: 20.85 Re-running 1 failed tests in verbose mode in subprocesses 0:00:03 load avg: 20.85 Run 1 test in parallel using 1 worker process 0:00:03 load avg: 20.85 [1/1/1] test_embed failed (2 failures) ...That
-6 != 0error was seen on both Linux and MacOS.Have you tried running make clean?
I would recommend
git clean -fdxbetween each build when bisecting; trust only a completely clean build.Yeah, I think we don't have all the proper dependencies in the Makefile for
_testembed.o:Lines 1401 to 1402 in afe8f37
Programs/_testembed.o: $(srcdir)/Programs/_testembed.c Programs/test_frozenmain.h $(CC) -c $(PY_CORE_CFLAGS) -o $@ $(srcdir)/Programs/_testembed.c We are also missing a bunch of header dependencies in the definition of
PYTHON_HEADERS.Reacted by Erlend E. AaslandCan you change the title to reflect this deficiency and assign it to me? I'll see if I can improve that aspect of the
makeenvironment.Reacted by Erlend E. Aasland- changed the title
[-]test_embed failing[/-][+]test_embed failures after switching configure options due to missing Makefile dependencies[/+]on Jan 23, 2024 Thanks Skip - I updated the title. I think you should be able to do that too -- there's an "Edit" button next to the tile and "New Issue" on this page.
Can you change the title to reflect this deficiency and assign it to me? I'll see if I can improve that aspect of the
makeenvironment.That would be a very welcome improvement :)
- addedbuildThe build process and cross-buildThe build process and cross-buildand removed
on Jan 23, 2024 I guess the bigger issue was how you assigned it to me. I didn't see an obvious way to assign it to myself.
- linked a pull request that will close this issuegh-114505: Add missing header file dependencies #114513
on Feb 7, 2024
Bug report
Bug description:
test_embedstarted failing for me recently on free threaded builds on both M1 Mac and Ubuntu (Intel).git bisectnarrowed it down to a suspect commit. @colesbury this is probably for you.Unfortunately, on my Mac I get this commit as the culprit:
while in my Linux environment it says this:
(I backed up farther on my Linux box to find a good commit.) 16 January was a long time ago. My inclination is that the later commit is the culprit.
I then tried with the GIL enabled on main. Still an error. Hmmm... I went through the bisect process again on my Mac and landed on this as the putative culprit commit:
CPython versions tested on:
CPython main branch
Operating systems tested on:
Linux, macOS
Linked PRs