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
I can't reproduce locally. Can you turn on core dump (ulimit -c unlimited) and check the backtrace (the bt command) in gdb? Does it happen for you with node 8?
@bnoordhuis
Thx, that's a good idea!
Unfortunately, my app cannot running on v8.1.2 for the contextify module.
And I'm trying to get the backtrace without forever.
sudo gdb xxx/xxx/node
(gdb) run xxx/xxx/start.js
Then the backtrace is found.
Thread 1 "node" received signal SIGSEGV, Segmentation fault.
0x000000000109a411 innode::PromiseRejectCallback(v8::PromiseRejectMessage) ()
(gdb) bt
#0 0x000000000109a411 in node::PromiseRejectCallback(v8::PromiseRejectMessage) ()#1 0x0000000000d550cf in v8::internal::Isolate::ReportPromiseReject(v8::internal::Handle<v8::internal::JSObject>, v8::internal::Handle<v8::internal::Object>, v8::PromiseRejectEvent) ()#2 0x0000000000eb6f79 in v8::internal::Runtime_PromiseRejectEvent(int, v8::internal::Object**, v8::internal::Isolate*) ()#3 0x00003234f0c092a7 in ?? ()#4 0x00003234f0c091e1 in ?? ()#5 0x00003234f0c091e1 in ?? ()#6 0x00007fffffffa4b0 in ?? ()#7 0x0000000300000000 in ?? ()#8 0x00007fffffffa510 in ?? ()#9 0x00003234f132c385 in ?? ()#10 0x000020c102904271 in ?? ()#11 0x000031dd11950629 in ?? ()#12 0x00002590b51f77c9 in ?? ()#13 0x000020c102904271 in ?? ()#14 0x0000088ec92189f1 in ?? ()#15 0x0000088ec9217f61 in ?? ()#16 0x00007fffffffa550 in ?? ()#17 0x00003234f132c1f0 in ?? ()#18 0x000031dd11950629 in ?? ()
Should get any more dump?
(Sorry for not familier with gdb dump)
Yes, it's a contextify issue. Contexts created by node have a pointer to node's execution environment but contextify's contexts don't. The segfault you get is node trying to look up that pointer. Unfortunately, there is no way for node to check if a context has that pointer or not.
FWIW, you shouldn't need contextify with node 8 (and neither with node 6, I think), the built-in vm module should be able to do everything contextify does.
In fact, I thought jsdom was already using vm. Perhaps you are using an old version?
I understand the reason!
You are correct that the jsdom seems to be a little bit old for the new version of node.
I'll try to upgrade jsdom module. Thank you very much!
ADDITIONAL:
If you know, let me know why the error is not occured when with setImmediate.
Activity
bnoordhuis commentedon Jun 19, 2017
I can't reproduce locally. Can you turn on core dump (
ulimit -c unlimited) and check the backtrace (thebtcommand) in gdb? Does it happen for you with node 8?ystskm commentedon Jun 19, 2017
@bnoordhuis
Thx, that's a good idea!
Unfortunately, my app cannot running on v8.1.2 for the contextify module.
And I'm trying to get the backtrace without forever.
Then the backtrace is found.
Should get any more dump?
(Sorry for not familier with gdb dump)
bnoordhuis commentedon Jun 19, 2017
Thanks, that's helpful. Can you paste the output of
info registersanddisassemble?ystskm commentedon Jun 19, 2017
okay!
bnoordhuis commentedon Jun 19, 2017
Let me guess, those examples you posted are running inside a contextify context?
ystskm commentedon Jun 19, 2017
In fact, these codes are running on JSDOM.
Oh, that's a good hint!
I found the suspcious Segmentation fault!
(1-1) jsdom@3.1.1(my use)
(1-2) jsdom@3.1.1(my use)
(2-1) jsdom@6.5.1(checking module)
(2-2) jsdom@6.5.1(checking module)
Should think is contextify bug?
I know the logic is running on Node v0.12.10. with using es6-promise module.
bnoordhuis commentedon Jun 19, 2017
Yes, it's a contextify issue. Contexts created by node have a pointer to node's execution environment but contextify's contexts don't. The segfault you get is node trying to look up that pointer. Unfortunately, there is no way for node to check if a context has that pointer or not.
FWIW, you shouldn't need contextify with node 8 (and neither with node 6, I think), the built-in vm module should be able to do everything contextify does.
In fact, I thought jsdom was already using vm. Perhaps you are using an old version?
ystskm commentedon Jun 19, 2017
I understand the reason!
You are correct that the jsdom seems to be a little bit old for the new version of node.
I'll try to upgrade jsdom module. Thank you very much!
ADDITIONAL:
If you know, let me know why the error is not occured when with setImmediate.