|Summary:||ASTERISK-21395: High CPU use due to invalid time limit passed to kevent() in pbx_spool.c:scanthread|
|Reporter:||Stuart Henderson (sthen)||Labels:|
|Date Opened:||2013-04-09 09:08:23||Date Closed:||2013-04-09 09:33:44|
|Environment:||OpenBSD since switching to kernel backed threads (in 5.1)||Attachments:|
|Description:||scan_thread() (pbx_spool.c:754) passes an invalid time limit (INT_MAX) to kevent() if the directory list is empty. This results in high CPU use as the call fails with EINVAL (see line 613 of http://www.openbsd.org/cgi-bin/cvsweb/src/sys/kern/kern_time.c?annotate=1.77) and hits the "continue". So in the case where next == INT_MAX, NULL should be passed instead.
Obvious patch is in OpenBSD ports, I won't submit it here directly as I don't particularly want to sign a license disclaimer, but it wouldn't be a big surprise if anyone looking at this came up with an identical fix ;)
|Comments:||By: Matt Jordan (mjordan) 2013-04-09 09:33:44.077-0500|
This is a duplicate of ASTERISK-21176, which will be fixed in Asterisk 11.4.0. There is currently an RC available with this fix, Asterisk 11.4.0-rc1. Please test with that version. If you still have an issue, please let a bug marshal know and we will reopen this issue. Thanks!