maybe softoken can stop accessing cert9.db-journal and cert9.db-wal all the time for read-only operations (affects reading Thunderbird mail)
Categories
(NSS :: Libraries, enhancement, P2)
Tracking
(Not tracked)
People
(Reporter: froydnj, Unassigned)
References
(Blocks 1 open bug)
Details
(Keywords: perf, perf:responsiveness, Whiteboard: [nss-triage])
![]() |
||
Comment 1•7 years ago
|
||
![]() |
Reporter | |
Comment 2•7 years ago
|
||
![]() |
||
Comment 3•7 years ago
|
||
![]() |
||
Comment 4•7 years ago
|
||
![]() |
Reporter | |
Comment 5•7 years ago
|
||
![]() |
||
Comment 7•7 years ago
|
||
Comment 9•7 years ago
|
||
Updated•7 years ago
|
Updated•7 years ago
|
Comment 10•7 years ago
|
||
(In reply to Dana Keeler (she/her) (use needinfo) (:keeler for reviews) from comment #4)
After a bit of looking, I think this is because softoken doesn't open the
database in exclusive locking mode, which means it has to check for a hot
journal that may have been left by a simultaneous access. I think it would
be possible to change the implementation to use exclusive locking, but it
would be a fair bit of work (in part because currently softoken appears to
re-open the database for every operation that could change data, which also
seems unnecessary, but again would require a fair bit of work to change).
FYI, it was probably Bob's decision to always check the disk.
Today it's possible to share the NSS database files between multiple processes. For example, you could have just a single location on disk containing your cert9.db and key4.db files, and inside your Firefox and Thunderbird profile directories, you could have symbolic links to the NSS files.
If you decided to use exclusive locking, what would be the consequences for sharing these files between multiple applications?
Comment 11•7 years ago
|
||
If you decided to use exclusive locking, what would be the consequences for sharing these files between multiple applications?
This would be incompatible with Chrome's multi-process architecture, which as of recently began experimenting with using NSS across multiple processes (trust store interactions happen in one process, client cert interactions in another). This turns out to have a number of sharp edge cases, but changing NSS to switch to exclusive locking would fundamentally break that use case.
Comment 12•7 years ago
|
||
No, we can't change it to exclusive. A number of NSS applications have been sharing databases even before sql. In the case of the old database it could result in damaged databases.
Comment 13•6 years ago
|
||
I see the same problem in my Thunderbird with procmon under Windows 10 1903 in Thunderbird 60.8.0.
08:07:41,5088366 thunderbird.exe 2640 CreateFile C:\Users\<Username>\AppData\Roaming\Thunderbird\Profiles\<hash>.default\cert9.db-journal NAME NOT FOUND Desired Access: Read Attributes, Disposition: Open, Options: Open Reparse Point, Attributes: n/a, ShareMode: Read, Write, Delete, AllocationSize: n/a 0.0001039
08:07:41,5105433 thunderbird.exe 2640 CreateFile C:\Users\<Username>\AppData\Roaming\Thunderbird\Profiles\<hash>.default\cert9.db-wal NAME NOT FOUND Desired Access: Read Attributes, Disposition: Open, Options: Open Reparse Point, Attributes: n/a, ShareMode: Read, Write, Delete, AllocationSize: n/a 0.0001284
It is repeated for 8, 16, 24 or 32 times.
Updated•3 years ago
|
Comment 14•3 years ago
|
||
In the process of migrating remaining bugs to the new severity system, the severity for this bug cannot be automatically determined. Please retriage this bug using the new severity system.
Updated•2 years ago
|
Description
•