You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The attached sample file makes Shrink Ray get stuck for hours in replace_bodies_with_ellipsis for me. When this happens, it pegs one CPU core and memory use seems to remain constant.
The text was updated successfully, but these errors were encountered:
devdanzin
changed the title
Shrink Ray get stuck in replace_bodies_with_ellipsis at beginning of reduction
Shrink Ray gets stuck in replace_bodies_with_ellipsis at beginning of reduction
Dec 12, 2024
Yeah, this is definitely a bug. Shrinkray really shouldn't get stuck in long-running passes, particularly early on when other passes would work. Will try to investigate soon.
Is the upstream cpython you're testing against some particular commit?
Sorry for the long delay, I mistakenly thought it was not reproducing and spent a lot of time reconstructing the conditions.
Turns out it was reproducing, just that my initial diagnosis was wrong: it doesn't get stuck at the first pass, but rather goes through some passes without any reduction.
For me, it went through: delete_statements, replace_statements_with_pass, hollow, split(b'\n')/delete_duplicates, split(b'\n')/block_deletion(10, 100), lift_braces, remove_indents, remove_whitespace, plus a couple more in between I didn't catch.
upstream_cpython is:
Python 3.12.8+ (heads/3.12:b0615a8a9aa, Dec 16 2024, 16:01:26) [GCC 13.3.0]
It only repros with 3.12 (where the CPython bug exists).
The attached sample file makes Shrink Ray get stuck for hours in
replace_bodies_with_ellipsis
for me. When this happens, it pegs one CPU core and memory use seems to remain constant.The command used to run Shrink Ray is:
Where
_lsprof_abort.sh
is:Running c-reduce works on this file, and the result of such reduction works fine in Shrink Ray.
IIUC one feature of Shrink Ray is choosing suitable passes so the start isn't too slow, so this looks like a bug.
Example output:
python -VV
:Thank you very much for your wonderful tools and writings!
source_lsprof.py.txt
The text was updated successfully, but these errors were encountered: