Closed mccoysc closed 2 years ago
and also,in normal nodejs env,if i call some times,it also throw an error "SIGSEGV" and killed. it seems that you have some memory error in code.
my code just like this:
//only call this once. py=new interpreter()// i just export your class,not the instance of your class.
//may call many times: pymodule=py.importSync("someMod") pymodule.execSync(pymodule,params) pymodule.evalSync(pymodule,parms)
at some time,the code cause nodejs crashed with SIGSEGV
i found that some time it crashed at evalSync with py code "data" and really,data is not defined in py file.
but,it don't crash every time,just "some time".
Please attach a reproducable standalone example. What are your OS and node versions?
Please attach a reproducable standalone example. What are your OS and node versions?
any code that run nodejs and require node-calls-python in gramine-sgx would repruduce the error. about gramine-sgx: https://github.com/gramineproject/gramine
i add some logs to your cpp code,and this is the logs:
@hmenyus
and more: if you create a worker,in the worker you require node-calls-python. and call some api like importSync("import tensorflow") and execSync. and then terminate the worker.
and loop the above,maybe the node-calls-python would crash node process some time.
I cannot reproduce your problem with workers.
Regarding gramine: I do not have time to help you with this. Ubuntu, windows, mac work fine.
In the meantime I have added some improvements to some edge-cases in 1.7.5. Hopefully that will help you.
the module work well in linux,but get crashed without any error info in gramine-sgx when loaded.
i found a debug info via gramine-sgx which said that "memory access error at address 0.
and also,i can run python by spawn("python").so the error must be caused by node-calls-python.