| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
|
Skipping news, as this an implementation detail |
Sorry, something went wrong.
|
Okay, let me summarize what's here so we know I understand. Then I will start a code review.
All in all I think this is a fine plan. |
Sorry, something went wrong.
There was a problem hiding this comment.
This is cool, a rare excursion to classic data structures! I'm not sure, but I worry about a bug in the linked list code when unlinking the head node promotes another node to being the head; see comment in unlink_executor().
Sorry, something went wrong.
|
It looks like this PR introduced refleaks and assertion failures when running test_embed with tier two enabled: ======================================================================
FAIL: test_forced_io_encoding (test.test_embed.EmbeddingTests.test_forced_io_encoding)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/home/brandtbucher/cpython/Lib/test/test_embed.py", line 219, in test_forced_io_encoding
out, err = self.run_embedded_interpreter("test_forced_io_encoding", env=env)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/brandtbucher/cpython/Lib/test/test_embed.py", line 113, in run_embedded_interpreter
self.assertEqual(p.returncode, returncode,
AssertionError: -6 != 0 : bad returncode -6, stderr is "_testembed: Objects/dictobject.c:938: unicodekeys_lookup_unicode: Assertion `PyUnicode_CheckExact(ep->me_key)' failed.\n"
======================================================================
FAIL: test_run_main_loop (test.test_embed.EmbeddingTests.test_run_main_loop)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/home/brandtbucher/cpython/Lib/test/test_embed.py", line 326, in test_run_main_loop
out, err = self.run_embedded_interpreter("test_run_main_loop")
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/brandtbucher/cpython/Lib/test/test_embed.py", line 113, in run_embedded_interpreter
self.assertEqual(p.returncode, returncode,
AssertionError: -6 != 0 : bad returncode -6, stderr is "_testembed: Objects/dictobject.c:938: unicodekeys_lookup_unicode: Assertion `PyUnicode_CheckExact(ep->me_key)' failed.\n"
======================================================================
FAIL: test_init_is_python_build_with_home (test.test_embed.InitConfigTests.test_init_is_python_build_with_home)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/home/brandtbucher/cpython/Lib/test/test_embed.py", line 1375, in test_init_is_python_build_with_home
self.check_all_configs("test_init_is_python_build", config,
File "/home/brandtbucher/cpython/Lib/test/test_embed.py", line 794, in check_all_configs
out, err = self.run_embedded_interpreter(testname,
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/brandtbucher/cpython/Lib/test/test_embed.py", line 113, in run_embedded_interpreter
self.assertEqual(p.returncode, returncode,
AssertionError: -6 != 0 : bad returncode -6, stderr is "_testembed: Objects/dictobject.c:938: unicodekeys_lookup_unicode: Assertion `PyUnicode_CheckExact(ep->me_key)' failed.\n"
======================================================================
FAIL: test_no_memleak (test.test_embed.MiscTests.test_no_memleak) (frozen_modules='off', stmt='pass')
----------------------------------------------------------------------
Traceback (most recent call last):
File "/home/brandtbucher/cpython/Lib/test/test_embed.py", line 1820, in test_no_memleak
self.assertEqual(refs, 0, out)
AssertionError: 11 != 0 : [11 refs, 11 blocks]
======================================================================
FAIL: test_no_memleak (test.test_embed.MiscTests.test_no_memleak) (frozen_modules='on', stmt='pass')
----------------------------------------------------------------------
Traceback (most recent call last):
File "/home/brandtbucher/cpython/Lib/test/test_embed.py", line 1820, in test_no_memleak
self.assertEqual(refs, 0, out)
AssertionError: 11 != 0 : [11 refs, 11 blocks]
======================================================================
FAIL: test_no_memleak (test.test_embed.MiscTests.test_no_memleak) (frozen_modules='off', stmt='import __hello__')
----------------------------------------------------------------------
Traceback (most recent call last):
File "/home/brandtbucher/cpython/Lib/test/test_embed.py", line 1820, in test_no_memleak
self.assertEqual(refs, 0, out)
AssertionError: 11 != 0 : [11 refs, 11 blocks]
======================================================================
FAIL: test_no_memleak (test.test_embed.MiscTests.test_no_memleak) (frozen_modules='on', stmt='import __hello__')
----------------------------------------------------------------------
Traceback (most recent call last):
File "/home/brandtbucher/cpython/Lib/test/test_embed.py", line 1820, in test_no_memleak
self.assertEqual(refs, 0, out)
AssertionError: 11 != 0 : [11 refs, 11 blocks]
----------------------------------------------------------------------
I'm looking into it more now, but is there anything obvious to either of you that may be causing this? |
Sorry, something went wrong.
|
Possibly the refleaks might be cured by increasing the warmup count (changing the -R parameter and the expected output correspondingly). This has happened a few times before. No idea about the assertion failure. |
Sorry, something went wrong.
| void | ||
| _Py_Executor_DependsOn(_PyExecutorObject *executor, void *obj) | ||
| { | ||
| assert(executor->vm_data.valid = true); |
There was a problem hiding this comment.
Not the issue, but something I noticed while combing over this:
| assert(executor->vm_data.valid = true); | |
| assert(executor->vm_data.valid == true); |
Sorry, something went wrong.
|
See #111339 for the test_embed crashes etc. |
Sorry, something went wrong.
… individually and globally. (pythonGH-110384)
… individually and globally. (pythonGH-110384)
| Back | FazBrowse Home | New Git URL |
This PR just provides the machinery; we still need to add support for exiting executors when their valid flag is falsified.
The implementation uses a bloom filter.
The advantage of a bloom filter is that it requires no coupling between the executors and the objects they depend on, plus it is simpler to implement and uses less memory than a precise mapping.
I've chosen k = 6 and m = 256.
This should give a low enough false positive rate for most cases. We want to keep the false positive rate very low, as spurious de-optimizations could be expensive.