Bug 1322426 (socket-proc)

[meta] Move all TCP/UDP network operations into a dedicated process

NEW
Assigned to

Status

()

task
P2
normal
2 years ago
2 hours ago

People

(Reporter: bkelly, Assigned: dragana)

Tracking

(Depends on 26 bugs, Blocks 2 bugs, {meta, parity-safari, sec-want})

Firefox Tracking Flags

(Not tracked)

Details

(Whiteboard: [necko-active], URL)

Currently there is work happening to move the GPU compositor into its own process.  This is to improve stability by allowing us to recover from gfx crashes.

Perhaps we should consider doing the same thing for network operations.  We periodically have crashes due to anti-virus and other external actors modifying our network stack.  In addition, new protocols are a potential surface area for crashes and attacks.  Running network code in a separate process would help mitigate crashes and attacks.

As a side effect, it would also reduce contention on the parent process main thread between network requests and other work during page load.

Updated

2 years ago
Whiteboard: [necko-backlog]
FWIW, this post mentions chrome is moving to a sandboxed network process soon:

https://medium.com/@justin.schuh/securing-browsers-through-isolation-versus-mitigation-15f0baced2c2#.o8sn6z5ms
A similar idea has been brought up when WebRTC and Necko folks talked at all hands meeting in Hawaii.

Another benefit would be all other processes would no longer need network access for their sandbox, as this would be the only process with network access.

