Closed nailaiftikhar closed 2 months ago
What execution steps are you taking to cause this error and what application code causes this error? The Assertion failed
leads me to believe this error comes from some use of Node's assert
library. The assert library exists to provide comparisons of logic that output to normal human language, such as for test automation. If this occurs in production and is not the result of some form of test automation the use of the assert library is probably not what you want.
I attempted to execute this in the Node shell repl versions 20.2.0 and 18.15.0 and I could not produce an error:
var cluster=require("cluster");cluster.on('exit', function (worker, code, signal) {console.log(JSON.stringify(worker.process.spawnargs));console.log(trace());console.log(`worker ${worker.proces.pid} died with ${code} and signal ${signal}`);cluster.fork();});
@prettydiff The issue is not due to this code snippet, this is just a part of node cluster implementation. There are multiple incoming requests on production, and the error's reason is not known yet. That's why I pasted the console trace output here, I want to know if there is any way I can debug this error, i.e., the root cause of it. Or at least make it such that the worker never dies, so that other requests handled by that worker do not get aborted.
If the issue is somehow related to clusters I would log the cluster messaging. Clusters coordinate through a messaging scheme.
It seems there has been no activity on this issue for a while, and it is being closed in 30 days. If you believe this issue should remain open, please leave a comment. If you need further assistance or have questions, you can also search for similar issues on Stack Overflow. Make sure to look at the README file for the most updated links.
It seems there has been no activity on this issue for a while, and it is being closed. If you believe this issue should remain open, please leave a comment. If you need further assistance or have questions, you can also search for similar issues on Stack Overflow. Make sure to look at the README file for the most updated links.
Details
I'm encountering an error with the following assertion message:
Assertion failed: (!"unknown EAI_* error code"), function uv_getaddrinfo_translate_error, file src/unix/getaddrinfo.c, line 90.
Node.js version
v18.15.0
Example code
Operating system
Ubuntu Linux