Summary: | ASTERISK-15905: [patch] endless cycle in ast_waitfor_nandfds() for big timeouts | ||
Reporter: | under (under) | Labels: | |
Date Opened: | 2010-04-02 03:10:53 | Date Closed: | 2010-05-04 18:55:59 |
Priority: | Major | Regression? | No |
Status: | Closed/Complete | Components: | Core/Channels |
Versions: | Frequency of Occurrence | ||
Related Issues: | |||
Environment: | Attachments: | ( 0) d.diff | |
Description: | Subj. happens when we call Dial() with really large answer timeout. After this we see that asterisk eats all CPU. Problem seems to happen due to multiplication (by 1000) overflow. ****** ADDITIONAL INFORMATION ****** Problem was first noticed in 1.4.21, but when moved to 1.6.0.26 I see that this part of code hasn't been changed. So I attach patch for 1.6.0.26. Patch tested on 1.4.21 (it solves the problem), not tested on 1.6.0.26. | ||
Comments: | By: under (under) 2010-04-02 03:15:06 forgot to mention that the channel on which this happens, stucks, and I'm unable to remove it with CLI's "soft hangup" By: Leif Madsen (lmadsen) 2010-04-06 09:27:59 What is a typical example of a timeout value that would cause this? By: under (under) 2010-04-06 11:20:44 I don't remember exactly, but the bug is reproduced when due to overflow "whentohangup" becomes negative value after multiplication by 1000 By: Digium Subversion (svnbot) 2010-05-04 18:36:53 Repository: asterisk Revision: 261093 U branches/1.4/main/channel.c ------------------------------------------------------------------------ r261093 | tilghman | 2010-05-04 18:36:53 -0500 (Tue, 04 May 2010) | 7 lines Protect against overflow, when calculating how long to wait for a frame. (closes issue ASTERISK-15905) Reported by: under Patches: d.diff uploaded by under (license 914) ------------------------------------------------------------------------ http://svn.digium.com/view/asterisk?view=rev&revision=261093 By: Digium Subversion (svnbot) 2010-05-04 18:51:52 Repository: asterisk Revision: 261095 _U trunk/ U trunk/main/channel.c ------------------------------------------------------------------------ r261095 | tilghman | 2010-05-04 18:51:52 -0500 (Tue, 04 May 2010) | 18 lines Merged revisions 261093-261094 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r261093 | tilghman | 2010-05-04 18:36:53 -0500 (Tue, 04 May 2010) | 7 lines Protect against overflow, when calculating how long to wait for a frame. (closes issue ASTERISK-15905) Reported by: under Patches: d.diff uploaded by under (license 914) ........ r261094 | tilghman | 2010-05-04 18:47:08 -0500 (Tue, 04 May 2010) | 2 lines Add a tiny corner case to the previous commit ........ ------------------------------------------------------------------------ http://svn.digium.com/view/asterisk?view=rev&revision=261095 By: Digium Subversion (svnbot) 2010-05-04 18:55:42 Repository: asterisk Revision: 261096 _U branches/1.6.0/ U branches/1.6.0/main/channel.c ------------------------------------------------------------------------ r261096 | tilghman | 2010-05-04 18:55:42 -0500 (Tue, 04 May 2010) | 25 lines Merged revisions 261095 via svnmerge from https://origsvn.digium.com/svn/asterisk/trunk ................ r261095 | tilghman | 2010-05-04 18:51:52 -0500 (Tue, 04 May 2010) | 18 lines Merged revisions 261093-261094 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r261093 | tilghman | 2010-05-04 18:36:53 -0500 (Tue, 04 May 2010) | 7 lines Protect against overflow, when calculating how long to wait for a frame. (closes issue ASTERISK-15905) Reported by: under Patches: d.diff uploaded by under (license 914) ........ r261094 | tilghman | 2010-05-04 18:47:08 -0500 (Tue, 04 May 2010) | 2 lines Add a tiny corner case to the previous commit ........ ................ ------------------------------------------------------------------------ http://svn.digium.com/view/asterisk?view=rev&revision=261096 By: Digium Subversion (svnbot) 2010-05-04 18:55:50 Repository: asterisk Revision: 261097 _U branches/1.6.1/ U branches/1.6.1/main/channel.c ------------------------------------------------------------------------ r261097 | tilghman | 2010-05-04 18:55:50 -0500 (Tue, 04 May 2010) | 25 lines Merged revisions 261095 via svnmerge from https://origsvn.digium.com/svn/asterisk/trunk ................ r261095 | tilghman | 2010-05-04 18:51:52 -0500 (Tue, 04 May 2010) | 18 lines Merged revisions 261093-261094 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r261093 | tilghman | 2010-05-04 18:36:53 -0500 (Tue, 04 May 2010) | 7 lines Protect against overflow, when calculating how long to wait for a frame. (closes issue ASTERISK-15905) Reported by: under Patches: d.diff uploaded by under (license 914) ........ r261094 | tilghman | 2010-05-04 18:47:08 -0500 (Tue, 04 May 2010) | 2 lines Add a tiny corner case to the previous commit ........ ................ ------------------------------------------------------------------------ http://svn.digium.com/view/asterisk?view=rev&revision=261097 By: Digium Subversion (svnbot) 2010-05-04 18:55:58 Repository: asterisk Revision: 261098 _U branches/1.6.2/ U branches/1.6.2/main/channel.c ------------------------------------------------------------------------ r261098 | tilghman | 2010-05-04 18:55:58 -0500 (Tue, 04 May 2010) | 25 lines Merged revisions 261095 via svnmerge from https://origsvn.digium.com/svn/asterisk/trunk ................ r261095 | tilghman | 2010-05-04 18:51:52 -0500 (Tue, 04 May 2010) | 18 lines Merged revisions 261093-261094 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r261093 | tilghman | 2010-05-04 18:36:53 -0500 (Tue, 04 May 2010) | 7 lines Protect against overflow, when calculating how long to wait for a frame. (closes issue ASTERISK-15905) Reported by: under Patches: d.diff uploaded by under (license 914) ........ r261094 | tilghman | 2010-05-04 18:47:08 -0500 (Tue, 04 May 2010) | 2 lines Add a tiny corner case to the previous commit ........ ................ ------------------------------------------------------------------------ http://svn.digium.com/view/asterisk?view=rev&revision=261098 |