Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

node-red Fatal error in , line 0 - unreachable code #13922

Closed
scsi1042 opened this issue Jun 26, 2017 · 12 comments
Closed

node-red Fatal error in , line 0 - unreachable code #13922

scsi1042 opened this issue Jun 26, 2017 · 12 comments
Labels
v8 engine Issues and PRs related to the V8 dependency.

Comments

@scsi1042
Copy link

scsi1042 commented Jun 26, 2017

I am using the following node-red flow:

[{"id":"ecec44fb.2d6f5","type":"tab","label":"OPC UA Server"},{"id":"a57b5fc8.8c79d8","type":"subflow","name":"simulateS7Signals","info":"","in":[{"x":199,"y":118,"wires":[{"id":"426e8a1c.753f04"},{"id":"18044d2e.ce4443"},{"id":"17426373.6430d5"}]}],"out":[{"x":1133,"y":359,"wires":[{"id":"17426373.6430d5","port":0}]},{"x":1138,"y":415,"wires":[{"id":"3259943.2f25fec","port":0}]},{"x":1135,"y":471,"wires":[{"id":"32410f8c.c3dd48","port":0}]}]},{"id":"9cbf1f92.d913b8","type":"subflow","name":"countSignals","info":"","in":[{"x":240,"y":320,"wires":[{"id":"f598eabd.8b9138"}]}],"out":[{"x":1040,"y":280,"wires":[{"id":"44330f4a.d2b538","port":0}]}]},{"id":"18044d2e.ce4443","type":"delay","z":"a57b5fc8.8c79d8","name":"Entdeckeln fertig","pauseType":"delay","timeout":"10500","timeoutUnits":"milliseconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"2","randomLast":"5","randomUnits":"seconds","drop":false,"x":590,"y":400,"wires":[["221682e.abf95fe","3259943.2f25fec"]]},{"id":"221682e.abf95fe","type":"delay","z":"a57b5fc8.8c79d8","name":"Entleeren fertig","pauseType":"delay","timeout":"9500","timeoutUnits":"milliseconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"2","randomLast":"5","randomUnits":"seconds","drop":false,"x":826,"y":476,"wires":[["32410f8c.c3dd48"]]},{"id":"426e8a1c.753f04","type":"delay","z":"a57b5fc8.8c79d8","name":"","pauseType":"delay","timeout":"500","timeoutUnits":"milliseconds","rate":"1","nbRateUnits":"1","rateUnits":"second","randomFirst":"2","randomLast":"5","randomUnits":"seconds","drop":false,"x":160,"y":320,"wires":[["504bbce2.24da44"]]},{"id":"17426373.6430d5","type":"function","z":"a57b5fc8.8c79d8","name":"Add Topic","func":"msg.topic=\"Vereinzler\"\nreturn msg;","outputs":1,"noerr":0,"x":660,"y":240,"wires":[[]]},{"id":"3259943.2f25fec","type":"function","z":"a57b5fc8.8c79d8","name":"Add Topic","func":"msg.topic=\"Entdeckeln\"\nreturn msg;","outputs":1,"noerr":0,"x":820,"y":360,"wires":[[]]},{"id":"32410f8c.c3dd48","type":"function","z":"a57b5fc8.8c79d8","name":"Add Topic","func":"msg.topic=\"Entleeren\"\nreturn msg;","outputs":1,"noerr":0,"x":1040,"y":480,"wires":[[]]},{"id":"504bbce2.24da44","type":"function","z":"a57b5fc8.8c79d8","name":"Negierer","func":"if (msg.payload){\n    msg.payload = false;\n}\nelse {\n    msg.payload = true;\n}\nreturn msg;","outputs":1,"noerr":0,"x":360,"y":300,"wires":[["17426373.6430d5","18044d2e.ce4443"]]},{"id":"f598eabd.8b9138","type":"counter","z":"9cbf1f92.d913b8","name":"","init":"0","step":"1","lower":"","upper":"","mode":"increment","outputs":"1","x":480,"y":340,"wires":[["9a25cb22.30d088","44330f4a.d2b538"]]},{"id":"9a25cb22.30d088","type":"function","z":"9cbf1f92.d913b8","name":"resetCounter","func":"if (msg.count >= 10){\n    msg = {};\n    msg.reset = true;\n    return msg;\n}\nelse {\n    return null;\n}\n","outputs":1,"noerr":0,"x":510,"y":420,"wires":[["f598eabd.8b9138"]]},{"id":"44330f4a.d2b538","type":"function","z":"9cbf1f92.d913b8","name":"excludeReset & setPayloadToCount","func":"if (!msg.reset){\n    msg.payload = msg.count\n    return msg;\n}\nelse {\n    return null;\n}\n","outputs":1,"noerr":0,"x":790,"y":280,"wires":[[]]},{"id":"197c9512.c78a93","type":"debug","z":"ecec44fb.2d6f5","name":"","active":true,"console":"true","complete":"payload","x":626,"y":51,"wires":[]},{"id":"7b084e6e.3cad","type":"OpcUa-Server","z":"ecec44fb.2d6f5","port":"53880","name":"OPC-UA Server","endpoint":"UA/SimpleNodeRedServer","x":380,"y":100,"wires":[["197c9512.c78a93"]]},{"id":"c7b9ce05.64a298","type":"inject","z":"ecec44fb.2d6f5","name":"New variable (Boolean)","topic":"ns=4;s=Fehlerzustand;datatype=Boolean","payload":"{ \"opcuaCommand\": \"addVariable\" }","payloadType":"json","repeat":"","crontab":"","once":true,"x":140,"y":60,"wires":[["8357155f.aac24","197c9512.c78a93"]]},{"id":"8357155f.aac24","type":"stoptimer","z":"ecec44fb.2d6f5","duration":"150","units":"Second","payloadtype":"num","payloadval":"0","name":"","x":270,"y":200,"wires":[["7b084e6e.3cad"],[]]}]

