You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Tamdrea, this example is used to demo how napajs support recursive execution, which will involve a lots of stack operation. I've tested it with a even larger input in my client, it worked well. I was wondering whether it is because of some configuration in your environment (memory limit? any VM used?), something like mentioned in this article https://kb.iu.edu/d/aqsj
Checking shell limits
As noted in the last example above, some segfault problems are not due to bugs in your program, but are caused instead by system memory limits being set too low. Usually it is the limit on stack size that causes this kind of problem. To check memory limits, use the ulimit command in bash or ksh, or the limit command in csh or tcsh. Try setting the stacksize higher, and then re-run your program to see if the segfault goes away.
@tamdrea With a naive implementation of this example, it will run into segment fault due to super large memory consumption when you evaluate a larger fibonacci number. It's limited by the hardware condition.
At this same time, for a reasonable small input, we just figure out the exmaple works well by node <= v8.4.0 on linux, and it will fail with random callstacks by node >=v8.5.0 . We are working on it, and let's track it by #96
If you change the Fibonacci example to:
Sometime you receive:
Fatal error in ../deps/v8/src/runtime/runtime-promise.cc, line 59
Check failed: args[0]->IsJSPromise().
Illegal instruction
Sometimes a segmentation fault:
run n: 20
Segmentation fault
This happen running with debian 9.2
The text was updated successfully, but these errors were encountered: