Closed Bug 1689191 Opened 5 years ago Closed 4 years ago

Frequent DataStoragePut messages waking idle preallocated content processes

Categories

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

defect

Tracking

()

RESOLVED FIXED
91 Branch
Fission Milestone MVP
Tracking Status
firefox91 --- fixed

People

(Reporter: nika, Assigned: keeler)

References

(Blocks 1 open bug)

Details

(Whiteboard: [psm-backlog])

Attachments

(1 file)

This was discovered when looking into why preallocated content processes were waking up when not in use in bug 1689164. Msg_DataStoragePut is broadcast to all content processes, including preallocated ones, fairly frequently. This message is called by mozilla::DataStorage on a regular basis, and broadcasts a message to all content processes to update some state related to our ssl implementation. (https://searchfox.org/mozilla-central/rev/b9384b091e901b3283ce24b6610e80699d79fd06/security/manager/ssl/DataStorage.cpp#786-793)

It would be nice to somehow avoid this frequent message by either avoiding the need for this information in every content process or avoiding sending the message to preallocated content processes until it is necessary to allow them to stay idle.

See bug 1689164 for more details.

Severity: -- → S3
Priority: -- → P2
Whiteboard: [psm-backlog]

Wastes CPU and battery.

Fission Milestone: --- → MVP

Bug 1215723 introduced a mechanism whereby DataStorage data would be propagated
to content processes to avoid the IPC calls involved in querying if hosts were
HSTS. With a low number of content processes, this was a reasonable approach.
However, with Fission and the proliferation of content processes, propagating
changes in DataStorage data to every content process wakes up unrelated
processes and is inefficient. This patch restores the behavior that
nsISiteSecurityService and DataStorage is not available to content processes.
Additionally, bug 1626076 made it possible to use DataStorage directly from the
socket process. However, as of bug 1650356, this is no longer necessary, so
this patch removes that behavior as well.

Assignee: nobody → dkeeler
Status: NEW → ASSIGNED
Pushed by dkeeler@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/2be475352375 restrict nsISiteSecurityService and DataStorage to the main process r=rmf,necko-reviewers,ipc-reviewers,kershaw,nika

Backed out for causing build bustages on RemoteLazyInputStreamThread.cpp.

Push with failures

Failure log

Backout link

Flags: needinfo?(dkeeler)
Pushed by dkeeler@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/feddc99d7b28 restrict nsISiteSecurityService and DataStorage to the main process r=rmf,necko-reviewers,ipc-reviewers,kershaw,nika
Flags: needinfo?(dkeeler)
Status: ASSIGNED → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → 91 Branch
Blocks: 1500522
Whiteboard: [psm-backlog] → [psm-backlog][sp3]
Whiteboard: [psm-backlog][sp3] → [psm-backlog]
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: