Page MenuHome GnuPG

Kleopatra Mailviewer: S/MIME decryption / verification leaves gpgsm server processes hanging around
Closed, ResolvedPublic

Description

So while GnuPG is started with command line parameters, GPGME starts a gpgsm in --server mode and then sends commands to this, so that ideally only one server is active. I think that architecture was at one point also planned for GnuPG but then dropped.

Now I noticed that the Mailviewer for signed and encrypted messages starts two GPGSM server processes and they stick around until KIeopatra is killed. Even if the Mailviewer windows are closed.

I think that may be that some job is not deleted / context closed properly.

You can reproduce it on Linux:

ps ux | grep gpgsm
aheinec+ 21184  0.0  0.0  10256  5684 pts/7    SL   15:42   0:00 gpgsm --logger-fd 30 --server
aheinec+ 21196  0.0  0.0  11132  6712 pts/7    SL   15:42   0:00 gpgsm --logger-fd 30 --server
aheinec+ 21228  0.0  0.0  10256  5740 pts/7    SL   15:43   0:00 gpgsm --logger-fd 30 --server
aheinec+ 21240  0.0  0.0  11132  6712 pts/7    SL   15:43   0:00 gpgsm --logger-fd 30 --server
aheinec+ 21287  0.0  0.0  10256  5868 pts/7    SL   15:43   0:00 gpgsm --logger-fd 30 --server
aheinec+ 21299  0.0  0.0  11132  6712 pts/7    SL   15:43   0:00 gpgsm --logger-fd 30 --server
aheinec+ 21567  0.0  0.0   6544  2148 pts/7    S+   15:48   0:00 grep --color=auto --exclude-dir=.bzr --exclude-dir=CVS --exclude-dir=.git --exclude-dir=.hg --exclude-dir=.svn --exclude-dir=.idea --exclude-dir=.tox gpgsm
(main) aheinecke@teutates ~/d/m/d/mime-demo> kleopatra gubbelgu.p7m 
15:48:44.683 org.kde.pim.kleopatra: main Startup timing: 96 ms: Application created
15:48:44.688 org.kde.pim.mimetreeparser.core: MimeTreeParser::ApplicationPkcs7MimeBodyPartFormatter::process pkcs7 mime     ==      S/MIME TYPE: enveloped (encrypted) data
15:48:44.688 org.kde.pim.mimetreeparser.core: MessageParser::setMessage Message parsing took:  0
(main) aheinecke@teutates ~/d/m/d/mime-demo> 15:48:44.833 org.kde.pim.mimetreeparser.core: MessageParser::setMessage Message parsing and decryption/verification:  144
15:48:44.858 qt.qpa.wayland: QtWaylandClient::QWaylandWindow::requestActivateWindow|?kleopatra?|?kleopatra?|?kleopatra?|?kleopatra? Wayland does not support QWindow::requestActivate()
15:48:46.114 org.kde.pim.kleopatra: Kleo::Command::~Command Kleo::Command(0x1e109d0) ~Command
15:48:46.114 org.kde.pim.kleopatra: Kleo::Command::Private::~Private Kleo::Command(0x1e109d0) ~Private
ps ux | grep gpgsm     
aheinec+ 21184  0.0  0.0  10256  5684 pts/7    SL   15:42   0:00 gpgsm --logger-fd 30 --server
aheinec+ 21196  0.0  0.0  11132  6712 pts/7    SL   15:42   0:00 gpgsm --logger-fd 30 --server
aheinec+ 21228  0.0  0.0  10256  5740 pts/7    SL   15:43   0:00 gpgsm --logger-fd 30 --server
aheinec+ 21240  0.0  0.0  11132  6712 pts/7    SL   15:43   0:00 gpgsm --logger-fd 30 --server
aheinec+ 21287  0.0  0.0  10256  5868 pts/7    SL   15:43   0:00 gpgsm --logger-fd 30 --server
aheinec+ 21299  0.0  0.0  11132  6712 pts/7    SL   15:43   0:00 gpgsm --logger-fd 30 --server
aheinec+ 21603  0.2  0.0  10256  5556 pts/7    SL   15:48   0:00 gpgsm --logger-fd 30 --server
aheinec+ 21615  1.9  0.0  11132  6512 pts/7    SL   15:48   0:00 gpgsm --logger-fd 30 --server

Revisions and Commits

Event Timeline

aheinecke created this task.
aheinecke raised the priority of this task from Normal to High.Nov 10 2023, 7:43 PM
aheinecke added a project: vsd32.

@CarlSchwan I think this one should be fairly easy to fix and I would really like to see it gone before the release, so I am tagging it for the release and raising the prio.

ebo changed the task status from Open to Testing.Nov 21 2023, 2:54 PM
ebo moved this task from Restricted Project Column to Restricted Project Column on the Restricted Project board.
ebo added a subscriber: ebo.

I do not see any gpgsm processes appear in the task manager on windows when viewing a .eml file which was smime encrypted with the mimetreeparser.
I guess this is enough to move this to done for VSD

And as this was in QA I'll move it to testing/WIP for gpgcom, too

ebo edited projects, added vsd32 (vsd-3.2.0); removed vsd32.