| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
|
@gvanrossum |
Sorry, something went wrong.
There was a problem hiding this comment.
I don't know this code very well; let's see if @markshannon wants to review it.
Sorry, something went wrong.
There was a problem hiding this comment.
LG except formatting/naming nits.
Sorry, something went wrong.
There was a problem hiding this comment.
Green light! Thanks so much for powering through these.
Sorry, something went wrong.
⚠️⚠️⚠️ Buildbot failure ⚠️⚠️⚠️Hi! The buildbot aarch64 Fedora Stable LTO 3.x has failed when building commit 6cb48f0. What do you need to do:
You can take a look at the buildbot page here: https://buildbot.python.org/all/#builders/336/builds/3843 Failed tests:
Failed subtests:
Summary of the results of the build (if available): == Tests result: FAILURE then FAILURE == 448 tests OK. 10 slowest tests:
1 test failed: 14 tests skipped: 1 re-run test: Total duration: 4 min 57 sec Click to see traceback logsTraceback (most recent call last):
File "/home/buildbot/buildarea/3.x.cstratak-fedora-stable-aarch64.lto/build/Lib/test/test_concurrent_futures/test_shutdown.py", line 49, in test_interpreter_shutdown
self.assertFalse(err)
AssertionError: b'Exception in thread Thread-1:\nTraceback (most recent call last):\n File "/home/buildbot/buildarea/3.x.cstratak-fedora-stable-aarch64.lto/build/Lib/threading.py", line 1059, in _bootstrap_inner\n self.run()\n File "/home/buildbot/buildarea/3.x.cstratak-fedora-stable-aarch64.lto/build/Lib/concurrent/futures/process.py", line 339, in run\n self.add_call_item_to_queue()\n File "/home/buildbot/buildarea/3.x.cstratak-fedora-stable-aarch64.lto/build/Lib/concurrent/futures/process.py", line 394, in add_call_item_to_queue\n self.call_queue.put(_CallItem(work_id,\n File "/home/buildbot/buildarea/3.x.cstratak-fedora-stable-aarch64.lto/build/Lib/multiprocessing/queues.py", line 94, in put\n self._start_thread()\n File "/home/buildbot/buildarea/3.x.cstratak-fedora-stable-aarch64.lto/build/Lib/multiprocessing/queues.py", line 177, in _start_thread\n self._thread.start()\n File "/home/buildbot/buildarea/3.x.cstratak-fedora-stable-aarch64.lto/build/Lib/threading.py", line 978, in start\n _start_new_thread(self._bootstrap, ())\nRuntimeError: can\'t create new thread at interpreter shutdown\nTraceback (most recent call last):\n File "/home/buildbot/buildarea/3.x.cstratak-fedora-stable-aarch64.lto/build/Lib/multiprocessing/forkserver.py", line 274, in main\n code = _serve_one(child_r, fds,\n ^^^^^^^^^^^^^^^^^^^^^^^^\n File "/home/buildbot/buildarea/3.x.cstratak-fedora-stable-aarch64.lto/build/Lib/multiprocessing/forkserver.py", line 313, in _serve_one\n code = spawn._main(child_r, parent_sentinel)\n ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n File "/home/buildbot/buildarea/3.x.cstratak-fedora-stable-aarch64.lto/build/Lib/multiprocessing/spawn.py", line 132, in _main\n self = reduction.pickle.load(from_parent)\n ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n File "/home/buildbot/buildarea/3.x.cstratak-fedora-stable-aarch64.lto/build/Lib/multiprocessing/synchronize.py", line 115, in __setstate__\n self._semlock = _multiprocessing.SemLock._rebuild(*state)\n ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\nFileNotFoundError: [Errno 2] No such file or directory\n' is not false
|
Sorry, something went wrong.
There was a problem hiding this comment.
All the removed opcode != ENTER_EXECUTOR assertions were correct.
There should never be instrumented ENTER_EXECUTOR instructions.
I think the correct fix is to remove all ENTER_EXECUTOR instructions in _Py_Instrument() prior to calling update_instrumentation_data(), some thing like:
if (code->co_executors->size > 0) {
// Walk code removing ENTER_EXECUTOR
// Clear all executors
}
Sorry, something went wrong.
| _Py_CODEUNIT *instr = &_PyCode_CODE(code)[i]; | ||
| uint8_t *opcode_ptr = &instr->op.code; | ||
| int opcode = *opcode_ptr; | ||
| assert(opcode != ENTER_EXECUTOR); |
There was a problem hiding this comment.
This assertion is correct. Please don't remove assertions, unless you are really sure that they are incorrect.
ENTER_EXECUTOR should never have associated instrumentation.
Sorry, something went wrong.
There was a problem hiding this comment.
It was moved to L574, it will be the same effect no?
Sorry, something went wrong.
| assert(event != PY_MONITORING_EVENT_LINE); | ||
| assert(event != PY_MONITORING_EVENT_INSTRUCTION); | ||
| assert(PY_MONITORING_IS_INSTRUMENTED_EVENT(event)); | ||
| assert(opcode_has_event(_Py_GetBaseOpcode(code, offset))); |
There was a problem hiding this comment.
This is also correct, provided the assertion assert(PY_MONITORING_IS_INSTRUMENTED_EVENT(event)) is true.
Sorry, something went wrong.
There was a problem hiding this comment.
Hmm, it will guarantee that the opcode is not ENTER_EXECUTOR?
Sorry, something went wrong.
| else if (opcode == INSTRUMENTED_LINE) { | ||
| opcode = code->_co_monitoring->lines[i].original_opcode; | ||
| } | ||
| assert(opcode != ENTER_EXECUTOR); |
There was a problem hiding this comment.
This assert should be moved before the original if (opcode == INSTRUMENTED_LINE) {, we shouldn't get here with and ENTER_EXECUTOR present.
Sorry, something went wrong.
There was a problem hiding this comment.
Move it to L1310 will be enough?
Sorry, something went wrong.
|
Note that it is OK to have instrumented instructions and ENTER_EXECUTOR in the same code objects, but only if ENTER_EXECUTOR is inserted after the instrumentation happened, and ENTER_EXECUTOR never replaces an instrumented instruction. |
Sorry, something went wrong.
I will try to apply this approach :) |
Sorry, something went wrong.
…OR case (pythongh-108482)" This reverts commit 6cb48f0.
| Back | FazBrowse Home | New Git URL |
Uh oh!
There was an error while loading. Please reload this page.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.