How to resolve EAGAIN (errno 11) from timer_create?
I have this problem where the timer_create returns -1 with errno 11 (EAGAIN) indicating "Temporary error during kernel allocation of timer structures." according to the man page on timer_create. I am using the SIGEV_THREAD_ID for sigev_notify with the sigaction binding a signal handler that eventually gets called in each of the thread requesting the timer. I see that the signal handler gets called 3552 times which is the value for RLIMIT_SIGPENDING's current limit. Signal handler calls timer_create to create another timer every time it is called, so after it is called 3552 times, it fails in the next timer_create call. Why is each signal handler call leaves the signal pending? How do you free this resource?
|