billiard
billiard copied to clipboard
Incorrectly logged error: 'worker unable to determine worker memory usage'
4ac42695ce60cdf4786ca36b0cba170a3eb2e12f introduced a bug in billiard.pool.Worker when max_memory_per_child is set.
The problem is that the else block in the code below will always be executed when the worker's RSS is below the allotted max_memory_per_child logging 'worker unable to determine worker memory usage'.
if max_memory_per_child > 0:
used_kb = mem_rss()
if used_kb <= 0:
error('worker unable to determine memory usage')
if used_kb > 0 and used_kb > max_memory_per_child:
error(MAXMEM_USED_FMT.format(
used_kb, max_memory_per_child))
return EX_RECYCLE
else:
error('worker unable to determine worker memory usage')
Looks like this can be fixed just by removing that else clause.
I see this was merged in 2016 - the ticket can probably be closed CC @auvipy