balenad[PID]: runtime/cgo: pthread_create failed: Resource temporarily unavailable

Hi Balena team,

I’m running into the same symptom presented in this thread.

While troubleshooting, I noticed balenad logging “shim started” and “shim reaped” every three minutes. Is this normal for containers that are not restarting? I’m hoping the answer to this question might connect with the symptoms stated initially. Thank you!

balena_log.log (7.6 MB)
balena_log2.log (9.5 MB) balena_log3.log (9.5 MB) balena_log4.log (9.5 MB) balena_log5.log (9.5 MB)

Thanks for your report and logs. Is it correct to say you’re also running OS 2.46.1+rev1 as in that thread, and you’re seeing pthread_create failed: Resource temporarily unavailable ?

From reading the logs my initial theory is that the “shim started” / “shim reaped” messages are due to a crashloop of the container engine itself; the shim is just a part of the container runtime which is symptomatic of container starts/stops (so, yes, completely normal for containers that are not restarting, or are restarting but then the container engine exits). As for debugging the root cause, logs show that balenad is exiting with pthread_create failed: Resource temporarily unavailable. Do either of alexgg’s bullet points in this thread comment apply to your case?