Hey Guys,
First off thanks for any help in advance!
I'm adding a single avp test i.e. $avp(s:some-avp-name) = 'foo!'; to a development configuration running Kamailio revision: 5487 (1.4.3). When I start kamailio I'm getting the following error:
CRITICAL:core:init_io_wait: could not alloc epoll array
As soon as I delete this AVP addition and start her back up, she starts.
Code Snippet (io_wait.c)
606 #ifdef HAVE_EPOLL 607 case POLL_EPOLL_LT: 608 case POLL_EPOLL_ET: 609 h->ep_array=local_malloc(sizeof(*(h->ep_array))*h->max_fd_no); 610 if (h->ep_array==0){ 611 LM_CRIT("could not alloc epoll array\n"); 612 goto error; 613 } 614 memset((void*)h->ep_array, 0, sizeof(*(h->ep_array))*h->max_fd_no); 615 if (init_epoll(h)<0){ 616 LM_CRIT("epoll init failed\n"); 617 goto error; 618 } 619 break; 620 #endif
I do not know enough of Kamailio CORE but it looks like something to do with memory allocation / file descriptors? I've increased available memory to kamailio as well as open file limits / file descriptors etc -- to no avail, any help is much appreciated thanks guys!
On Dienstag, 16. Juni 2009, Brandon Armstead wrote:
I'm adding a single avp test i.e. $avp(s:some-avp-name) = 'foo!'; to a development configuration running Kamailio revision: 5487 (1.4.3). When I start kamailio I'm getting the following error:
Hi Brandon,
CRITICAL:core:init_io_wait: could not alloc epoll array
I'd guess this is related to the EPOLL support that is used to efficiently get notified when something on the file descriptor arrives, so basically its necessary for TCP support.
As soon as I delete this AVP addition and start her back up, she starts.
Code Snippet (io_wait.c)
606 #ifdef HAVE_EPOLL [..] 620 #endif
I do not know enough of Kamailio CORE but it looks like something to do with memory allocation / file descriptors? I've increased available memory to kamailio as well as open file limits / file descriptors etc -- to no avail, any help is much appreciated thanks guys!
This is really strange, i really could not imagine how an AVP operation like this could be related to the TCP core infrastructure. Do you notice some other (earlier) errors in the logs? Perhaps its just something that its generated because its stop from an earlier error?
Henning
Henning,
No earlier errors, kamailio starts up like normal from a syslog point of view, "RTP Enabled" followed by:
verbose 3 Jun 16 16:30:14 sipdev /sbin/kamailio[6364]: CRITICAL:core:init_io_wait: could not alloc epoll array Jun 16 16:30:14 sipdev /sbin/kamailio[6364]: CRITICAL:core:tcp_receive_loop: exiting... Jun 16 16:30:14 sipdev /sbin/kamailio[6338]: INFO:core:handle_sigs: child process 6364 exited normally, status=255 Jun 16 16:30:14 sipdev /sbin/kamailio[6338]: INFO:core:handle_sigs: terminating due to SIGCHLD
verbose 5: pretty much shows the same: Jun 16 16:33:57 sipdev /sbin/kamailio[6537]: CRITICAL:core:init_io_wait: could not alloc epoll array Jun 16 16:33:57 sipdev /sbin/kamailio[6537]: CRITICAL:core:tcp_receive_loop: exiting... Jun 16 16:33:57 sipdev /sbin/kamailio[6541]: CRITICAL:core:receive_fd: EOF on 40 Jun 16 16:33:57 sipdev /sbin/kamailio[6538]: CRITICAL:core:init_io_wait: could not alloc epoll array Jun 16 16:33:57 sipdev /sbin/kamailio[6538]: CRITICAL:core:tcp_receive_loop: exiting...
No other errors that I can see.
On Tue, Jun 16, 2009 at 8:03 AM, Henning Westerholt < henning.westerholt@1und1.de> wrote:
On Dienstag, 16. Juni 2009, Brandon Armstead wrote:
I'm adding a single avp test i.e. $avp(s:some-avp-name) = 'foo!'; to a development configuration running Kamailio revision: 5487 (1.4.3). When I start kamailio I'm getting the following error:
Hi Brandon,
CRITICAL:core:init_io_wait: could not alloc epoll array
I'd guess this is related to the EPOLL support that is used to efficiently get notified when something on the file descriptor arrives, so basically its necessary for TCP support.
As soon as I delete this AVP addition and start her back up, she starts.
Code Snippet (io_wait.c)
606 #ifdef HAVE_EPOLL [..] 620 #endif
I do not know enough of Kamailio CORE but it looks like something to do with memory allocation / file descriptors? I've increased available
memory
to kamailio as well as open file limits / file descriptors etc -- to no avail, any help is much appreciated thanks guys!
This is really strange, i really could not imagine how an AVP operation like this could be related to the TCP core infrastructure. Do you notice some other (earlier) errors in the logs? Perhaps its just something that its generated because its stop from an earlier error?
Henning
On Dienstag, 16. Juni 2009, you wrote:
No earlier errors, kamailio starts up like normal from a syslog point of view, "RTP Enabled" followed by:
Brandon,
this is strange. Never saw this error before. Perhaps you can try to isolate this strange error (usage of AVP causes this core problem) to a minimal cfg file, and then just send it to me? Then i can also try to reproduce it on my machine.
verbose 3 Jun 16 16:30:14 sipdev /sbin/kamailio[6364]: CRITICAL:core:init_io_wait: could not alloc epoll array
You could advise the server to use another polling method i think, or just disable TCP completely, but this would be of course not fix the real problem.
Henning
Henning,
I'll go ahead and compose a sample configuration and attempt to reproduce this error, I did a grep for the current count of AVP assignments I have currently setup, there are approximately 147 + some avp_db_query return / result sets. Do you think it'll be enough for me to just but a very very very basic script together and place this same amount of AVP assignments in the configuration? i.e.
$avp(s:test1) = 1; $avp(s:test2) = 1; $avp(s:test3) = 1; $avp(s:test4) = 1; $avp(s:test5) = 1; etc.... ?
Thanks!
On Wed, Jun 17, 2009 at 4:50 AM, Henning Westerholt < henning.westerholt@1und1.de> wrote:
On Dienstag, 16. Juni 2009, you wrote:
No earlier errors, kamailio starts up like normal from a syslog point of view, "RTP Enabled" followed by:
Brandon,
this is strange. Never saw this error before. Perhaps you can try to isolate this strange error (usage of AVP causes this core problem) to a minimal cfg file, and then just send it to me? Then i can also try to reproduce it on my machine.
verbose 3 Jun 16 16:30:14 sipdev /sbin/kamailio[6364]: CRITICAL:core:init_io_wait: could not alloc epoll array
You could advise the server to use another polling method i think, or just disable TCP completely, but this would be of course not fix the real problem.
Henning
On Donnerstag, 18. Juni 2009, you wrote:
I'll go ahead and compose a sample configuration and attempt to
reproduce this error, I did a grep for the current count of AVP assignments I have currently setup, there are approximately 147 + some avp_db_query return / result sets. Do you think it'll be enough for me to just but a very very very basic script together and place this same amount of AVP assignments in the configuration? i.e.
$avp(s:test1) = 1; $avp(s:test2) = 1; $avp(s:test3) = 1; $avp(s:test4) = 1; $avp(s:test5) = 1; etc.... ?
Brandon,
another idea: what PKG_MEM pool size do you use for the server, only 1 MB? Perhaps can you try to increase this, to see if the error goes then away, just to see if its perhaps a real low memory condition, something caused from the cfg size or similar.
If i want to get a minimal cfg for reproducing a problem i usually start with the one that shows the error and then remove block by block until the error did not show up anymore. After a few iteration you usually end up with a fairly good result.
Henning