question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Random call stack size exceeded in binaries complied with node v12.2.0

See original GitHub issue

Thanks for updating pkg to support node v12!

It seems that there is a weird bug causing random Maximum call stack size exceeded errors ONLY in binaries complied by pkg targeting node v12.2.0:

Binary compiled by pkg Run directly through node
node v10.15.3
node v12.2.0 Maximum call stack size exceeded

(Tested on Linux / CentOS 7)

Unfortunately, the original code is part of a proprietary software so I could not post it here. But since it does not deal with files, I’m pretty sure the issue is not related to the snapshot file system.

Here are some stack trace samples, seems fully random, the only thing in common is the RangeError: Maximum call stack size exceeded:

06:25:30 [22016]: events.js:196
06:25:30 [22016]: Reflect.apply(handler, this, args);
06:25:30 [22016]: ^
06:25:30 [22016]: RangeError: Maximum call stack size exceeded
06:25:30 [22016]: at Object.emit (events.js:196:13)
06:25:30 [22016]: at endReadableNT (_stream_readable.js:1130:12)
06:25:30 [22016]: at processTicksAndRejections (internal/process/task_queues.js:84:9)
06:07:11 [11185]: _stream_transform.js:140
06:07:11 [11185]: this._flush((er, data) => {
06:07:11 [11185]: ^
06:07:11 [11185]: RangeError: Maximum call stack size exceeded
06:07:11 [11185]: at String.replace (<anonymous>)
06:07:11 [11185]: at Object.prefinish (_stream_transform.js:140:10)
06:07:11 [11185]: at Object.emit (events.js:196:13)
06:18:41 [18060]: internal/timers.js:531
06:18:41 [18060]: timer._onTimeout();
06:18:41 [18060]: ^
06:18:41 [18060]: RangeError: Maximum call stack size exceeded
06:18:41 [18060]: at listOnTimeout (internal/timers.js:531:17)
06:18:41 [18060]: at processTimers (internal/timers.js:475:7)

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:42
  • Comments:72 (4 by maintainers)

github_iconTop GitHub Comments

13reactions
igorklopovcommented, Dec 8, 2019

Fixed in 4.4.1. Please try

10reactions
OneBitAheadcommented, May 26, 2019

Same error occurs on Linux / Ubuntu.

Indeed it seems to be VERY random. Here are some of my stack traces:

/snapshot/oba-core/node_modules/cron/lib/cron.js:562
			this._callbacks[i].call(this.context, this.onComplete);
			                   ^

RangeError: Maximum call stack size exceeded
    at CronJob.fireOnTick (/snapshot/oba-core/node_modules/cron/lib/cron.js:562:23)
    at Timeout.callbackWrapper [as _onTimeout] (/snapshot/oba-core/node_modules/cron/lib/cron.js:629:10)
    at listOnTimeout (internal/timers.js:531:17)
    at processTimers (internal/timers.js:475:7)
events.js:196
    Reflect.apply(handler, this, args);
            ^

RangeError: Maximum call stack size exceeded
    at process.emit (events.js:196:13)
    at processPromiseRejections (internal/process/promises.js:165:18)
    at processTicksAndRejections (internal/process/task_queues.js:90:32)

Besides: You do a great job with pkg!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Random call stack size exceeded in binaries complied with ...
Thanks for updating pkg to support node v12! It seems that there is a weird bug causing random Maximum call stack size exceeded...
Read more >
Maximum call stack size exceeded on npm install
from the official docs: > This command runs the npm build command on the matched folders. This is useful when you install a...
Read more >
Node.js v19.3.0 Documentation
Added in: v14.2.0, v12.19.0. Iterates through the list of functions passed to tracker.calls() and will throw an error for functions that have not...
Read more >
Random crashes with "Maximum call stack size exceeded"
Go to the node-red folder and try the command npm ls graceful-fs This should show you a dependency tree. When you find out...
Read more >
Changelog - Cypress Documentation
ngOnChanges is now called after mounting an Angular component in component testing. Fixes #23591. Code frames for Vite project stack traces now point...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found