Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

uploading large files on node v19.8.0 pops the stack #641

Closed
olizilla opened this issue Mar 24, 2023 · 2 comments
Closed

uploading large files on node v19.8.0 pops the stack #641

olizilla opened this issue Mar 24, 2023 · 2 comments
Assignees
Milestone

Comments

@olizilla
Copy link
Contributor

as noted by @alanshaw via the w3cli on node v19.8.0

$ w3 up ~/Dropbox/Videos/Snowboarding/2004\ Les\ Arcs.mp4     
  1 file (0.1GB)
⠙ Storingnode:internal/blob:277
      reader.pull((status, buffer) => {
             ^

RangeError: Maximum call stack size exceeded
    at readNext (node:internal/blob:277:14)
    at BlobReader.<anonymous> (node:internal/blob:293:9)
    at readNext (node:internal/blob:277:14)
    at BlobReader.<anonymous> (node:internal/blob:293:9)
    at readNext (node:internal/blob:277:14)
    at BlobReader.<anonymous> (node:internal/blob:293:9)
    at readNext (node:internal/blob:277:14)
    at BlobReader.<anonymous> (node:internal/blob:293:9)
    at readNext (node:internal/blob:277:14)
    at BlobReader.<anonymous> (node:internal/blob:293:9)

Node.js v19.8.0
@alanshaw alanshaw mentioned this issue Mar 27, 2023
23 tasks
@heyjay44 heyjay44 added this to the w3up phase 4 milestone Mar 29, 2023
@travis travis self-assigned this Apr 6, 2023
@travis
Copy link
Contributor

travis commented Apr 7, 2023

Looks like this is indeed only 19.8, and happens when the filesize gets to about 50MB:

➜  w3cli git:(main) ✗ head -c 40000000 < /dev/random > testfile
➜  w3cli git:(main) ✗ ./shim.js up testfile
  1 file (40.0MB)
  bagbaiera3ztt4ayi5twgq5rmjkdd4ljln5xyd2k2q2472c5he426gkmpthpa
⁂ Stored 1 file
⁂ https://w3s.link/ipfs/bafybeifkwowy7b4lh5i56nsazgzk3cxtj3w7rj2juooklra2n23xlhpf7q
➜  w3cli git:(main) ✗ head -c 50000000 < /dev/random > testfile
➜  w3cli git:(main) ✗ ./shim.js up testfile
  1 file (0.1GB)
⠋ Storingnode:internal/blob:277
      reader.pull((status, buffer) => {
             ^

RangeError: Maximum call stack size exceeded
    at readNext (node:internal/blob:277:14)
    at BlobReader.<anonymous> (node:internal/blob:293:9)
    at readNext (node:internal/blob:277:14)
    at BlobReader.<anonymous> (node:internal/blob:293:9)
    at readNext (node:internal/blob:277:14)
    at BlobReader.<anonymous> (node:internal/blob:293:9)
    at readNext (node:internal/blob:277:14)
    at BlobReader.<anonymous> (node:internal/blob:293:9)
    at readNext (node:internal/blob:277:14)
    at BlobReader.<anonymous> (node:internal/blob:293:9)

Node.js v19.8.1
➜  w3cli git:(main) ✗ nvm use 19.7
Now using node v19.7.0 (npm v9.5.0)
➜  w3cli git:(main) ✗ ./shim.js up testfile
  1 file (0.1GB)
  bagbaieradlu5kkdkgxvt3po5ko4ugftg4kyxj4ahmoim4754aojze7vfzeaa
⁂ Stored 1 file
⁂ https://w3s.link/ipfs/bafybeibenmy6qe5lo7nveco7wdfe6yhfztfinqcria257xadfdwliuqq4e

@travis
Copy link
Contributor

travis commented Apr 7, 2023

Looks like this is a bug that was reported in reported nodejs/node#47301 and has already been fixed in nodejs/node#47320!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants