Bug 1734208 Comment 1 Edit History

Note: The actual edited comment in the bug view page will always show the original commenter’s name and original timestamp.

The problem here is happening already before the shutdown and causes the main thread to be blocked. As such also the shutdown is blocked. 

To get this information Markus helped me to [get the Gecko profile from the hung process](https://mikeconley.ca/blog/2015/04/04/things-ive-learned-this-week-march-30-april-3-2015/). Here the profile: https://share.firefox.dev/3AiIbBf

By using the flame graph it's visible that when we are logging a trace entry for the network event `http-on-modify-request`, the call to `fputs` never returns. This can happen when a consumer has an open pipe to stdout/stderr and closes it too soon, or doesn't actually read anymore from it.

Puppeteer actually needs these pipes to get the DevTools address of the CDP WebSocket, which is expected on stderr and looks like:

> DevTools listening on ws://localhost:52200/devtools/browser/184e6a9d-2285-9745-b9df-ceedd866e6b3

Maybe once this line has been received Puppeteer no longer cares about these pipes, and maybe closes them or no longer pulls data.
The problem here is happening already before the shutdown and causes the main thread to be blocked. As such also the shutdown is blocked. 

To get this information Markus helped me to [get the Gecko profile from the hung process](https://mikeconley.ca/blog/2015/04/04/things-ive-learned-this-week-march-30-april-3-2015/). Here the profile: https://share.firefox.dev/3AiIbBf

By using the flame graph it's visible that when we are logging a trace entry for the network event `http-on-modify-request`, the call to `fputs` never returns. This can happen when a consumer has an open pipe to stdout/stderr and closes it too soon, or doesn't actually read anymore from it.

Puppeteer actually needs these pipes to get the DevTools address of the CDP WebSocket, which is expected on stderr and looks like:

> DevTools listening on ws://localhost:52200/devtools/browser/184e6a9d-2285-9745-b9df-ceedd866e6b3

Maybe once this line has been received Puppeteer no longer cares about these pipes, and maybe closes them.

Back to Bug 1734208 Comment 1