billiard icon indicating copy to clipboard operation
billiard copied to clipboard

Incorrectly logged error: 'worker unable to determine worker memory usage'

Open prydie opened this issue 9 years ago • 2 comments

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')

prydie avatar Dec 01 '16 12:12 prydie

Looks like this can be fixed just by removing that else clause.

skrud avatar Dec 15 '16 18:12 skrud

I see this was merged in 2016 - the ticket can probably be closed CC @auvipy

AbdealiLoKo avatar Oct 03 '22 07:10 AbdealiLoKo