Hello everyone, I've found that when I try to run emerge using Python 3.13 that is built with experimental JIT, emerge gets stuck while calculating dependencies. I suppose this may be a quite painful issue for those who tried to migrate to Python 3.13 with JIT and for some reason disabled previous Python versions support for portage. Best regards! Reproducible: Always Steps to Reproduce: 1. USE="jit python_targets_python3_13" emerge dev-lang/python:3.13 sys-apps/portage -1av 2. Add/move python3.13 to the top of the list at /etc/python-exec/python-exec.conf 3. emerge world -DNuav Actual Results: emerge freezes when calculating dependencies Expected Results: emerge calculates dependencies and shows the results
Created attachment 905107 [details] emerge sys-apps/portage dev-lang/python:3.13 --info
I've not yet played with the JIT at all, so limited ideas to start with. If you attach gdb & pdb, can you get both backtraces?
Created attachment 905108 [details] backtrace
Created attachment 905109 [details] thread apply all bt full
By the way, emerge world -uav doesn't freeze without -DN.
How about pdb?
Created attachment 905111 [details] Python stack
Created attachment 905112 [details] pdb where
USE=jit is masked so not critical.
Created attachment 905113 [details] pdb where (another attempt)
Created attachment 905114 [details] pdb where (3rd attempt) While it's frozen, python3.13 consumes 100% time of a single CPU core. As you can see, first and third traces are similar while the second one is quite different from them.
If you export PYTHON_JIT=0 does it suppress the problem in emerge? It seems pretty obvious that it should, but I'm just looking for confirmation.
> If you export PYTHON_JIT=0 does it suppress the problem in emerge? I confirm that it suppresses the problem. With PYTHON_JIT=0 emerge doesn't freeze.
Sounds like is maybe more of a python issue than a portage issue, and it might correct itself over time.
> Sounds like is maybe more of a python issue than a portage issue, and it might correct itself over time. That's true. I believe I should report this issue to the Python upstream. Actually, it's not the only one that I found so far. Python 3.13 with JIT gets stuck in a few more cases.
Please do report those upstream (and link them here), ideally for simpler applications first, thank you!
I see https://github.com/python/cpython/issues/126127 at least...