One of the big concerns especially for WebRTC is what are the costs going to be for sending all the real time data across several processes. But we are doing something similar with e10s already, so hopefully this would not much worse in terms of performance.
(In reply to Ben Kelly [not reviewing due to deadline][:bkelly] from comment #1)
> FWIW, this post mentions chrome is moving to a sandboxed network process
> soon:
> 
> https://medium.com/@justin.schuh/securing-browsers-through-isolation-versus-
> mitigation-15f0baced2c2#.o8sn6z5ms

Also, it seems safari has had a dedicated network process for a while now.
Bulk change to priority: https://bugzilla.mozilla.org/show_bug.cgi?id=1399258
Priority: -- → P1
Bulk change to priority: https://bugzilla.mozilla.org/show_bug.cgi?id=1399258
Priority: P1 → P3

Updated

2 years ago
Priority: P3 → P2
Summary: consider performing network operations in a dedicated process → Move all TCP/UPD network operations into a dedicated process
Whiteboard: [necko-backlog] → [necko-active]

Updated

2 years ago
Assignee: nobody → schien
(Assignee)

Updated

2 years ago
Summary: Move all TCP/UPD network operations into a dedicated process → Move all TCP/UDP network operations into a dedicated process
Depends on: 1416623
Summary: Move all TCP/UDP network operations into a dedicated process → [meta] Move all TCP/UDP network operations into a dedicated process
This doesn't block bug 1359559 -- that covers locking down the content process sandbox, a network process is about removing attack surface from the parent process.
No longer blocks: 1359559

Updated

a year ago
Blocks: fission
See Also: → 1396030

Updated

8 months ago
Depends on: 1483276
Depends on: 1484743
Depends on: 1484751
Depends on: 1485619
Depends on: 1485652

Updated

8 months ago
Depends on: 1486012
Depends on: 1486033
Please note that moving network code to a separate process will mean not receiving Telemetry from that code until the plumbing from bug 1486033 is in place.

Updated

7 months ago
Depends on: 1493765

Updated

7 months ago
Depends on: 1494301

Updated

7 months ago
Depends on: 1494311

Updated

7 months ago
Depends on: 1494312
Depends on: 1494585
Depends on: 1494956
Depends on: 1495001
Depends on: 1496464
Depends on: 1494378
Depends on: 1497232
Depends on: 1497235
Depends on: 1497236
Depends on: 1497237
Depends on: 1497238
Depends on: 1497241
Depends on: 1497243
Depends on: 1497245
Depends on: 1497247
Depends on: 1497249
Depends on: 1497270
Depends on: 1503834
For reference, the changeset on larch we stopped the work at, having patches that were both in progress or r+'ed but not landed on larch, is 94a22fd022b9.

Comment 9

5 months ago
I'm hoping this will also benefit Thunderbird, currently typing stalls in composing, when main thread checks email servers for new mail.

Updated

5 months ago
Depends on: 1507861
(In reply to Dennis Jakobsen from comment #9)
> I'm hoping this will also benefit Thunderbird, currently typing stalls in
> composing, when main thread checks email servers for new mail.

Is there a reason you think THunderbird will benefit?

Imap in Thunderbird already has it's own, non-blocking (iirc) threads.

pop is main thread/doesn't have its own threads for architectural reasons. Perhaps the tcp can be offloaded there, but I doubt tcp activity related to pop is a major contributor to what you are seeing in Thunderbird

Comment 11

5 months ago
(In reply to Wayne Mery (:wsmwk) from comment #10)
> (In reply to Dennis Jakobsen from comment #9)
> > I'm hoping this will also benefit Thunderbird, currently typing stalls in
> > composing, when main thread checks email servers for new mail.
> 
> Is there a reason you think THunderbird will benefit?
> 
> Imap in Thunderbird already has it's own, non-blocking (iirc) threads.
> 
> pop is main thread/doesn't have its own threads for architectural reasons.
> Perhaps the tcp can be offloaded there, but I doubt tcp activity related to
> pop is a major contributor to what you are seeing in Thunderbird

I have 5 accounts, mixed pop/imap. I'll try and disable auto checking on the pop accounts and confirm what you are saying.

But it's unbearable writing emails when the caret is lagging 5 chars behind what you are typing.

Comment 12

5 months ago
Or maybe i should just request Thunderbird uses a separate thread for the compose window, then they can do all the stuff they want in the main window/thread.
(Assignee)

Updated

5 months ago
Depends on: 1509405
(Assignee)

Updated

5 months ago
Depends on: 1509406
(Assignee)

Updated

5 months ago
Depends on: 1509409
No longer depends on: 1509405
No longer depends on: 1509406
No longer depends on: 1494585
No longer depends on: 1503834
No longer depends on: 1483276
No longer depends on: 1494311
No longer depends on: 1494312
No longer blocks: webrtc-sock-proc
(Assignee)

Updated

5 months ago
Depends on: 1509822
(Assignee)

Updated

5 months ago
Depends on: 1509823
No longer depends on: 1507861
Depends on: 1510979
Depends on: 1511318
Depends on: 1513057
(Assignee)

Updated

4 months ago
Depends on: 1513059
Depends on: 1513175
(Assignee)

Updated

4 months ago
Depends on: 1513542
(Assignee)

Updated

4 months ago
Depends on: 1513865
(Assignee)

Updated

4 months ago
Depends on: 1513872
(Assignee)

Updated

4 months ago
Depends on: 1515390
(Assignee)

Updated

3 months ago
Assignee: polo.hellfire → dd.mozilla

Updated

3 months ago
Depends on: 1520657
(Assignee)

Updated

3 months ago
Depends on: 1520805
Depends on: 1520830
Depends on: 1521793
Depends on: 1521817
Depends on: 1527256
(Assignee)

Updated

2 months ago
No longer blocks: fission
Depends on: 1527384
Depends on: 1531892
(Assignee)

Updated

a month ago
Depends on: 1512598
Depends on: 1537761
Depends on: 1537764
(Assignee)

Updated

28 days ago
Depends on: 1510691
Depends on: 1539819
(Assignee)

Updated

26 days ago
(Assignee)

Updated

26 days ago
Depends on: 1539917
Depends on: 1541894
Type: defect → task
Depends on: 1543168
(Assignee)

Updated

12 days ago
Depends on: 1543698
(Assignee)

Updated

12 days ago
Depends on: 1543713
(Assignee)

Updated

7 days ago
Depends on: 1544745
(Assignee)

Updated

7 days ago
Depends on: 1544756
(Assignee)

Updated

7 days ago
Depends on: 1544757
Depends on: 1544777

Updated

6 days ago
Depends on: 1545253
Depends on: 1545523
Depends on: 1546355
You need to log in before you can comment on or make changes to this bug.