…you might want to check if you’re calling
pthread_detach somewhere along the lifetime on that thread. If you don’t detach the thread the internal pthread structures will keep being allocated and leaked until you hit
At this point
pthread_create will fail on each call.