Specification
At this stage the docker image has been deployed to the test net and we have running nodes. But the nodes are crashing during startup due to an error with the password hash.
{
"data": {
"message": "",
"timestamp": "2023-10-13T05:43:56.111Z",
"data": {},
"cause": {},
"stack": "ErrorPasswordHash\n at hashPassword (/lib/node_modules/polykey-cli/node_modules/polykey/dist/keys/utils/password.js:89:15)\n at Object.wrapWithPassword (/lib/node_modules/polykey-cli/node_modules/polykey/dist/keys/utils/symmetric.js:161:53)\n at constructor_.writeKeyPair (/lib/node_modules/polykey-cli/node_modules/polykey/dist/keys/KeyRing.js:545:38)\n at constructor_.setupKeyPair (/lib/node_modules/polykey-cli/node_modules/polykey/dist/keys/KeyRing.js:376:28)\n at async constructor_.start (/lib/node_modules/polykey-cli/node_modules/polykey/dist/keys/KeyRing.js:106:41)\n at async /lib/node_modules/polykey-cli/node_modules/@matrixai/async-init/dist/CreateDestroyStartStop.js:88:34\n at async withF (/lib/node_modules/polykey-cli/node_modules/@matrixai/resources/dist/utils.js:17:16)\n at async KeyRing.createKeyRing (/lib/node_modules/polykey-cli/node_modules/polykey/dist/keys/KeyRing.js:59:9)\n at async PolykeyAgent.createPolykeyAgent (/lib/node_modules/polykey-cli/node_modules/polykey/dist/PolykeyAgent.js:170:23)\n at async /lib/node_modules/polykey-cli/dist/agent/CommandStart.js:190:31",
"description": "Failed to hash password",
"exitCode": 69
},
"type": "ErrorPasswordHash"
}
The running theory right now is that this process is running out of memory. Even after updating the task to run the agent with minimum ops and memory for password hashing.
I'll need to investigate memory usage and work out the root cause of this problem. I can try the following steps.
- Run the docker image with limited memory to try and trigger the problem.
- If I can trigger the problem, find an estimate of the amount of memory required to run a node.
- Sanity check the problem by spinning up a larger EC2 instance and manually testing it.
Additional context
Tasks
- Investigate the root cause of the password hashing failure
- Investigate memory usage of the
PolykeyAgent.
- Possibly apply memory optimisations.
Specification
At this stage the docker image has been deployed to the test net and we have running nodes. But the nodes are crashing during startup due to an error with the password hash.
{ "data": { "message": "", "timestamp": "2023-10-13T05:43:56.111Z", "data": {}, "cause": {}, "stack": "ErrorPasswordHash\n at hashPassword (/lib/node_modules/polykey-cli/node_modules/polykey/dist/keys/utils/password.js:89:15)\n at Object.wrapWithPassword (/lib/node_modules/polykey-cli/node_modules/polykey/dist/keys/utils/symmetric.js:161:53)\n at constructor_.writeKeyPair (/lib/node_modules/polykey-cli/node_modules/polykey/dist/keys/KeyRing.js:545:38)\n at constructor_.setupKeyPair (/lib/node_modules/polykey-cli/node_modules/polykey/dist/keys/KeyRing.js:376:28)\n at async constructor_.start (/lib/node_modules/polykey-cli/node_modules/polykey/dist/keys/KeyRing.js:106:41)\n at async /lib/node_modules/polykey-cli/node_modules/@matrixai/async-init/dist/CreateDestroyStartStop.js:88:34\n at async withF (/lib/node_modules/polykey-cli/node_modules/@matrixai/resources/dist/utils.js:17:16)\n at async KeyRing.createKeyRing (/lib/node_modules/polykey-cli/node_modules/polykey/dist/keys/KeyRing.js:59:9)\n at async PolykeyAgent.createPolykeyAgent (/lib/node_modules/polykey-cli/node_modules/polykey/dist/PolykeyAgent.js:170:23)\n at async /lib/node_modules/polykey-cli/dist/agent/CommandStart.js:190:31", "description": "Failed to hash password", "exitCode": 69 }, "type": "ErrorPasswordHash" }The running theory right now is that this process is running out of memory. Even after updating the task to run the agent with minimum ops and memory for password hashing.
I'll need to investigate memory usage and work out the root cause of this problem. I can try the following steps.
Additional context
Tasks
PolykeyAgent.