Importing OpenPGP Keys when opening a message takes very long and blocks the UI for users who have imported many keys
Categories
(MailNews Core :: Security: OpenPGP, defect)
Tracking
(thunderbird_esr140 wontfix, thunderbird152 wontfix)
People
(Reporter: steffen.rath, Assigned: marion.knopp)
References
Details
Attachments
(2 files, 2 external files)
Steps to reproduce:
Seen on Thunderbird 140.x and later on Linux but we assume other operating systems and earlier versions are affected as well. This affects users who have a large number of imported PGP keys (tested with 1000-3000). When such a user receives an email which contains attached PGP keys (either as attachment or as part of the autocrypt header), they are automatically imported which triggers multiple reloads of all imported keys. This takes multiple seconds during which the UI becomes unresponsive (similar behavior to bug 1742578). The non-responsiveness appears to coincide with the function commonProcessAttachedKey which takes care of importing the attached keys. The behavior also occurs for encrypted messages but can be a little harder to observe there since the non-responsiveness happens with a slight delay in this case.
- Thunderbird IMAP account with PGP encryption enabled (private key imported and selected) and about 1000 imported public PGP keys.
- Two messages in a folder (e.g., Inbox):
a. A non-encrypted message which contains a known (e.g., accepted) PGP key in itsautocryptheader and as attachment (as can be produced by sending a PGP signed email from Thunderbird with default settings). We used aned25519key for this.
b. A reference email not containing any PGP keys. - In the 3-pane message list, select the message with the attached keys.
- Wait until the message is displayed.
- Click on the reference message and observe the selection. Sometimes it is necessary to wait a little before clicking to see the bug occur.
Actual results:
- The displayed message does not change for several seconds (With multiple attached keys, this becomes even longer), i.e., the UI does not respond to the click.
- After import of the keys via
commonProcessAttachedKeyhas finished (as observed in the profiler) the displayed message changes as expected.
Expected results:
The displayed message should change immediately, i.e. the UI should be responsive.
| Reporter | ||
Comment 1•10 months ago
|
||
Example of an email containing OpenPGP keys that can be used to reproduce the bug. In order for the bug to occur the attached keys must be known to the instance under test.
| Reporter | ||
Comment 2•10 months ago
|
||
We are currently working on two different patches to address this issue:
- Making the import of keys from received emails optional via the config editor (defaulting to existing behavior)
- Avoiding redundant imports of keys and the associated cache invalidations
| Assignee | ||
Comment 3•10 months ago
|
||
Updated•10 months ago
|
Updated•9 months ago
|
| Reporter | ||
Comment 4•9 months ago
|
||
Updated•5 months ago
|
Comment 5•5 months ago
|
||
should we move the second patch to another bug? it seems that will take more time to get done
Updated•5 months ago
|
Pushed by corey@thunderbird.net:
https://hg.mozilla.org/comm-central/rev/404a8aa8da5c
Skip redundant key imports and use cache more. r=KaiE,mkmelin
Updated•5 months ago
|
| Reporter | ||
Comment 7•5 months ago
|
||
(In reply to Kai Engert [:KaiE:] from comment #5)
should we move the second patch to another bug? it seems that will take more time to get done
Hi! Very happy to see the patch got accepted. Can one already say when it will be part of a release? In my opinion there is no need for the second patch anymore: we mainly created it as an alternative offer that felt more lightweight.
Comment 8•5 months ago
|
||
This is now available in Daily. Around next Tuesday the first v153 beta will be available (and final v153 release around a month later).
| Reporter | ||
Comment 9•5 months ago
|
||
(In reply to Magnus Melin [:mkmelin] from comment #8)
This is now available in Daily. Around next Tuesday the first v153 beta will be available (and final v153 release around a month later).
Thanks! Will this also be included in the ESR release at some point?
Updated•5 months ago
|
Description
•