Closed Bug 1734970 Opened 4 years ago Closed 4 years ago

Hang from await fetch + StreamListenerTee intended to capture HTTP response body

Categories

(Core :: Networking, defect)

x86_64
Linux
defect

Tracking

()

RESOLVED INVALID
Tracking Status
firefox95 --- affected

People

(Reporter: WeirdAl, Unassigned)

Details

(Keywords: hang, reproducible, testcase)

Attachments

(2 files)

I was trying to write a JavaScript XPCOM component to extract the HTTP request headers and body, and HTTP response headers and body, as a prototype for something more advanced - and to help me write documentation for the same in bug 1734764.

Alas, I hit a hang extracting the HTTP response body when a StreamListenerTee my component created was listening to an await fetch request to getpocket.cdn.mozilla.net .

I'm attaching the source code I'd drawn up to go in mozilla-central/extensions/http-experiments . So adding it to a build for testing purposes is simply ac_add_options --enable-extensions=default,http-experiments.

Interestingly enough, the stack trace illustrating the hang has no JavaScript frames on it. Since this is a clean build of mozilla-central with only the added JS component, I'm at a bit of a loss. That stack trace is coming in another attachment.

I'm filing for two reasons. One, JS causing a hang is bad. Two, I'm fully willing to admit I might not be doing this The Right Way and would appreciate directions. (I still haven't really figured out how to deal with multi-process Firefox yet.)

I'm not sure this is in the right bug component.

Attached file ddd-stacktrace.txt

I figured it out. I didn't have nearly enough segments in my pipe.

Status: NEW → RESOLVED
Closed: 4 years ago
Resolution: --- → INVALID
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: