Open Bug 101005 Opened 23 years ago Updated 2 years ago

[meta] Review *all* PSM code for threadsafety issues

Categories

(Core :: Security: PSM, defect, P3)

Other Branch
defect

Tracking

()

Future

People

(Reporter: inactive-mailbox, Unassigned)

References

Details

(Keywords: meta, Whiteboard: [kerh-cuz][psm-logic][psm-tracking])

PSM uses the NS_IMPL_THREADSAFE_ISUPPORTS... marcos.

I believe, using these macros says: "it is safe to call any methods from any
thread". (No debug output / warning messages will be shown if this happens, as
it is considered safe.)
I learned in chats, that these macros might have been used to make the
assertions go away, but the code itself might have not been fully checked for
multithread safety. Currently, PSM doesn't use mutexes / locks.

We should review all PSM code to make sure we are not introducing problems that
lead to memory corruption etc, or are the cause for bugs we see but can't explain.

It might be helpful to replace the NS_IMPL_THREADSAFE macros with the
non-threadsafe versions, and look at the assertions that are shown (I made a
small test doing so several days ago and saw a bunch of assertions).

Once we know how much protection is needed, we can decide whether we prefer
locks or adding thread proxies to code that calls PSM from different threads.
David suggested this should be -> P1.
Priority: -- → P1
Currently, nsNSSComponent is used by both the ui thread and the socket transport
thread, as I understand it.
Target Milestone: --- → Future
Changing my prefered e-mail address.
Assignee: kai.engert → kaie
The CRL update code appears to have thread safety issues--see bug 200119.
Product: PSM → Core
Whiteboard: [kerh-cuz]
QA Contact: junruh → ui
Blocks: 427948
Assignee: kaie → nobody
Whiteboard: [kerh-cuz] → [kerh-cuz][psm-logic]
Blocks: 700499
This should be more of a meta-bug that tracks smaller, more achievable sub-tasks that will eventually get us to a more consistent state with respect to thread safety in PSM.
Component: Security: UI → Security: PSM
Priority: P1 → P3
Whiteboard: [kerh-cuz][psm-logic] → [kerh-cuz][psm-logic][psm-tracking]
Keywords: meta
The meta keyword is there, the bug doesn't depend on other bugs and there is no activity for 12 months.
:keeler, maybe it's time to close this bug?
Flags: needinfo?(dkeeler)
Summary: Review *all* PSM code for threadsafety issues → [meta] Review *all* PSM code for threadsafety issues
blocks -> depends on
No longer blocks: 700499, 427948
Depends on: 700499, 427948
Flags: needinfo?(dkeeler)
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.