-
Notifications
You must be signed in to change notification settings - Fork 196
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
Can't create child processes with node.js inside gramine #600
Comments
So it looks like I suspect that your machine is running out of physical memory (RAM + swap file). Some references to better understand this issue:
So I would like to ask you to root cause the problem a bit further:
If it turns out that indeed your machine has too-small RAM + swapfile, and that's why Gramine can't create a child process, then you have several choices:
|
Thanks for the quick response @dimakuv. Indeed it was an issue with resource limitation, which I already suspected since the virtual machine was also terminating the Vscode SSH server when I started the gramine container. I have added a swapfile to the VM to extend the memory available although as you predicted, it is performing really slow. The ideal solution would be to increase the memory available on the VM. |
Description of the problem
I am trying to run a simple node.js program inside gramine, based on the nodejs.manifest.template.
The enclave crashes whenever I start any child process through node (which uses fork) and I am not sure what the cause is for this. Would really appreciate if someone has more knowledge what the issue may be.
Steps to reproduce
Here is my manifest file, minimal changes from the above example:
Here is the code I am trying to run using the command:
gramine-sgx nodejs test.js
:fibonacci.js is just a simple function that computes fibonacci number up to n, which is hardcoded in the file.
Expected results
I expected the code to work and give me the Fibonacci number as it does when I run It on my machine or using
gramine-direct nodejs test.js
Actual results
I am getting this error when I try to run the module, seems like node.js can't be spawned:
error: Failed to initialize child process: -24
Additional information
Actually, the code I am trying to run is just a sandbox example for testing child processes in nodejs, in reality I want to be able to execute a shell command using
child_process.exec("pwd")
for example. I tried that first and also added the/bin/sh
binaries to gramine but that has the same issue as described above.Gramine commit hash
The text was updated successfully, but these errors were encountered: