v8go
v8go copied to clipboard
__gnu_cxx recursive init error on multiple goroutines creating isolates at the same time
When creating new isolates in multiple goroutines at the same time, I get the following crash message:
terminate called recursively
terminate called after throwing an instance of '__gnu_cxx::recursive_init_error'
what(): std::exception
SIGABRT: abort
PC=0x7ff2f869722d m=27 sigcode=18446744073709551610
signal arrived during cgo execution
goroutine 3463 [syscall]:
runtime.cgocall(0x773bdf0, 0xc0005b9808)
/usr/local/go/src/runtime/cgocall.go:158 +0x5c fp=0xc0005b97e0 sp=0xc0005b97a8 pc=0x286007c
rogchap.com/v8go._Cfunc_NewIsolate()
_cgo_gotypes.go:745 +0x49 fp=0xc0005b9808 sp=0xc0005b97e0 pc=0x73a3a89
rogchap.com/v8go.NewIsolate()
/go/pkg/mod/rogchap.com/[email protected]/isolate.go:59 +0x39 fp=0xc0005b9858 sp=0x
c0005b9808 pc=0x73acb59
github.com/solo-io/gloo-mesh-enterprise/pkg/translator/plugins/graphql.NewStitchingScriptRunner()
I've tried to do a little testing myself and believe that multiple goroutines are hanging on this line: https://github.com/rogchap/v8go/blob/master/v8go.cc#L154
Why version of this package are you using? I am on v0.7.0 and I can create a new isolate per http request (which runs on its own goroutine)