algoo / preview-generator

generates previews of files with cache management
https://pypi.org/project/preview-generator/
MIT License
228 stars 50 forks source link

[soffice.bin] <defunct> #176

Closed L3o-pold closed 3 years ago

L3o-pold commented 4 years ago

I have a lot of defunct processes using the libreoffice builder. Even upgrading to the latest version (libreoffice 6.4.0.3)

Do you have any idea to fix this?

ps -auxf
USER       PID %CPU %MEM    VSZ   RSS TTY      STAT START   TIME COMMAND
****        78  0.0  0.0   5748  3628 pts/1    Ss   14:20   0:00 bash
****       759  0.0  0.0   9388  3028 pts/1    R+   14:28   0:00  \_ ps -auxf
****         1  1.3  0.0 535196 78508 pts/0    Ssl+ 14:20   0:06 python -u ***
****       243  0.0  0.0      0     0 pts/0    Z+   14:20   0:00 [soffice.bin] <defunct>
****       374  0.0  0.0      0     0 pts/0    Z+   14:20   0:00 [soffice.bin] <defunct>
****       459  0.0  0.0      0     0 pts/0    Z+   14:20   0:00 [soffice.bin] <defunct>
****       532  0.0  0.0      0     0 pts/0    Z+   14:20   0:00 [soffice.bin] <defunct>
L3o-pold commented 4 years ago

An important note is that I removed the lock and generate a random -env:UserInstallation path. But if I remove those hacks, I still have one defunct process.

L3o-pold commented 3 years ago

We found a workaround to our issue. Using https://github.com/Yelp/dumb-init in our Docker image.

raphj commented 3 years ago

Ah yes, thanks for the information. You indeed need a proper init process to handle the dying processes. In your listing, python was being used as init. You must be using a very bare docker image, right?

L3o-pold commented 3 years ago

Based on python official images. I think it can occurs with any docker image that have python as main process.