Description: Issue appears only with Docx/Doc documents when using Libre >= 7.0 (7.1, 7.2-pre). After using libreoffice in headless mode for getting document content, the following processes are not finished and continue lives as zombie: gpg gpgsm gpgconf Issue is not reproduced with libreoffice 6.4 Steps to Reproduce: 1. Create a docker container using focal image (i.e. mcr.microsoft.com/dotnet/runtime:5.0-focal) 2. Install libreoffice and required components: RUN apt-get update && \ apt-get install software-properties-common -y && \ apt-get update && \ apt-add-repository ppa:libreoffice/libreoffice-prereleases && \ apt-get install libreoffice -y && \ 3. Run conversion of some Docx file: RUN soffice --convert-to txt Document.docx --headless --nologo --norestore --invisible --nofirststartwizard --view Actual Results: Processes are not exited: gpg gpgsm gpgconf Expected Results: Processes are finished Reproducible: Always User Profile Reset: Yes Additional Info: LibreOffice 7.1.4.2 10(Build:2)
I have encountered the same problem in a slightly different context on a current libreoffice: LibreOffice 7.0.4.2 00(Build:2) My research shows that indeed libreoffice leaves the zombie gpg subprocesses, which are not reaped unless you have something like bash or an init process in your docker container as PID 1. You can workaround the problem by using the `--init` parameter for `docker run` or `init: True` in docker-compose. It would be preferable if libreoffice would not orphan any children however. I was able to reproduce the issue by having an absolute minimal example.pdf, using the following Dockerfile: > FROM python:3.11-slim > > RUN apt-get update \ > && apt-get install libreoffice-draw-nogui --yes \ > && rm -rf /var/lib/apt/lists/* > > COPY example.pdf ./ Then build and run with > docker build -t lo-zombie . > docker run --name zombie -ti --rm lo-zombie:latest Create zombies (again from host): > docker exec zombie libreoffice --convert-to odg example.pdf > ps fax | grep gpg Output: > 1273473 ? Z 0:00 \_ [gpgconf] <defunct> > 1273475 ? Z 0:00 \_ [gpgconf] <defunct> > 1273477 ? Z 0:00 \_ [gpg] <defunct> > 1273479 ? Z 0:00 \_ [gpgsm] <defunct> > 1273481 ? Z 0:00 \_ [gpgconf] <defunct>
I am seeing this same problem when exec'ing soffice to convert documents from a nodejs app running in kubernetes, which will also lack the init process to reap the zombies. In our use case, it isn't possible to run with an init process, so the defunct processes will continue to build until restarting the container. Version: LibreOffice 7.4.7.2 40(Build:2) Remaining processes from each run: node 0.0 0.0 12:59:26 [gpgconf] <defunct> node 0.0 0.0 12:59:26 [gpgconf] <defunct> node 0.0 0.0 12:59:26 [gpg] <defunct> node 0.0 0.0 12:59:26 [gpgsm] <defunct> node 0.0 0.0 12:59:26 [gpgconf] <defunct>