<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>
<channel>
	<title>Netflow Developments &#187; error</title>
	<atom:link href="http://blog.netflowdevelopments.com/tag/error/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.netflowdevelopments.com</link>
	<description>The latest and greatest happenings in the world of Science, Technology and everything else Geek</description>
	<lastBuildDate>Mon, 06 Feb 2012 02:48:41 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Upgraded Timthumbs not displaying images: Could not find the internal image you specified.</title>
		<link>http://blog.netflowdevelopments.com/2011/10/31/upgraded-timthumbs-not-displaying-images-could-not-find-the-internal-image-you-specified/</link>
		<comments>http://blog.netflowdevelopments.com/2011/10/31/upgraded-timthumbs-not-displaying-images-could-not-find-the-internal-image-you-specified/#comments</comments>
		<pubDate>Mon, 31 Oct 2011 09:39:50 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Linux / Freebsd]]></category>
		<category><![CDATA[Technology]]></category>
		<category><![CDATA[debug]]></category>
		<category><![CDATA[error]]></category>
		<category><![CDATA[internal image]]></category>
		<category><![CDATA[not loading]]></category>
		<category><![CDATA[root]]></category>
		<category><![CDATA[security block]]></category>
		<category><![CDATA[timthumb]]></category>
		<category><![CDATA[upgrade]]></category>
		<guid isPermaLink="false">http://blog.netflowdevelopments.com/?p=729</guid>
		<description><![CDATA[Alright, this was a 2 hour ride of fun and joy at 4 in the morning that I would have rather not gone through but hopefully I can offer a little help to those( and I know there are plenty out there) underground the same hell. So as you know timthumb had an awesome exploit [...]]]></description>
			<content:encoded><![CDATA[<p>Alright, this was a 2 hour ride of fun and joy at 4 in the morning that I would have rather not gone through but hopefully I can offer a little help to those( and I know there are plenty out there) underground the same hell.</p>
<p>So as you know timthumb had an awesome exploit in it that allowed my entire server to be compromised prompting a complete upgrade server-wide which I blogged about at length(http://blog.netflowdevelopments.com/2011/10/13/timthumb-exploit-causing-plethora-of-sites-to-redirect-to-russia/).  Well almost as awesome as timthumb being full of bullshit security holes before the upgrade is it not working at all after the upgrade because of the error message mentioned in the title.</p>
<p>This was made even more awesome when I went to referenced url of the image in question and saw that it loaded fine.  Cooooollll!</p>
<p>So I went into the timthumb.php file and found this line</p>
<p>define (&#8216;DEBUG_ON&#8217;, false);</p>
<p>and turned it into this</p>
<p>define (&#8216;DEBUG_ON&#8217;, true);</p>
<p>&nbsp;</p>
<p>and then found this:</p>
<p>define (&#8216;DEBUG_LEVEL&#8217;, 1);</p>
<p>and turned it into this</p>
<p>define (&#8216;DEBUG_LEVEL&#8217;, 3);</p>
<p>&nbsp;</p>
<p>This exposed a whole new level of insanity with the following nonsensical errors</p>
<p style="margin-top: 0px; margin-right: 0px; margin-bottom: 11px; margin-left: 0px; color: #333333; font-family: 'Lucida Grande', Verdana, 'Bitstream Vera Sans', Arial, sans-serif; font-size: 12px; line-height: 22px; background-color: #ffffff; padding: 0px;">[Mon Oct 31 01:02:37 2011] [error] [client 127.0.0.1] TimThumb Debug line 1076 [0.000327 : 0.000198] Doc root is: /path/to/domain<br />
[Mon Oct 31 01:02:37 2011] [error] [client 127.0.0.1] TimThumb Debug line 1076 [0.000327 : 0.000198] Found file as /path/to/domain/wp-content/uploads/2009/11/ComfortInn1.jpg<br />
[Mon Oct 31 01:02:37 2011] [error] [client 127.0.0.1] TimThumb Debug line 1076 [0.001643 : 0.000392]: Security block: The file specified occurs outside the document root.</p>
<p style="margin-top: 0px; margin-right: 0px; margin-bottom: 11px; margin-left: 0px; color: #333333; font-family: 'Lucida Grande', Verdana, 'Bitstream Vera Sans', Arial, sans-serif; font-size: 12px; line-height: 22px; background-color: #ffffff; padding: 0px;">W-T-F?!?!?! it&#8217;s telling me that a file which lies within my specific Doc root is simulataneously outside my Doc root and being blocked?!?  It was this point that I had to focus really hard against the urges of bashing my head in with the nearest blunt object I could find.</p>
<p style="margin-top: 0px; margin-right: 0px; margin-bottom: 11px; margin-left: 0px; color: #333333; font-family: 'Lucida Grande', Verdana, 'Bitstream Vera Sans', Arial, sans-serif; font-size: 12px; line-height: 22px; background-color: #ffffff; padding: 0px;">
<p style="margin-top: 0px; margin-right: 0px; margin-bottom: 11px; margin-left: 0px; color: #333333; font-family: 'Lucida Grande', Verdana, 'Bitstream Vera Sans', Arial, sans-serif; font-size: 12px; line-height: 22px; background-color: #ffffff; padding: 0px;">What I ended up doing was going through the script looking for that specific error message and lucky for me there are 3 of them, so I changed the wording of them so that instead of reading Security Block&#8230; they read Security Block1&#8230; and then Security Block 2&#8230; etc etc for each instance of it so I could narrow down where this madness was stemming from, which resulting in the following results:</p>
<p><span style="color: #333333; font-family: 'Lucida Grande', Verdana, 'Bitstream Vera Sans', Arial, sans-serif;"><span class="Apple-style-span" style="font-size: 12px; line-height: 22px;">[Mon Oct 31 02:10:58 2011] [error] [client 127.0.0.1] TimThumb Debug line 1076 [0.000792 : 0.000643]: Is a request for an internal file: /wp-content/uploads/2009/11/ComfortInn1.jpg</span></span></p>
<p><span style="color: #333333; font-family: 'Lucida Grande', Verdana, 'Bitstream Vera Sans', Arial, sans-serif;"><span class="Apple-style-span" style="font-size: 12px; line-height: 22px;">[Mon Oct 31 02:10:58 2011] [error] [client 127.0.0.1] TimThumb Debug line 1076 [0.001497 : 0.000697]: Security block1: The file specified occurs outside the document root.</span></span></p>
<p><span style="color: #333333; font-family: 'Lucida Grande', Verdana, 'Bitstream Vera Sans', Arial, sans-serif;"><span class="Apple-style-span" style="font-size: 12px; line-height: 22px;">[Mon Oct 31 02:10:58 2011] [error] [client 127.0.0.1] TimThumb Debug line 1076 [0.002205 : 0.000691]: Security block3: The file specified occurs outside the document root.</span></span></p>
<p>&nbsp;</p>
<p>After that I went back to instance #1 and #3 and just removed the if statements that were clearly causing some shit to mess up and forcing them to not check what they were checking and just to do what they would do if the checks came back positive instead of the false negatives that they were receiving.</p>
<pre style="font-size: 12px; white-space: pre-wrap; max-width: 80em; padding-left: 0.7em; line-height: normal;">    foreach ($sub_directories as $sub){
                        $base .= $sub . '/';
                        $this-&gt;debug(3, "Trying file as: " . $base . $src);
                        if(file_exists($base . $src)){
                                $this-&gt;debug(3, "Found file as: " . $base . $src);
                                $real = realpath($base . $src);
                                          return $real;</pre>
<pre style="font-size: 12px; white-space: pre-wrap; max-width: 80em; padding-left: 0.7em; line-height: normal;">                if(file_exists ($this-&gt;docRoot . '/' . $src)) {
                        $this-&gt;debug(3, "Found file as " . $this-&gt;docRoot . '/' . $src);
                        $real = realpath($this-&gt;docRoot . '/' . $src);
                        if(stripos($real, $this-&gt;docRoot) === 1){
                                return $real;
                        } else {
                                $this-&gt;debug(1, "Security block: The file specified occurs outside the document root.");</pre>
<pre style="font-size: 12px; white-space: pre-wrap; max-width: 80em; padding-left: 0.7em; line-height: normal;">}</pre>
<pre style="font-size: 12px; white-space: pre-wrap; max-width: 80em; padding-left: 0.7em; line-height: normal;">to this</pre>
<pre style="white-space: pre-wrap; max-width: 80em; padding-left: 0.7em;">                if(file_exists ($this-&gt;docRoot . '/' . $src)) {
                        $this-&gt;debug(3, "Found file as " . $this-&gt;docRoot . '/' . $src);
                        $real = realpath($this-&gt;docRoot . '/' . $src);
                                return $real;</pre>
<div style="color: #333333; font-family: 'Lucida Grande', Verdana, 'Bitstream Vera Sans', Arial, sans-serif; font-size: 12px; line-height: 22px;"><strong>and then I changed this (851):</strong></div>
<div style="color: #333333; font-size: 12px; line-height: 22px;">
<pre style="font-family: 'Lucida Grande', Verdana, 'Bitstream Vera Sans', Arial, sans-serif; white-space: pre-wrap; max-width: 80em; padding-left: 0.7em; color: #000000; line-height: normal;"> foreach ($sub_directories as $sub){
                        $base .= $sub . '/';
                        $this-&gt;debug(3, "Trying file as: " . $base . $src);
                        if(file_exists($base . $src)){
                                $this-&gt;debug(3, "Found file as: " . $base . $src);
                                $real = realpath($base . $src);
                                if(stripos($real, $this-&gt;docRoot) === 0){
                                        return $real;
                                } else {
                                        $this-&gt;debug(1, "Security block3: The file specified occurs outside the document root.");
                                        //And continue search
                                }</pre>
<pre style="font-family: 'Lucida Grande', Verdana, 'Bitstream Vera Sans', Arial, sans-serif; white-space: pre-wrap; max-width: 80em; padding-left: 0.7em; color: #000000; line-height: normal;">to this</pre>
<pre style="font-family: 'Lucida Grande', Verdana, 'Bitstream Vera Sans', Arial, sans-serif; white-space: pre-wrap; max-width: 80em; padding-left: 0.7em;">    foreach ($sub_directories as $sub){
                        $base .= $sub . '/';
                        $this-&gt;debug(3, "Trying file as: " . $base . $src);
                        if(file_exists($base . $src)){
                                $this-&gt;debug(3, "Found file as: " . $base . $src);
                                $real = realpath($base . $src);
                                          return $real;</pre>
<p><span style="font-family: 'Lucida Grande', Verdana, 'Bitstream Vera Sans', Arial, sans-serif;">Much to my great shock it actually worked and the images load fine.. Now I&#8217;m sure those if statements are checking for something important so</span><strong><span style="font-family: 'Lucida Grande', Verdana, 'Bitstream Vera Sans', Arial, sans-serif;"> I CLAIM NO LIABILITY FOR ANYTHING THAT FUCKS UP BECAUSE OF THIS</span></strong> but it fixed my problem and I&#8217;m not seeing any ill effects so</p>
<h1 style="text-align: center;">!<span style="text-decoration: underline;">YAY</span>!</h1>
</div>
<p>http://blog.netflowdevelopments.com/wp-admin/post.php?post=702&#038;action=edit</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.netflowdevelopments.com/2011/10/31/upgraded-timthumbs-not-displaying-images-could-not-find-the-internal-image-you-specified/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Nginx 502 errors, php problems, wordpress, oh my!</title>
		<link>http://blog.netflowdevelopments.com/2010/08/10/nginx-502-errors-php/</link>
		<comments>http://blog.netflowdevelopments.com/2010/08/10/nginx-502-errors-php/#comments</comments>
		<pubDate>Tue, 10 Aug 2010 10:53:44 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[502]]></category>
		<category><![CDATA[error]]></category>
		<category><![CDATA[extensions]]></category>
		<category><![CDATA[freebsd]]></category>
		<category><![CDATA[media gallery]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[wordpress]]></category>
		<guid isPermaLink="false">http://blog.netflowdevelopments.com/?p=511</guid>
		<description><![CDATA[Well today is a glorious day as I finally managed to fix a problem that had been haunting my server for a month or so.  In the end it was a solution that I&#8217;ve been taught countless times as something I should be doing by default when upgrading php but alas my mind is not [...]]]></description>
			<content:encoded><![CDATA[<p>Well today is a glorious day as I finally managed to fix a problem that had been haunting my server for a month or so.  In the end it was a solution that I&#8217;ve been taught countless times as something I should be doing by default when upgrading php but alas my mind is not on of the more expensive models and so it rarely does what it should..</p>
<p>So it all started with a fairly minor issue I noticed in WordPress.   When I would try to load up the media gallery I would be greeted with a nice 502  Nginx error.  I&#8217;m sure if I wasn&#8217;t running nginx then it would have a blank white page or an apache error.  So naturally I started with the nginx error logs which didn&#8217;t lead to much.. Then I setup php to log all errors and again that didn&#8217;t lead me to much, finally however I monitored my httpd-error.log and this lovely message turned up:</p>
<p>[warn] (2)No such file or directory: Cannot reinit SSLMutex<br />
/libexec/ld-elf.so.1: /usr/local/lib/php/20060613/gd.so: Undefined symbol &#8220;zend_parse_parameters_none&#8221;</p>
<p>After some asking around on irc I was told that it was definitely a php problem.  Nothing more specific than that, just a php problem.  There were a bunch of forum posts saying it might have something to do with fastCGI but all the suggestions had no effect.  However there was one forum I foudn that through a suggestion out there that lit up a light bulb in my brain.  That being that if php5-extensions isn&#8217;t recompiled and reinstalled when php is updated sometimes the fit hits the shan.  Sure enough I had upgrade php5 a while back, and then again since then but hadn&#8217;t bothered to recompile the extensions.  Hell I hadn&#8217;t even recompiled Zend or Eaccelerator which is pretty standard.</p>
<p>So long story slightly shorter, I went in deinstalled and cleaned up my php5-extensions, reinstalled it and viola, problem solved!!</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.netflowdevelopments.com/2010/08/10/nginx-502-errors-php/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Drupal and Me: Chapter 8 &#8211; Large File uploads causing Server connection to Reset</title>
		<link>http://blog.netflowdevelopments.com/2010/07/06/drupal-and-me-chapter-8-large-file-uploads-causing-server-connection-to-reset/</link>
		<comments>http://blog.netflowdevelopments.com/2010/07/06/drupal-and-me-chapter-8-large-file-uploads-causing-server-connection-to-reset/#comments</comments>
		<pubDate>Tue, 06 Jul 2010 10:10:15 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Technology]]></category>
		<category><![CDATA[413]]></category>
		<category><![CDATA[connection reset]]></category>
		<category><![CDATA[drupal]]></category>
		<category><![CDATA[error]]></category>
		<category><![CDATA[firefox]]></category>
		<category><![CDATA[large file]]></category>
		<category><![CDATA[nginx]]></category>
		<category><![CDATA[opera]]></category>
		<category><![CDATA[size]]></category>
		<category><![CDATA[time out]]></category>
		<category><![CDATA[upload]]></category>
		<guid isPermaLink="false">http://blog.netflowdevelopments.com/?p=487</guid>
		<description><![CDATA[Well this was a jolly good problem that took 4 hours to fix. I&#8217;ve implemented the Audio Module this week to allow our Sound team to upload soundtrack, foley and effects work just the same as the 2D and 3D guys upload their work.  Unfortunately when I went to upload a 40MB .ogg file the [...]]]></description>
			<content:encoded><![CDATA[<p>Well this was a jolly good problem that took 4 hours to fix.</p>
<p>I&#8217;ve implemented the Audio Module this week to allow our Sound team to upload soundtrack, foley and effects work just the same as the 2D and 3D guys upload their work.  Unfortunately when I went to upload a 40MB .ogg file the connection to the server was reset pretty much exactly after 60 seconds.  So, easy enough I figured I&#8217;d just have to go into my php.ini file and change the max upload sizes, max connection times and all of that fun stuff.  Well I went through and changed every conceivable directive in there that had anything to do with connection times and upload sizes.  Nada!  I created .htaccess files in the /drupal dir with php_values to the same effect.. Nada!  I went to one of my wordpress blogs and tried to upload the same file and guess what?  SAme thing happened, re-assuring me that this wasn&#8217;t a drupal only problem.  So I tried increasing the Timeout value in apache, nada.  Got onto IRC on #php and no one had a clue.  Hours and hours of googling led to ZERO solutions.  It wasn&#8217;t until I decided to try this in Opera instead of Firefox that I was able to get a glimmer of understanding as to what was going on.  Just to once again re-iterate how much better of a browser Opera is than firefox, how exponentially better in every conceivable way except for compatability, Opera is compared to firefox, it took me 30 seconds to figure out and solve this problem once I had opera loading the pages.  Instead of just sending me a nebulous Server Connection Reset error after 60 seconds like FF did, Opera immediately spat out a 413 Error &#8216;Entity too large&#8217;.  Why Firefox didn&#8217;t touch on client_max_body_size 300M;</p>
<p>this at all, ever is beyond me but it was a simple matter of going into  my nginx.conf file and <strong>&#8220;setting client_max_body_size&#8221;</strong> to 300M and the problem was solved.</p>
<p>Sooo, if you are experiencing a Connection reset error while trying to upload files and you just happen to be running Nginx go and check out your nginx.conf file and make sure client_max_body_size is set nice and high.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.netflowdevelopments.com/2010/07/06/drupal-and-me-chapter-8-large-file-uploads-causing-server-connection-to-reset/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>FFMPEG just not compiling on FreeBSD</title>
		<link>http://blog.netflowdevelopments.com/2009/05/30/ffmpeg-just-not-compiling-on-freebsd/</link>
		<comments>http://blog.netflowdevelopments.com/2009/05/30/ffmpeg-just-not-compiling-on-freebsd/#comments</comments>
		<pubDate>Sat, 30 May 2009 07:44:00 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Technology]]></category>
		<category><![CDATA[error]]></category>
		<category><![CDATA[ffmpeg]]></category>
		<category><![CDATA[LibGL]]></category>
		<category><![CDATA[portupgrade]]></category>
		<category><![CDATA[won't compile]]></category>
		<category><![CDATA[X11-xcb]]></category>
		<guid isPermaLink="false">http://blog.netflowdevelopments.com/?p=285</guid>
		<description><![CDATA[If you are having troubles compiling FFMPEG and are seeing errors with LibGL such as: No package &#8216;x11-xcb&#8217; found You need to do a few things. Firstly upgrade X11: portupgrade libX11. This has been noted to solve a lot of problems so do this first, retry and see if it fixes it. This however might [...]]]></description>
			<content:encoded><![CDATA[<p>If you are having troubles compiling FFMPEG and are seeing errors with LibGL such as:</p>
<p>No package &#8216;x11-xcb&#8217; found</p>
<p>You need to do a few things.  </p>
<p>Firstly upgrade X11: portupgrade libX11.   This has been noted to solve a lot of problems so do this first, retry and see if it fixes it.</p>
<p>This however might fail in which case you are going to need to upgrade xproto first as X11 will look for a later version of Xproto than might already be on the server.  doing a simple portupgrade might not work so:<br />
So cd /usr/ports/x11/xproto &#038; make clean &#038; make deinstall &#038; make reinstall</p>
<p>now you should be able to go into /usr/ports/x11/libX11 and:<br />
make clean &#038; make deinstall &#038; make reinstall</p>
<p>and now finally LibGL will install properly and consequentially so will FFMPEG</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.netflowdevelopments.com/2009/05/30/ffmpeg-just-not-compiling-on-freebsd/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Fixing ALSA underrun erorrs associated with PulseAudio (and typically Skype) in Ubuntu</title>
		<link>http://blog.netflowdevelopments.com/2009/05/10/fixing-alsa-underrun-erorrs-associated-with-pulseaudio-and-typically-skype-in-ubuntu/</link>
		<comments>http://blog.netflowdevelopments.com/2009/05/10/fixing-alsa-underrun-erorrs-associated-with-pulseaudio-and-typically-skype-in-ubuntu/#comments</comments>
		<pubDate>Sun, 10 May 2009 19:08:38 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Linux / Freebsd]]></category>
		<category><![CDATA[Technology]]></category>
		<category><![CDATA[9.04]]></category>
		<category><![CDATA[alsa]]></category>
		<category><![CDATA[alsa underrun detected]]></category>
		<category><![CDATA[error]]></category>
		<category><![CDATA[highpriority]]></category>
		<category><![CDATA[nice-level]]></category>
		<category><![CDATA[problem]]></category>
		<category><![CDATA[pulseaudio]]></category>
		<category><![CDATA[real-time priority]]></category>
		<category><![CDATA[realtime-scheduling]]></category>
		<category><![CDATA[skype alsa underrun]]></category>
		<category><![CDATA[sound cutting out]]></category>
		<category><![CDATA[sound not working]]></category>
		<category><![CDATA[ubuntu]]></category>
		<category><![CDATA[underrun]]></category>
		<guid isPermaLink="false">http://blog.netflowdevelopments.com/?p=256</guid>
		<description><![CDATA[So after running into this problem suddently and for no &#8216;apparent&#8217; reason(although it became apparent later) I noticed the complete lack of real support docs online in regards to the ALSA underrun problem.  Hopefully I can rememdy this a little bit and help some people out. Last week I noticed skype audio was getting really [...]]]></description>
			<content:encoded><![CDATA[<p><img class="alignleft" title="ubuntu" src="http://medya.gh.googlepages.com/ubuntu-tux.png" alt="" width="165" height="197" /></p>
<p>So after running into this problem suddently and for no &#8216;apparent&#8217; reason(although it became apparent later) I noticed the complete lack of real support docs online in regards to the ALSA underrun problem.  Hopefully I can rememdy this a little bit and help some people out.</p>
<p>Last week I noticed skype audio was getting really choppy, it was the equivalent of seeing the conversation through a strobe light.  Odd I thought but didn&#8217;t pay it too much heed, that was until the end of the week when the audio simply stopped all together and skype refused to close down normally.  I would have to manually kill the process in terminal after the sound cut out.  This problem was exclusive to skype, which made it even more frustrating as I could have youtube and/or music playing in <a href="http://www.exaile.org" target="_blank">exaile </a>while skype was screwing the pooch.</p>
<p>It occured to me today that something indeed had been changed recently right before this problem started and that was me fiddling with pulse&#8217;s daemon.conf and enabling real-time scheduling.  I can&#8217;t remember what for but this was part of the problem.  In fact there is even a mention in pulseaudio&#8217;s man page in regards to the possibility of real-time scheduling causing problems which I&#8217;ll quote here:</p>
<blockquote><p><em> Alternatively,  if the risk of locking up the machine is considered too<br />
big to enable real-time scheduling,  high-priority  scheduling  can  be<br />
enabled  instead  (i.e.  negative  nice  level). This can be enabled by<br />
passing &#8211;high-priority (see above) when starting  PulseAudio  and  may<br />
also  be  enabled  with  the approriate option in daemon.conf. Negative<br />
nice levels can only be enabled when  the  appropriate  resource  limit</em></p>
<p><em> RLIMIT_NICE  is  set  (see setrlimit(2) for more information), possibly<br />
configured in /etc/security/limits.conf. A resource limit of 31 (corre‐<br />
sponding with nice level -11) is recommended.</em></p>
<p><img class="alignright" title="skype" src="http://cultofmac.com/wp-content/uploads/skype-logo.jpg" alt="" width="137" height="137" /></p></blockquote>
<p>At this point I got a little excited as the solution seemed within reach.  I hashed out real-time schedule and implemented high-priority scheduling, restarted pulseaudio and loaded up skype.  It started fine but when I made a test call I was once again plagued by ALSA underruns.</p>
<p>They key here was to adjust the nice level.  I incrementally went down from -11 all the way to 3 (as in <strong>plus</strong> 3 <strong>not</strong> -3), restarted pulseaudio, loaded skype and viola!  Problem solved.  The nice level might be different for you so maybe experiment with that a little bit.</p>
<p><strong>Summary:</strong></p>
<ul>
<li>edit ~/.pulse/daemon.conf (or /etc/pulse/daemon.conf if you run as system)</li>
<li>Hash out realtime-scheduling and realtime-priority</li>
<li>Unhash high-priority and nice-level</li>
<li>set nice level to 3 (not -3 or -11 for that matter)</li>
</ul>
<p>Update:  Bah, I am still seeing these under runs.  The severity of them has gone down as skype doesn&#8217;t completely cut out now and lock up but I am getting audio cutting in and out every 2-3 seconds when making a call via skypeout.</p>
<p>Searching around the <a href="http://forum.skype.com/index.php?showtopic=306381" target="_blank">skype forums</a> I found this and this actually seems to have done the trick completely:</p>
<p>Edit your ~/.asoundrc file</p>
<p># Part I directly from ALSA Dmix Wiki</p>
<p>pcm.skype {<br />
type dmix<br />
ipc_key 1024<br />
slave {<br />
pcm &#8220;hw:0,0&#8243;<br />
period_time 0<br />
period_size 1024<br />
buffer_size 8192<br />
#format &#8220;S32_LE&#8221;<br />
#periods 128<br />
rate 44100<br />
}<br />
}</p>
<p>pcm.dsp0 {<br />
type plug<br />
slave.pcm &#8220;skype&#8221;<br />
}</p>
<p># This following device can fool some applications into using pulseaudio<br />
pcm.dsp1 {<br />
type plug<br />
slave.pcm &#8220;pulse&#8221;<br />
}</p>
<p>ctl.mixer0 {<br />
type hw<br />
card 0<br />
}</p>
<p>pcm.pulse { type pulse }<br />
ctl.pulse { type pulse }<br />
pcm.!default {<br />
type pulse<br />
}</p>
<p>ctl.!default {<br />
type pulse<br />
}</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.netflowdevelopments.com/2009/05/10/fixing-alsa-underrun-erorrs-associated-with-pulseaudio-and-typically-skype-in-ubuntu/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
	</channel>
</rss>

