Open Bug 1826164 Opened 2 years ago Updated 1 year ago

The network process cannot be used when building with Mingw

Categories

(Core :: Networking, defect, P3)

Firefox 102
Desktop
Windows
defect

Tracking

()

People

(Reporter: pierov, Unassigned)

References

(Blocks 2 open bugs)

Details

(Whiteboard: [necko-triaged])

We found that the network process does not work when using MinGW to build.

The Canvas capture stream to peerConnection triggers a MOZ_CRASH because a chain of promises in mozilla::dom::RTCRtpTransceiver::ApplyCodecStats is rejected, and it is supposed not to.
After investigating, I found that the error is with GetOrCreateSocketActorForCurrentThread.
In particular, the initialization promise created in MediaTransportHandlerIPC::MediaTransportHandlerIPC is the one being rejected in the first place (the !actor->CanSend() branch is taken).
You can find my investigation in this issue downstream.

Setting network.process.enabled to false makes the crash disappear.

I have tested mainly ESR 102, because WebRTC needs a few patches that we still have not upstreamed to the current nightly.
I tried to rebase them onto nightly a couple of weeks ago, and I had the same crash, but I have not checked again, so I am selecting Firefox 102.

After Tom told me that the process is always disabled for HTTP (network.http.network_access_on_socket_process.enabled ), I tried to flip that preference, and found that the network process seems to be broken for HTTP, too in 102 ESR.
The requests never finish, and if you interrupt them manually, you can see the page with the UA CSS. I did not dig into the details, but I think that the requests for CSS, JS and other resources are all failing.
I attached a few screenshot to this other issue downstream.
But it seems to be fine in a build I have just downloaded from treeherder.

(In reply to Pier Angelo Vendrame from comment #0)

I tried to rebase them onto nightly a couple of weeks ago, and I had the same crash, but I have not checked again, so I am selecting Firefox 102.

Sorry, I have just remembered what happened: I do not have an updated toolchain to cross compile for nightly for Windows with mingw. Therefore, I rebased onto nightly and then created a treeherder request.
The build failed, but since I found that the network process was the error in 102, I did not try to fix the problem in nightly.
So, this bug definitely needs to be checked again in nightly.

Blocks: mingw-clang
Blocks: socket-proc
Severity: -- → S3
Priority: -- → P2
Whiteboard: [necko-triaged][necko-priority-review]
Whiteboard: [necko-triaged][necko-priority-review] → [necko-triaged][necko-priority-next]

If you get more insights into what might be wrong feel free to share.

Priority: P2 → P3
Whiteboard: [necko-triaged][necko-priority-next] → [necko-triaged]
You need to log in before you can comment on or make changes to this bug.