FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

async_hooks,doc: cache process.stdout.fd outside init by RaisinTen · Pull Request #38382 · nodejs/node · GitHub

/ node Public

async_hooks,doc: cache process.stdout.fd outside init - #38382

Closed
RaisinTen wants to merge 3 commits into
nodejs:masterfrom
RaisinTen:async_hooks,doc/replace-process.stdout.fd-with-1
Closed

async_hooks,doc: cache process.stdout.fd outside init#38382
RaisinTen wants to merge 3 commits into
nodejs:masterfrom
RaisinTen:async_hooks,doc/replace-process.stdout.fd-with-1

Conversation

Copy link
Copy Markdown
Member

This stops "RangeError: Maximum call stack size exceeded".

Details
node -v
v15.2.0node --trace-uncaught before.js
node:internal/async_hooks:204
    fatalError(e);
    ^

RangeError: Maximum call stack size exceeded
Thrown at:
    at emitInitNative (node:internal/async_hooks:204:5)
    at WriteStream (node:tty:91:15)
    at createWritableStdioStream (node:internal/bootstrap/switches/is_main_thread:47:16)
    at getStdout (node:internal/bootstrap/switches/is_main_thread:122:12)
    at init (/home/raisinten/Desktop/universe/temp/project/before.js:8:15)
    at emitInitNative (node:internal/async_hooks:197:43)
    at WriteStream (node:tty:91:15)
    at createWritableStdioStream (node:internal/bootstrap/switches/is_main_thread:47:16)
    at getStdout (node:internal/bootstrap/switches/is_main_thread:122:12)
    at init (/home/raisinten/Desktop/universe/temp/project/before.js:8:15)echo $?
7node --trace-uncaught after.js
TCPSERVERWRAP(2): trigger: 1 execution: 1
TickObject(3): trigger: 2 execution: 1
^C

This stops "RangeError: Maximum call stack size exceeded".
nodejs-github-bot added async_hooks Issues and PRs related to the async hooks subsystem. doc Issues and PRs related to the documentations. labels Apr 24, 2021

Copy link
Copy Markdown
Member Author

cc @puzpuz as this reverts #34829

aduh95 commented Apr 24, 2021

Copy link
Copy Markdown
Contributor

What if you cache the value outside the loop?

const { fd } = process.stdout;

RaisinTen changed the title async_hooks,doc: replace process.stdout.fd with 1 async_hooks,doc: cache process.stdout.fd outside init Apr 24, 2021

Copy link
Copy Markdown
Member Author

@aduh95 That works too. PTAL. :)

Comment thread doc/api/async_hooks.md Outdated
RaisinTen added the author ready PRs that have at least one approval, no outstanding review comments, and a CI started. label Apr 25, 2021

jasnell commented Apr 26, 2021

Copy link
Copy Markdown
Member

Landed in 91d1b60

jasnell pushed a commit that referenced this pull request Apr 26, 2021
This stops "RangeError: Maximum call stack size exceeded".

PR-URL: #38382
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
jasnell closed this Apr 26, 2021
RaisinTen deleted the async_hooks,doc/replace-process.stdout.fd-with-1 branch April 27, 2021 14:10
targos pushed a commit that referenced this pull request Apr 29, 2021
This stops "RangeError: Maximum call stack size exceeded".

PR-URL: #38382
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
targos mentioned this pull request May 3, 2021
targos pushed a commit that referenced this pull request May 30, 2021
This stops "RangeError: Maximum call stack size exceeded".

PR-URL: #38382
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
targos pushed a commit that referenced this pull request Jun 5, 2021
This stops "RangeError: Maximum call stack size exceeded".

PR-URL: #38382
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
targos pushed a commit that referenced this pull request Jun 5, 2021
This stops "RangeError: Maximum call stack size exceeded".

PR-URL: #38382
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
targos pushed a commit that referenced this pull request Jun 11, 2021
This stops "RangeError: Maximum call stack size exceeded".

PR-URL: #38382
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

async_hooks Issues and PRs related to the async hooks subsystem. author ready PRs that have at least one approval, no outstanding review comments, and a CI started. doc Issues and PRs related to the documentations.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants


Back | FazBrowse Home | New Git URL