#1091831 python3: counting above 32bit causes unusual loopback

Package:
python3
Source:
python3
Description:
interactive high-level object-oriented language (default python3 version)
Submitter:
johnm
Date:
2025-01-05 01:24:01 UTC
Severity:
normal
Tags:
#1091831#5
Date:
2025-01-01 07:16:55 UTC
From:
To:
Dear Maintainer,

Counting above 0000 0001 ffff fff0 causes python to loop back to 0001 ffff ffe0 then start counting up again.
This loops until 0001 0000 0000 where it starts counting back to 0000 0001 ffff ffff this loop is infinite.
The only way to resolve the issue is to have python break loop with if statement resetting the counter to 0000 0000
updating the next 32bit integer. While counting from 0000 0000 python counts through ffff ffff without an issue
0001 0000 ffff is fine just 0001 ffff ffff causes the loop python also freezes for 2 minutes on 0001 fff5 94d0 during
the loop. Python must be repeatidly force terminated using top when this happens.

generate a python venv using python3 -m venv <folder>, source python venv, create a file to count up in hex, set hex
value to anything under 0000 0001 ffff ffff and let it count up while recording the hex to a file.

#1091831#10
Date:
2025-01-05 01:21:01 UTC
From:
To:
Control: tag -1 + unreproducible moreinfo

If you have an example script, you could provide it.

Python uses long integers of arbitrary size, so this shouldn't happen.
Whatever you have going on here is very unlikely to be a Debian bug.
Possibly an upstream bug in a library you are using, but my assumption
is that it's a bug in your code.

Stefano