Summary: | ASTERISK-11346: 100% CPU if zaptel timing fails | ||
Reporter: | Tzafrir Cohen (tzafrir) | Labels: | |
Date Opened: | 2008-01-31 12:43:07.000-0600 | Date Closed: | 2008-02-08 11:59:39.000-0600 |
Priority: | Minor | Regression? | No |
Status: | Closed/Complete | Components: | Channels/chan_iax2 |
Versions: | Frequency of Occurrence | ||
Related Issues: | |||
Environment: | Attachments: | ||
Description: | I seem to have some older zaptel modules loaded (unlikely) or maybe somewhere in the build process the wrong zaptel.h was used (a bit more likely). Anyway right now Asterisk is stuck in a 100% CPU loop. That this is indeed a configuration error on my side. However it had some very bad results. tracing the wild thread with strace, I get a loop of: poll([{fd=11, events=POLLIN}, {fd=10, events=POLLIN|POLLPRI, revents=POLLPRI|POLLERR}], 2, -1) = 1 gettimeofday({1201804688, 273298}, NULL) = 0 ioctl(10, 0x40044a30, 0xb70ba368) = -1 ENOTTY (Inappropriate ioctl for device) time([1201804688]) = 1201804688 stat64("/etc/localtime", {st_mode=S_IFREG|0644, st_size=2197, ...}) = 0 stat64("/etc/localtime", {st_mode=S_IFREG|0644, st_size=2197, ...}) = 0 stat64("/etc/localtime", {st_mode=S_IFREG|0644, st_size=2197, ...}) = 0 gettid() = 2355 write(4, "[Jan 31 20:38:08] WARNING[2355] "..., 77) = 77 gettid() = 2355 write(1, "[Jan 31 20:38:08] WARNING[2355]:"..., 63) = 63 write(1, "Unable to acknowledge zap timer\n", 32) = 32 Before I disabled -p, this prevented the system from properly booting. Maybe chan_iax should apply rate limit if it gets some types of "bad" answers? | ||
Comments: | By: Mark Michelson (mmichelson) 2008-02-08 11:51:33.000-0600 I discussed this situation with russell and he said there's no real way to "fix" this problem. What he suggested was allowing the thread to yield I'll be committing a fix very shortly. Thanks for bringing this up, Tzafrir. By: Digium Subversion (svnbot) 2008-02-08 11:57:52.000-0600 Repository: asterisk Revision: 103070 U branches/1.4/channels/chan_iax2.c ------------------------------------------------------------------------ r103070 | mmichelson | 2008-02-08 11:57:51 -0600 (Fri, 08 Feb 2008) | 6 lines Yield the thread and return -1 if the ioctl fails for Zaptel timing device. (closes issue ASTERISK-11346) Reported by: tzafrir ------------------------------------------------------------------------ http://svn.digium.com/view/asterisk?view=rev&revision=103070 By: Digium Subversion (svnbot) 2008-02-08 11:59:39.000-0600 Repository: asterisk Revision: 103071 _U trunk/ U trunk/channels/chan_iax2.c ------------------------------------------------------------------------ r103071 | mmichelson | 2008-02-08 11:59:39 -0600 (Fri, 08 Feb 2008) | 14 lines Merged revisions 103070 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r103070 | mmichelson | 2008-02-08 12:00:38 -0600 (Fri, 08 Feb 2008) | 6 lines Yield the thread and return -1 if the ioctl fails for Zaptel timing device. (closes issue ASTERISK-11346) Reported by: tzafrir ........ ------------------------------------------------------------------------ http://svn.digium.com/view/asterisk?view=rev&revision=103071 |