Closed Bug 1648996 Opened 4 years ago Closed 4 years ago

[socket process] devtools/client/netmonitor/test/browser_net_truncate-post-data.js failed with socket process enabled

Categories

(Core :: Networking, task, P2)

task

Tracking

()

RESOLVED FIXED
81 Branch
Tracking Status
firefox81 --- fixed

People

(Reporter: kershaw, Assigned: kershaw)

References

(Blocks 1 open bug)

Details

(Whiteboard: [necko-triaged])

Attachments

(1 file)

STR:
Run the command below locally.

 ./mach mochitest  --setpref="network.http.network_access_on_socket_process.enabled=true" devtools/client/netmonitor/test/browser_net_truncate-post-data.js

Failed symptom:
The upload stream is closed when devtool code tried to read the content of upload stream.

 0:26.55 GECKO(36615) Handler function threw an exception: [Exception... "Component returned failure code: 0x80470002 (NS_BASE_STREAM_CLOSED) [nsISeekableStream.tell]"  nsresult: "0x80470002 (NS_BASE_STREAM_CLOSED)"  location: "JS frame :: resource://devtools/shared/webconsole/network-helper.js :: readPostTextFromRequest :: line 149"  data: no]
 0:26.55 GECKO(36615) Stack: readPostTextFromRequest@resource://devtools/shared/webconsole/network-helper.js:149:30
 0:26.55 GECKO(36615) _onRequestBodySent@resource://devtools/server/actors/network-monitor/network-observer.js:1036:34
 0:26.55 GECKO(36615) _dispatchActivity@resource://devtools/server/actors/network-monitor/network-observer.js:579:14
 0:26.55 GECKO(36615) NetworkObserver.prototype.observeActivity<@resource://devtools/server/actors/network-monitor/network-observer.js:677:12
 0:26.55 GECKO(36615) exports.makeInfallible/<@resource://devtools/shared/ThreadSafeDevToolsUtils.js:103:22

Failed reason:

  1. When socket process is enabled, we serialize the upload stream in HttpTransactionparent::Init at here.
  2. In this case, the length of the upload stream is too big, so we use InputStreamHelper::SerializeInputStreamAsPipe to create a IPC stream.
  3. NS_AsyncCopy is used here to copy the input stream.
  4. When the copy is done, the upload stream is closed because mCloseSource is true.
  5. We failed to read the data from the upload stream.
Blocks: socket-proc
Pushed by kjang@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/5f74153746dc Keep the source stream open after serializing, r=baku
Status: NEW → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → 81 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: