[New-bugs-announce] [issue44421] random.uniform() hangs will eating up all available RAM
Christian Kleineidam
report at bugs.python.org
Mon Jun 14 14:47:03 EDT 2021
New submission from Christian Kleineidam <christian.kleineidam at gmail.com>:
I'm writing a model that needs a lot of random numbers. The model counts up to "Year:640: Count:1339" (taking around two minutes) and then hangs on random.uniform(0, 1). While it hangs, the amount of RAM python takes grows till it eats up all available RAM with RAM usage growing by around 100 MB per second.
I'm running Windows 10 and the error appears in both Python 3.8.8 as well as in 3.9.5. I'm attaching a file that reproduces the error.
File "C:\Users\Christian\folder\obfuscated.py", line 427, in <module>
population = population.next()
File "C:\Users\Christian\folder\obfuscated.py", line 385, in next
return Class4(self.nextClass4)
File "C:\Users\Christian\folder\obfuscated.py", line 280, in __init__
var42.var30()
File "C:\Users\Christian\folder\obfuscated.py", line 177, in var30
var22.var30(self.var17,self.var18,self.var21)
File "C:\Users\Christian\folder\obfuscated.py", line 100, in var30
self.barClass1s.append(var23.child())
File "C:\Users\Christian\folder\obfuscated.py", line 29, in child
if var6>random.uniform(0, 1):
File "C:\Progs\anaconda3\lib\random.py", line 417, in uniform
return a + (b-a) * self.random()
----------
components: Library (Lib)
files: obfuscated.py
messages: 395836
nosy: Christian.Kleineidam
priority: normal
severity: normal
status: open
title: random.uniform() hangs will eating up all available RAM
versions: Python 3.9
Added file: https://bugs.python.org/file50109/obfuscated.py
_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue44421>
_______________________________________
More information about the New-bugs-announce
mailing list