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
{{ message }}
Repository navigation
gen_cluster nanny tests intermittently fail on Python 2 #1491
I tracked this down to logging code within the worker. Just calling logger.info("Hello") when starting up is enough to sometimes lock down the worker process. Perhaps forking after starting the logger does something unpleasant?
python logging, uses RLock() locks, and those are broken after a fork.
Looking the long history of this python bug, the conclusion that this bug is not going to be solved in python.
Activity
mrocklin commentedon Oct 20, 2017
Git bisect traces this back to 647238e cc @pitrou . I don't yet know how critical this is though. We have lived with this for a long time.
mrocklin commentedon Oct 21, 2017
I tracked this down to logging code within the worker. Just calling
logger.info("Hello")when starting up is enough to sometimes lock down the worker process. Perhaps forking after starting the logger does something unpleasant?mrocklin commentedon Oct 21, 2017
From celery/celery#496 which maybe discusses the same problem:
mrocklin commentedon Oct 21, 2017
OK, it looks like they resolved it by recreating the lock at the onset of every new process. This seems to resolve things for me as well.
Reset logger locks in Python 2
Reset logger locks in Python 2