Refactor error handling and pass error to the parent process and/or caller of libcontainer
yihuaf opened this issue · comments
If the init process errors, we currently close the channel and exit. The only context around the error are in the logs/traces. This is not good UX for libcontainer interface. A better design is to return error through the channel back to the parent process so the parent process can log it and/or return to the caller.
Example where this error message was confusing: containerd/runwasi#326. There were other issues in the way we consumed the api's but I was expecting the error returned to be an error based on the validation code, i.e was expecting module not found
not failed to receive. \"waiting for init ready\"
,
👍
This is one of the most important features for us. It may seem surprising, but it will probably be a unique feature not found in any runtime.
May I ask if there's any workaround for now to get the error message?
@peter-jerry-ye You can get the error message with bpftrace.
https://containers.github.io/youki/developer/debugging.html