Summary: | ASTERISK-13520: [patch] 1.6.1 Choppy sound in Dual Xeon 2.8 GHz | ||
Reporter: | Dome C. (dome) | Labels: | |
Date Opened: | 2009-02-05 10:22:05.000-0600 | Date Closed: | 2009-06-10 12:47:09 |
Priority: | Blocker | Regression? | Yes |
Status: | Closed/Complete | Components: | Resources/General |
Versions: | Frequency of Occurrence | ||
Related Issues: | |||
Environment: | Attachments: | ( 0) issue14412.diff.txt ( 1) issue14412-1.6.1.0.diff.txt | |
Description: | I found choppy sound when use 1.6.1 in dual xeon cpu Server But 1.6.0 and trunk work fine. i try on 2 server found same problem. (Debian Lenny and Ubuntu hardy) I try all codec still got problem. ============= CPU ================= vendor_id : GenuineIntel cpu family : 15 model : 2 model name : Intel(R) Xeon(TM) CPU 2.80GHz stepping : 5 cpu MHz : 2791.116 cache size : 512 KB physical id : 3 siblings : 2 core id : 0 cpu cores : 1 fdiv_bug : no hlt_bug : no f00f_bug : no coma_bug : no fpu : yes fpu_exception : yes cpuid level : 2 wp : yes flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe pebs bts sync_rdtsc cid xtpr bogomips : 5582.22 clflush size : 64 | ||
Comments: | By: Tilghman Lesher (tilghman) 2009-02-05 12:29:13.000-0600 Does turning on 'DONT_OPTIMIZE' solve the choppiness? Do you have dahdi_dummy loaded or other DAHDI hardware in the machine? By: Dome C. (dome) 2009-02-06 03:40:44.000-0600 No DAHDI Hardware. i try to load dummy found same problem. By: Joshua C. Colp (jcolp) 2009-02-06 11:48:01.000-0600 Some clarification of things would also be nice. Are you talking all sound? Bridged calls? File playback? By: Dome C. (dome) 2009-02-06 18:45:44.000-0600 i found problem on File payback (native codec sound are same). By: Dome C. (dome) 2009-02-08 00:14:49.000-0600 It's work when i uninstall res_timing_pthread No problem for me. because i don't use timer (Like a meetme app) in my solution By: Leif Madsen (lmadsen) 2009-04-01 19:41:57 Can you try the latest 1.6.1? Russell made some changes recently that may or may not be related. If you can give that a shot and report back, that'd be appreciated. By: Leif Madsen (lmadsen) 2009-04-09 10:31:21 Suspended due to lack of activity. Please request a bug marshal in #asterisk-bugs on the IRC network irc.freenode.net to reopen the issue should you have the additional information requested. Further information can be found at http://www.asterisk.org/developers/bug-guidelines By: Jared Smith (jsmith) 2009-04-29 13:45:37 Reopened at original poster's request By: Dennis DeDonatis (dennisd) 2009-04-29 13:54:09 I'm not the original poster, but I'm seeing the same issue. Although I don't have a Xeon to test with, I do have: processor : 1 vendor_id : GenuineIntel cpu family : 6 model : 15 model name : Intel(R) Core(TM)2 CPU 6600 @ 2.40GHz stepping : 6 cpu MHz : 1596.000 cache size : 4096 KB physical id : 0 siblings : 2 core id : 1 cpu cores : 2 apicid : 1 initial apicid : 1 fpu : yes fpu_exception : yes cpuid level : 10 wp : yes flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx lm constant_tsc arch_perfmon pebs bts rep_good nopl pni monitor ds_cpl vmx est tm2 ssse3 cx16 xtpr lahf_lm bogomips : 4800.16 clflush size : 64 cache_alignment : 64 address sizes : 36 bits physical, 48 bits virtual power management: Linux linux01 2.6.27.21-170.2.56.fc10.x86_64 #1 SMP Mon Mar 23 23:08:10 EDT 2009 x86_64 x86_64 x86_64 GNU/Linux I couldn't remember WHY I hadn't tried 1.6.1 in a while, but after I saw the release of 1.6.1.0 and tried it, I immediately remembered the problem. It's this exact problem. I can confirm that if I turn off res_timing_pthread by running make menuselect, it seems to work just fine (I'm having some most likely unrelated voicemail issue, so I went back to 1.6.0.9 until I can dig into that problem). I am running SIP and IAX only. I do not have any telephony hardware in the computer. Please let me know what else you would like me to test or send you to help you duplicate this problem. I am running 1.6.0.9 (and have run all previous version of 1.6.0) without this choppy sound problem. By: Dennis DeDonatis (dennisd) 2009-04-29 13:55:02 I do not have dahdi_dummy or any dadhi hardware in the machine. The problem seems to be on file playback. By: Leif Madsen (lmadsen) 2009-05-04 09:32:48 Assigned to russell as this is blocking for the next release. Not sure if you're the appropriate person to look at this issue, but please reassign to someone else if necessary. Thanks! By: ArturK (arturked) 2009-05-07 22:46:16 I have the same problem. I've tried 1.6.1 and 1.6.2.0-beta1 By: Russell Bryant (russell) 2009-05-29 12:24:18 I have attached a patch that fixes this issue for me. Please test it and report back! Thanks! By: Dennis DeDonatis (dennisd) 2009-05-29 12:47:48 (This might be a dumb question, but) What version is this patch for? I get this with 1.6.1.0: patch -p0 < issue14412.diff.txt patching file res/res_timing_pthread.c Hunk #4 FAILED at 159. Hunk ASTERISK-5 FAILED at 332. Hunk ASTERISK-9 FAILED at 386. Hunk ASTERISK-10 FAILED at 426. 4 out of 14 hunks FAILED -- saving rejects to file res/res_timing_pthread.c.rej By: Russell Bryant (russell) 2009-05-29 13:18:26 I made the patch against trunk. I assumed it would apply to 1.6.1.0 but was obviously wrong! I will upload a version for 1.6.1.0 in a few minutes. By: Russell Bryant (russell) 2009-05-29 13:33:04 A patch that applies to 1.6.1.0 is now attached. By: Dennis DeDonatis (dennisd) 2009-05-29 14:33:09 It seems to work great, now. I re-un-tared it and started from scratch to make sure there wasn't anything left from me playing around with it. Anything that used playback before the patch would be choppy. Everything I played sounds great after the patch. I ran make menuselect to verify that res_timing_pthread was selected. By: Digium Subversion (svnbot) 2009-05-29 15:07:00 Repository: asterisk Revision: 198146 U trunk/res/res_timing_pthread.c ------------------------------------------------------------------------ r198146 | russell | 2009-05-29 15:06:59 -0500 (Fri, 29 May 2009) | 38 lines Resolve issues with choppy sound when using res_timing_pthread. The situation that caused this problem was when continuous mode was being turned on and off while a rate was set for a timing interface. A very easy way to replicate this bug was to do a Playback() from behind a Local channel. In this scenario, a rate gets set on the channel for doing file playback. At the same time, continuous mode gets turned on and off about every 20 ms as frames get queued on to the PBX side channel from the other side of the Local channel. Essentially, this module treated continuous mode and a set rate as mutually exclusive states for the timer to be in. When I dug deep enough, I observed the following pattern: 1) Set timer to tick every 20 ms. 2) Wait almost 20 ms ... 3) Continuous mode gets turned on for a queued up frame 4) Continuous mode gets turned off 5) The timer goes back to its tick per 20 ms. state but starts counting at 0 ms. 6) Goto step 2. Sometimes, res_timing_pthread would make it 20 ms and produce a timer tick, but not most of the time. This is what produced the choppy sound (or sometimes no sound at all). Now, the module treats continuous mode and a set rate as completely independent timer modes. They can be enabled and disabled independently of each other and things work as expected. (closes issue ASTERISK-13520) Reported by: dome Patches: issue14412.diff.txt uploaded by russell (license 2) issue14412-1.6.1.0.diff.txt uploaded by russell (license 2) Tested by: DennisD, russell ------------------------------------------------------------------------ http://svn.digium.com/view/asterisk?view=rev&revision=198146 By: Digium Subversion (svnbot) 2009-05-29 15:11:00 Repository: asterisk Revision: 198147 _U branches/1.6.1/ U branches/1.6.1/res/res_timing_pthread.c ------------------------------------------------------------------------ r198147 | russell | 2009-05-29 15:11:00 -0500 (Fri, 29 May 2009) | 45 lines Merged revisions 198146 via svnmerge from https://origsvn.digium.com/svn/asterisk/trunk ........ r198146 | russell | 2009-05-29 15:06:59 -0500 (Fri, 29 May 2009) | 38 lines Resolve issues with choppy sound when using res_timing_pthread. The situation that caused this problem was when continuous mode was being turned on and off while a rate was set for a timing interface. A very easy way to replicate this bug was to do a Playback() from behind a Local channel. In this scenario, a rate gets set on the channel for doing file playback. At the same time, continuous mode gets turned on and off about every 20 ms as frames get queued on to the PBX side channel from the other side of the Local channel. Essentially, this module treated continuous mode and a set rate as mutually exclusive states for the timer to be in. When I dug deep enough, I observed the following pattern: 1) Set timer to tick every 20 ms. 2) Wait almost 20 ms ... 3) Continuous mode gets turned on for a queued up frame 4) Continuous mode gets turned off 5) The timer goes back to its tick per 20 ms. state but starts counting at 0 ms. 6) Goto step 2. Sometimes, res_timing_pthread would make it 20 ms and produce a timer tick, but not most of the time. This is what produced the choppy sound (or sometimes no sound at all). Now, the module treats continuous mode and a set rate as completely independent timer modes. They can be enabled and disabled independently of each other and things work as expected. (closes issue ASTERISK-13520) Reported by: dome Patches: issue14412.diff.txt uploaded by russell (license 2) issue14412-1.6.1.0.diff.txt uploaded by russell (license 2) Tested by: DennisD, russell ........ ------------------------------------------------------------------------ http://svn.digium.com/view/asterisk?view=rev&revision=198147 By: Digium Subversion (svnbot) 2009-05-29 15:15:49 Repository: asterisk Revision: 198148 _U branches/1.6.2/ U branches/1.6.2/res/res_timing_pthread.c ------------------------------------------------------------------------ r198148 | russell | 2009-05-29 15:15:49 -0500 (Fri, 29 May 2009) | 45 lines Merged revisions 198146 via svnmerge from https://origsvn.digium.com/svn/asterisk/trunk ........ r198146 | russell | 2009-05-29 15:06:59 -0500 (Fri, 29 May 2009) | 38 lines Resolve issues with choppy sound when using res_timing_pthread. The situation that caused this problem was when continuous mode was being turned on and off while a rate was set for a timing interface. A very easy way to replicate this bug was to do a Playback() from behind a Local channel. In this scenario, a rate gets set on the channel for doing file playback. At the same time, continuous mode gets turned on and off about every 20 ms as frames get queued on to the PBX side channel from the other side of the Local channel. Essentially, this module treated continuous mode and a set rate as mutually exclusive states for the timer to be in. When I dug deep enough, I observed the following pattern: 1) Set timer to tick every 20 ms. 2) Wait almost 20 ms ... 3) Continuous mode gets turned on for a queued up frame 4) Continuous mode gets turned off 5) The timer goes back to its tick per 20 ms. state but starts counting at 0 ms. 6) Goto step 2. Sometimes, res_timing_pthread would make it 20 ms and produce a timer tick, but not most of the time. This is what produced the choppy sound (or sometimes no sound at all). Now, the module treats continuous mode and a set rate as completely independent timer modes. They can be enabled and disabled independently of each other and things work as expected. (closes issue ASTERISK-13520) Reported by: dome Patches: issue14412.diff.txt uploaded by russell (license 2) issue14412-1.6.1.0.diff.txt uploaded by russell (license 2) Tested by: DennisD, russell ........ ------------------------------------------------------------------------ http://svn.digium.com/view/asterisk?view=rev&revision=198148 |