Open thomas-riccardi opened 4 years ago
why you are using multiprocessing with billiard?
@auvipy
why you are using multiprocessing with billiard?
I am not, I am just using billiard (in a celery worker), and it leaks in /dev/shm.
I then wrote a minimal repro script to show the issue is only with billiard, and not with multiprocessing. (and I cannot use multiprocessing because of https://github.com/celery/celery/issues/4551#issuecomment-367607234).
Sorry I was not clear in my initial bug report.
Is there any update on this? I am having the same isssue.
Initial issue:
(with
billiard==3.6.1.0
)Reproduction
Result:
Analysis
Files in /dev/shm leak, in fact they are marked as deleted (they don't appear in
ls /dev/shm
), only memory mapped to the process.df
clearly show the disk space is indeed used and filling up.I tried with various versions of python and billiard:
This is an issue in docker/kubernetes where the default
/dev/shm
is 64MB (for each container) which can be filled up.Source analysis
I tried to compare billiard and multiprocessing sources and could not find anything different in
semaphore.c
or in the python stack where the SemLock is created...I then assumed some object was referencing the SemLock with billiard, using
gc.get_referrers()
: I could not find any difference with multiprocessing...