Probable locking issues with nsInputStreamPump
Categories
(Core :: Networking, defect, P2)
Tracking
()
People
(Reporter: jesup, Assigned: jesup)
References
(Blocks 1 open bug)
Details
(Keywords: csectype-race, sec-moderate, Whiteboard: [necko-triaged][post-critsmash-triage][adv-main98+r])
Attachments
(1 file)
There appear to be a number of issues with locking for nsInputStreamPump. I have some changes that quiet all the thread-safety warnings, however...
- I'm not certain that all the members I marked as GUARDED_BY() are correct.
- There are several cases where it unlocks to call the listener, and passes (apparently) guarded values. I've made these passings "safe" by snapshotting them before unlock, however note that once we unlock I presume these values could change during the listener call. This needs to be validated as ok or not (and if not, some redesign is probably needed).
I'm putting up a patch for review with both the fixes and the annotations, so you can see what I'm assuming about GUARDED_BY(). This would land with just the fixes; the annotation would land later (after base thread-safety code has landed).
Assignee | ||
Comment 1•3 years ago
|
||
Updated•3 years ago
|
Updated•3 years ago
|
![]() |
||
Comment 2•3 years ago
|
||
Landed: https://hg.mozilla.org/integration/autoland/rev/0d027e522b78b6c01694e5a5e473da6aaacfa03b
Backed out for causing build bustages in nsInputStreamPump.h:
https://hg.mozilla.org/integration/autoland/rev/2a399bb445d15c3df27110a489af21b36d910e4b
Push with failures: https://treeherder.mozilla.org/jobs?repo=autoland&group_state=expanded&resultStatus=testfailed%2Cbusted%2Cexception&revision=0d027e522b78b6c01694e5a5e473da6aaacfa03b
Build log: https://treeherder.mozilla.org/logviewer?job_id=365090892&repo=autoland
[task 2022-01-22T16:38:56.552Z] 16:38:56 ERROR - /builds/worker/checkouts/gecko/netwerk/base/nsInputStreamPump.h:79:5: error: use of undeclared identifier 'PUSH_IGNORE_THREAD_SAFETY'
[task 2022-01-22T16:38:56.553Z] 16:38:56 INFO - PUSH_IGNORE_THREAD_SAFETY
[task 2022-01-22T16:38:56.553Z] 16:38:56 INFO - ^
Comment 3•3 years ago
|
||
Updated•3 years ago
|
Updated•3 years ago
|
Updated•3 years ago
|
Description
•