-
Notifications
You must be signed in to change notification settings - Fork 14
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
bug with statement functions again #459
Comments
Hi @ecossevin , Unfortunately, I am still not able to reproduce the backtrace you showed above. However, I think you are using a different
which indicates to me that you are running something other than the reproducer posted - unless I'm missing something? The test that you posted runs fine for me:
|
Hi @ecossevin, fwiw, I also can't reproduce the issue. Changing the file_name in While looking at this, I've noticed the |
Hi, sorry, indeed It was the wrong reproducer. I updated it If you run python3 test.py there is no bug, run python3 -m pdb test.py. |
Hi @ecossevin, thanks for the updated test, I can see the relevant lines now. However, I'm still not able to reproduce the failure you claim, as the code "just works" for me. In particular, at the breakpoint you inserted in
If I then use dead code elimination before inspecting the generated (example below), I also get a very sensible looking version of the kernel that seems to have inlined all the relevant internal subroutines.
So, I'm not sure where to go from here, but this all seems fine to me. For reference, I'm using latest |
Hi, thanks for your answer. Indeed, running python3 test.py with latest main works. The bug is when running python3 -m pdb test.py. |
Hi, please, is there any advancement on that isssue? |
Hi, sorry, no, I don't see how
and, as before, removing the Is there any way you could narrow down the issue without using full scale source files? Or could you possibly find out which symbol is losing it's |
As I cannot actually reproduce this locally, the only other "crystal ball advice" I can give (purely from looking at the given traceback) is to check which symbol Once that symbol is known, I would check on the line just before the call to Sorry for not being more helpful, but without anything failing in a reproducible manner, there is precious little I can do here. |
The difference can be the way we install loki ... I use this command : This is the expr leading to the error:
Indeed i can try to have a look to where the variable loses it type, but the thing is that doing print can remove the bug, so it's difficult. |
Sorry, I still can't reproduce the problem:
This is my command history:
|
I'm going to try with your python version. Mine is Python 3.10.12. Eric tried and said he didn't had the bug the first two times he run the test case, maybe if you run it 2/3 times the bug will appear? |
Still no luck unfortunately:
Note that you should specify When you hit the problem in a pdb session, can you please share what
is? |
|
Thanks for this, that helps. I think we're hitting some garbage collector race condition here due to an outdated scope reference. I can reproduce this now. At the top of the test.py file, insert import gc
gc.disable() And I've put a With this, I can see the scope of
|
What happened?
I have a bug in routines with statement functions : FMINJ in this case.
The code has a strange behavior, the bug is difficult to reproduce, this is why my reproducer is so big, sorry for that. Let me know if you can't reproduce the bug.
Using the version from #439 I have no bug. Using the lastest version of loki from main, the bug is back (end the commit fixing the bug is in loki latest main (git log | grep 97d0943).
What are the steps to reproduce the bug?
download loki
pip install "loki @ git+https://github.com/ecmwf-ifs/loki.git"
run the test
python3 -m pdb test.py
and then continue through the breakpoint.bug_statement.tar.gz
Version
latest, from today
Platform (OS and architecture)
Linux taranislogin1.taranishpc.meteo.fr 3.10.0-1160.102.1.el7.x86_64 #1 SMP Mon Sep 25 05:00:52 EDT 2023 x86_64 x86_64 x86_64 GNU/Linux
Relevant log output
Accompanying data
No response
Organisation
météo france
The text was updated successfully, but these errors were encountered: