Unexpected stacklimit changes after upgrading v8

7 views
Skip to first unread message

Jeroen Ooms

unread,
Jun 17, 2020, 5:42:03 AM6/17/20
to v8-dev
Hi! I was wondering if I could get some advise about the following:

I maintain libv8 bindings for the R programming language, which are used by a few dozen R packages to wrap JS libraries. We started seeing problems on one test server after upgrading from Fedora 30 (V8-6.8.275.32-node.55) to Fedora 32 (V8-7.8.279.23-node.35).

What happens is that for some packages (that work fine F30/MacOS/Debian/Windows), now on F32 we see strange test failures. Debugging reveals that v8::Script->Run() returns an empty result, but the v8::TryCatch is also empty. This is something I had not encountered before. After some investigation, I now suspect that these applications are hitting the stack limit.

So this leaves me with a few questions:

 - Has the libv8 default stack limit changed between version 6.8 and 7.8?

 - Should I be setting a default isolate->SetStackLimit() in my bindings? If so what is a safe limit? I tried copying the value from chromium 500*1024 but that didn't seem sufficient for some applications, I had to raise it to 2000*1024. But I'm worried that if I set it too high, V8 will reach the C stack limit on some platforms, and crash.

 - Is there something I can improve in the bindings to see a more helpful error if we hit the stack limit? I am setting isolate->SetFatalErrorHandler() to but that doesn't seem to get triggered.

Thanks for any advice!

Reply all
Reply to author
Forward
0 new messages