Versions of program:
node-red v0.15.2
node-red-contrib-opcua v0.2.16

Eventually, I want to read out values via s7 node and after some data processing write it into the opc ua server through the opc ua client. Everything is running in the same node-red application.
I discovered that the error occurs when I only run the opc ua server. Thus I limited the program to this part.

After a random time between 10 and 30 min, node red crashes. The console displays the following error message:


#
# Fatal error in , line 0
# unreachable code
#

==== C stack trace ===============================

 1: V8_Fatal
 2: 0x891e307
 3: v8::internal::LCodeGenBase::GenerateBody()
 4: v8::internal::LCodeGen::GenerateCode()
 5: v8::internal::LChunk::Codegen()
 6: v8::internal::OptimizedCompileJob::GenerateCode()
 7: v8::internal::Compiler::FinalizeOptimizedCompileJob(v8::internal::OptimizedCompileJob*)
 8: v8::internal::OptimizingCompileDispatcher::InstallOptimizedFunctions()
 9: v8::internal::StackGuard::HandleInterrupts()
10: v8::internal::Runtime_StackGuard(int, v8::internal::Object**, v8::internal::Isolate*)
11: 0x4180a07e
12: 0x3ac3fd1f
13: 0x4181fd9e
14: 0x4181bd23
15: 0x85da06a
16: v8::internal::Execution::Call(v8::internal::Isolate*, v8::internal::Handle<v8::internal::Object>, v8::internal::Handle<v8::internal::Object>, int, v8::internal::Handle<v8::internal::Object>*)
17: v8::Function::Call(v8::Local<v8::Context>, v8::Local<v8::Value>, int, v8::Local<v8::Value>*)
18: v8::Function::Call(v8::Local<v8::Value>, int, v8::Local<v8::Value>*)
19: node::AsyncWrap::MakeCallback(v8::Local<v8::Function>, int, v8::Local<v8::Value>*)
20: 0x89a5cbb
21: 0x89f1d30
22: uv_run
23: node::Start(int, char**)
24: main
25: __libc_start_main
Illegal instruction (core dumped)

I need my end application to run 24/7 thus I need to stop this crashing of node red. Can anyone help?

A core dump (ca. 155MB) has been created. I am not sure how and which further information to provide from this file. Please advice.

@evanlucas
Copy link
Contributor

/cc @nodejs/v8 ?

@bnoordhuis
Copy link
Member

Node.js version, platform, etc.?

@mscdex mscdex added the v8 engine Issues and PRs related to the V8 dependency. label Jun 26, 2017
@scsi1042
Copy link
Author

Version: node.js v6.9.2
Platform: Linux iot2000 4.4.18-yocto-standard #1 PREEMPT Thu Feb 2 07:22:31 CST 2017 i586 i586 i386 GNU/Linux
Processor: Intel Quark® x1020 400 MHz

@bnoordhuis
Copy link
Member

Thanks. Am I right the x1020 doesn't support SSE2?

@refack
Copy link
Contributor

refack commented Jun 27, 2017

Thanks. Am I right the x1020 doesn't support SSE2?

AFAICT no instruction set extensions at all:
image
https://ark.intel.com/compare/97462,82485

@bnoordhuis
Copy link
Member

Right, that would explain it. V8 doesn't support such systems and, by implication, neither does node.

It might be possible to sidestep the issue by running with --nocrankshaft but that a) disables the optimizing compiler, b) may not work going forward, and c) may not work at all. YMMV.

I'll close the issue because regrettably this is outside our control. V8 had a x87 back-end at one time for non-SSE systems but unfortunately it bitrotted and was never officially supported by us - you had to hack the build system.

@scsi1042
Copy link
Author

The --nocrancshaft helped to avoid the crash of the application, but then I also get some other downsides with other parts.
Just to clarify. If I would write a node application including the same functionality without using the node-red environment, it would probably still crash if the crankshaft controller is used, because this issue is connected to the use of node on my specific system - and not specifically to the node-red environment?

@bnoordhuis
Copy link
Member

I can't speak to node-red but node is not compatible with your system, yes.

@refack
Copy link
Contributor

refack commented Jun 29, 2017

@scsi1042 IMHO you should file a bug upstream with V8 (support for pure x86). They might be interested as this platform becomes more popular... After all V8 can run on ARM and MIPS 🤷‍♂️
If you do, reference it here, I'll upvote.
https://bugs.chromium.org/p/v8/issues/list

@bnoordhuis
Copy link
Member

They are (must be) aware of the issue. Intel contributed and maintained the x87 back-end but they seem to have lost interest. I had a stab at fixing it up (commits) but I ran out of time.

See also this v8-dev thread (scroll down a little.)

@ofrobots
Copy link
Contributor

FYI, V8 team just announced that x87 port is going away soon: https://groups.google.com/forum/#!topic/v8-dev/SJU63-g84fQ

@SilviuToc
Copy link

Hello,
I'm getting the same error when using the OPC-UA server in node-red.
device: IOT2040; OS: linux YOCTO v2.4.0
Has the problem been solved? Or the V8 removed the x87 forever ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
v8 engine Issues and PRs related to the V8 dependency.
Projects
None yet
Development

No branches or pull requests

7 participants