<?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/"
	xmlns:media="http://search.yahoo.com/mrss/"
	>

<channel>
	<title>Software is Crap</title>
	<atom:link href="http://davmac.wordpress.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://davmac.wordpress.com</link>
	<description>Hasty insults from a frustrated user and developer</description>
	<lastBuildDate>Sun, 25 Oct 2009 22:19:08 +0000</lastBuildDate>
	<generator>http://wordpress.com/</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<cloud domain='davmac.wordpress.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://www.gravatar.com/blavatar/4878c3d7b6916224b67b3bf98b1daa5e?s=96&#038;d=http://s.wordpress.com/i/buttonw-com.png</url>
		<title>Software is Crap</title>
		<link>http://davmac.wordpress.com</link>
	</image>
			<item>
		<title>Mysql, and C99 aliasing rules. A detective story.</title>
		<link>http://davmac.wordpress.com/2009/10/25/mysql-and-c99-aliasing-rules-a-detective-story/</link>
		<comments>http://davmac.wordpress.com/2009/10/25/mysql-and-c99-aliasing-rules-a-detective-story/#comments</comments>
		<pubDate>Sun, 25 Oct 2009 06:32:41 +0000</pubDate>
		<dc:creator>davmac</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://davmac.wordpress.com/?p=94</guid>
		<description><![CDATA[When running mythfrontend after upgrading Mysql (to 5.1.40) I got:
Driver error was [2/1210]:
QMYSQL3: Unable to execute statement
Database error was:
Incorrect arguments to mysql_stmt_execute
After a bit of Google-ing I found a Myth bug ticket which seems to refer to the same (or a very similar) problem. The problem is apparently due to a Mysql bug and has [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=davmac.wordpress.com&blog=699263&post=94&subd=davmac&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>When running mythfrontend after upgrading Mysql (to 5.1.40) I got:</p>
<blockquote><p>Driver error was [2/1210]:<br />
QMYSQL3: Unable to execute statement<br />
Database error was:<br />
Incorrect arguments to mysql_stmt_execute</p></blockquote>
<p>After a bit of Google-ing I found a <a href="http://svn.mythtv.org/trac/ticket/6683">Myth bug ticket</a> which seems to refer to the same (or a very similar) problem. The problem is apparently due to a <a href="http://bugs.mysql.com/bug.php?id=19694">Mysql bug</a> and has something to do with an invalid cast and gcc optimizations, which makes it easy enough to work around &#8211; except of course that the bug was apparently fixed many versions ago.</p>
<p>However, conveniently, changing my configure options for Mysql (from -O3 to -O1 in my CFLAGS and CXXFLAGS) does make the problem go away. I suspected alias analysis to be the problematic optimization, so I checked whether &#8220;-O3 -fno-strict-aliasing&#8221; was enough &#8211; and it was. I resolved to track down the bug.</p>
<p>I started by compiling Mysql twice, in two different trees &#8211; one with my regular options and one with -fno-strict-aliasing. Then, I copied object files from the first tree to the second and repeated &#8220;make install&#8221; until the problem appeared (actually, I had to copy the .o file, as well as the stupidly hidden .libs/*.o file that libtool creates, and then touch the *.lo file; the build system is broken enough that just changing an .o file won&#8217;t cause the library to rebuilt). Fortunately I found the right file first try: it was libmysql.o (or rather, libmysql.c).</p>
<p>Unfortunately, libmysql.c is over  5000 lines long, and I didn&#8217;t know which function was causing the problem, so I had no idea where to look in the code. I proceeded by compiling the file both with and without &#8220;-fno-strict-aliasing&#8221; and with the &#8220;-save-temps&#8221; option so I could grab the generated assembly (i.e. libmysql.s) for each case. Then I did a manual binary search by hand-editing functions from one file into the other, assembling it and re-building the library until I was able to find which function had the problem. It turned out to be &#8220;cli_stmt_execute&#8221;. At that point I decided to look through the generated assembly and see whether I could spot where it didn&#8217;t seem to match up with what was expected.  First, though, I got the size of the function down by marking various other static function that it was calling with __attribute__((noinline)), each time re-testing to make sure that the problem still occurred.</p>
<p>Anyway, enough with the suspense. Here is the problematic line of code (2553 in libmysql.c):</p>
<pre>    for (param= stmt-&gt;params; param &lt; param_end; param++)
        store_param_type((char**) &amp;net-&gt;write_pos, param);</pre>
<p>The problem of course is the cast &#8220;(char **)&#8221; which casts to an incompatible type, thus the value net-&gt;write_pos is accessed as a &#8220;char *&#8221; when it is declared as a &#8220;uchar *&#8221; (&#8220;uchar&#8221; is a typedef for &#8220;unsigned char&#8221;). Now &#8220;char&#8221; and &#8220;unsigned char&#8221; are compatible types, but &#8220;char *&#8221; and &#8220;unsigned char *&#8221; are <em>not</em>. That means, if you access some value via a &#8220;char *&#8221; reference then you must always do so and never through any incompatible reference <em>including</em> &#8220;unsigned char *&#8221;. Doing so breaks the strict aliasing rules.</p>
<p>In this case, store_param_type is actually meant to modify net-&gt;writepos:</p>
<pre>    static void store_param_type(char **pos, MYSQL_BIND *param)
    {
        uint typecode= param-&gt;buffer_type | (param-&gt;is_unsigned ? 32768 : 0);
        int2store(*pos, typecode);
        *pos+= 2;
    }</pre>
<p>But, as gcc inlines the call, it effectively sees the &#8220;*pos+=2&#8243; as updating a location that must be different to the source location (net-&gt;write_pos) seeing as the types are incompatible, in other words, it effectively sees &#8220;*pos = *otherpos + 2&#8243; (where otherpos is an &#8220;unsigned char **&#8221;). Then, it sees that *otherpos must be constant for the duration of the loop, seeing as a value of a compatible type is not written. This means it can defer the statement and collapse its multiple instances (one per iteration of the loop) to a single instance. The result? kaboom.</p>
<p>The solution? Change the type of the &#8220;pos&#8221; parameter for store_param_type() from &#8220;char **&#8221; to &#8220;unsigned char **&#8221; (and remove the cast from the call in cli_stmt_execute()). The function isn&#8217;t used anywhere else so this makes sense even if it wasn&#8217;t causing a bug.</p>
<p>And the lesson to be learnt from this: be very careful with pointer casts. Avoid them whenever possible. And <em>learn</em>, I mean <em>really learn </em>the aliasing rules. There are way too many pieces of software out there written by people who do not understand them and the result is a buggy software.</p>
<p><a href="http://bugs.mysql.com/48284">Mysql bug</a> filed.</p>
  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/davmac.wordpress.com/94/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/davmac.wordpress.com/94/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/davmac.wordpress.com/94/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/davmac.wordpress.com/94/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/davmac.wordpress.com/94/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/davmac.wordpress.com/94/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/davmac.wordpress.com/94/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/davmac.wordpress.com/94/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/davmac.wordpress.com/94/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/davmac.wordpress.com/94/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=davmac.wordpress.com&blog=699263&post=94&subd=davmac&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://davmac.wordpress.com/2009/10/25/mysql-and-c99-aliasing-rules-a-detective-story/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/61df8d728c699c39c4c73507da598712?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">davmac</media:title>
		</media:content>
	</item>
		<item>
		<title>FUSE, and ways in which it sucks.</title>
		<link>http://davmac.wordpress.com/2009/10/14/fuse-and-ways-in-which-it-sucks/</link>
		<comments>http://davmac.wordpress.com/2009/10/14/fuse-and-ways-in-which-it-sucks/#comments</comments>
		<pubDate>Wed, 14 Oct 2009 13:16:39 +0000</pubDate>
		<dc:creator>davmac</dc:creator>
				<category><![CDATA[Crap software]]></category>

		<guid isPermaLink="false">http://davmac.wordpress.com/?p=91</guid>
		<description><![CDATA[I&#8217;ve just started toying around with Fuse. The possibilities of writing comprehensive filesystems in user space interests me, not the least because it makes development much easier before you move to kernel space.
I&#8217;ll say it right out, Fuse is certainly not the worst conceived / designed/ implemented piece of software by a long shot. The [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=davmac.wordpress.com&blog=699263&post=91&subd=davmac&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>I&#8217;ve just started toying around with <a href="http://fuse.sourceforge.net/">Fuse</a>. The possibilities of writing comprehensive filesystems in user space interests me, not the least because it makes development much easier before you move to kernel space.</p>
<p>I&#8217;ll say it right out, Fuse is certainly not the worst conceived / designed/ implemented piece of software by a long shot. The documentation isn&#8217;t great, but it&#8217;s not totally lacking either (which immediately puts Fuse a cut above a whole swathe of other open source projects). It&#8217;s not perfect however.</p>
<p>My main annoyance is the multi-threading support which, frankly, shouldn&#8217;t exist; i.e., it should be handled by the application and not the library. It is, generally, better when software layers are thin; it should be up to the app to do appropriate locking etc., and the library (in this case Fuse) should just specify in the documentation where the locking is needed (or rather, more usefully, where it is <em>not</em> needed). Ok, quibbles, and providing more functionality is hardly a crime; after all, the low-level layer is still available and (mostly) unobfuscated by the higher-level functionality.</p>
<p>The real issue is that linking against libfuse pulls in the pthread shared library as well, which is not so good. The pthread library incurs overhead (other than taking up memory/address space) because when it is loaded, locking and unlocking mutexes suddenly become real operations &#8211; which means fputc() and a whole bunch of other library functions become a weeny bit slower. (Don&#8217;t believe me? do &#8220;nm&#8221; on /lib/libc.so and /lib/libpthread.so and notice that they <em>both</em> define <em>pthread_mutex_lock</em>).  Fuse should really be split into two librarys, libfuse and libfuse_mt, and only the latter should require pthreads. (Or, as I suggested earlier, just ditch the multi-thread functionality altogether, leave it up to the application to pull in pthreads if it really needs it).</p>
<p>Another annoyance is the <em>fuse_chan_receive</em> function:</p>
<pre style="padding-left:30px;">int fuse_chan_recv(struct fuse_chan **ch, char *buf, size_t size);</pre>
<p>Notice that first argument? Not just a pointer, it&#8217;s a <em>pointer-to-a-pointer</em>. Why, great Zeus, why??! The function is meant to receive data from a channel, in what crazy circumstance would you want it to change the channel pointer itself to point at something <em>else</em>? And in fact, the function delegates to a another function via a pointer (embedded in <em>**ch</em>) to a fuse_chan_ops structure; in the library itself, as far as I can see, there are only two implementations (one to receive directly from the kernel, and another called <em>mt_chan_receive</em>) and neither of them does actually alter the value of <em>*ch</em>. If you have a look at the implementation of fuse_loop() though you&#8217;ll notice the author clearly had the possibility in mind, since he copies the channel into a temporary pointer variable (<em>tmpch</em>) before using fuse_chan_recv &#8211; so yes, the bad API design has caused increased code complexity.</p>
<p>The comments above the declaration of <em>fuse_chan_recv</em> don&#8217;t give any clue as to why it would ever modify the *ch value and incidentally <em>ch</em> is incorrectly documented as being a &#8220;pointer to the channel&#8221; when it is of course really a &#8220;pointer to a pointer to the channel&#8221;.</p>
<p>Oh, and the <em>mt_chan_recieve </em>function I mentioned earlier &#8211; well, it presumably has something to do with the multi-threading support, but it&#8217;s hard to be sure because the function lacks anything bearing the slightest resemblance to a comment, and there certainly isn&#8217;t any other explanation of what it does nor how it works.</p>
  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/davmac.wordpress.com/91/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/davmac.wordpress.com/91/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/davmac.wordpress.com/91/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/davmac.wordpress.com/91/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/davmac.wordpress.com/91/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/davmac.wordpress.com/91/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/davmac.wordpress.com/91/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/davmac.wordpress.com/91/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/davmac.wordpress.com/91/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/davmac.wordpress.com/91/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=davmac.wordpress.com&blog=699263&post=91&subd=davmac&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://davmac.wordpress.com/2009/10/14/fuse-and-ways-in-which-it-sucks/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/61df8d728c699c39c4c73507da598712?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">davmac</media:title>
		</media:content>
	</item>
		<item>
		<title>POSIX write()</title>
		<link>http://davmac.wordpress.com/2009/10/03/posix-write/</link>
		<comments>http://davmac.wordpress.com/2009/10/03/posix-write/#comments</comments>
		<pubDate>Sat, 03 Oct 2009 07:48:14 +0000</pubDate>
		<dc:creator>davmac</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://davmac.wordpress.com/?p=86</guid>
		<description><![CDATA[Take a look at:
http://www.opengroup.org/onlinepubs/000095399/functions/write.html
What a mess &#8211; different requirements for regular files, pipes, and &#8220;other devices supporting non-blocking operation&#8221;.  For pipes, there are reasons for this (atomic writes), but I think they should have been abstracted out (why can&#8217;t other devices have atomic writes? Why isn&#8217;t there a general mechanism to determine maximum size of [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=davmac.wordpress.com&blog=699263&post=86&subd=davmac&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>Take a look at:</p>
<p style="padding-left:30px;"><a href="http://www.opengroup.org/onlinepubs/000095399/functions/write.html">http://www.opengroup.org/onlinepubs/000095399/functions/write.html</a></p>
<p>What a mess &#8211; different requirements for regular files, pipes, and &#8220;other devices supporting non-blocking operation&#8221;.  For pipes, there are reasons for this (atomic writes), but I think they should have been abstracted out (why can&#8217;t other devices have atomic writes? Why isn&#8217;t there a general mechanism to determine maximum size of an atomic write for a given file descriptor?).</p>
<p>I also notice, and I think this is particularly stupid, that if write() is interrupted by a signal before transferring any data it returns -1 rather than 0. If it transfers some data before being interrupted, it returns the amount of transferred data. Why make a special case out of 0?!! This forces increased complexity in the application, which can not assume that the return from write is equal to the number of bytes actually written, and for which -1 is in almost any other case an abortive error.</p>
<p>Unfortunately there is no discussion of the topic I was most interested in: atomicity/ordering of reads and writes to regular files. Consider:</p>
<ol>
<li>Process A issues a &#8220;read()&#8221; call to read a particular part of a file. The block device is currently busy so the request is queued.</li>
<li>Process B issues a &#8220;write()&#8221; request which writes to the <em>same part </em>of the file as process A requested.</li>
</ol>
<p>The question is now: can the data written by process B be returned to process A, or must the data that was in the file at the time of the read() call being issued? Also, is it allowed that process B might see <em>part </em>of the data that process A wrote, and <em>part</em> of what was in the file at the time of the read request?</p>
<p><span id="more-86"></span></p>
<p>The standard does say this:</p>
<blockquote><p>After a write() to a regular file has successfully returned: Any successful read() from each byte position in the file that was modified by that write shall return the data specified by the write() for that position until such byte positions are again modified.</p></blockquote>
<p>&#8230; However that doesn&#8217;t say when read() begins and ends, and still seems to allow that a write request issued after a read request might still affect the result from the read (if we assume that a &#8220;successful read()&#8221; refers to the point in time where read() returns with no error, which seems safe).</p>
<p>I&#8217;m inclined to think that the write() should cause the read() to immediately return with the data that was written. After all, unless there is explicit synchronization between the two processes, there is no way of controlling the order of events (the write() could just as well have been executed first, and in that case it seems clear that read() should return the freshly written data). In the presence of synchronization, I think it would be acceptable that processes must wait for the read to finish before allowing the other process to begin its write operation. Still, it would be nice if this formally specified.</p>
<p>I did eventually find:</p>
<p style="padding-left:30px;"><a href="http://www.opengroup.org/onlinepubs/000095399/basedefs/xbd_chap03.html">http://www.opengroup.org/onlinepubs/000095399/basedefs/xbd_chap03.html</a></p>
<p>(See &#8220;Synchronized I/O Data Integrity Completion&#8221;, &#8220;Synchronized I/O File Integrity Completion&#8221;). This applies when the file flags are various combinations of O_SYNC/O_DSYNC/O_RSYNC as specified in the <a href="http://www.opengroup.org/onlinepubs/000095399/functions/open.html">open</a> system call. The definitions go partway there:</p>
<blockquote><p>If there were any pending write requests affecting the data to be read at the time that the synchronized read operation was requested, these write requests are successfully transferred prior to reading the data.</p></blockquote>
<p>&#8230; However that doesn&#8217;t specify that write requests issued after the read request must not be performed before reading the data, and it&#8217;s possible that the omission is deliberate. On the other hand, the definitions talk about &#8220;successful transfer&#8221; without actually defining what &#8220;transfer&#8221; means (for a read operation, it is a &#8220;transfer of data to the application&#8221;, but for a write?). Surely O_SYNC writes must actually write the underlying media before they are successful &#8211; isn&#8217;t that the point of the mechanism? &#8211; but the standard doesn&#8217;t seem to make that explicit. (There is a hint under the definition of &#8220;Synchronized Input and Output&#8221;, but it&#8217;s very general).</p>
<p>Ah, but wait; I was wrong. The definition of &#8220;Successfully Transferred&#8221; states the data must be readable even after system failure or power failure. So that means it must have made it to the physical media. The problem with the standard here is that is not clear (in the definition of &#8220;synchronized I/O data integrity completion&#8221;) that &#8220;successfully transferred&#8221; has a defined meaning other than its plain old English meaning. I did check for a definition of &#8220;transferred&#8221; and there isn&#8217;t one; I only stumbled on &#8220;successfully transferred&#8221; by mistake.</p>
<p>Anyway, my first conclusion is unchanged: A write request should be able to change the result of an earlier read request.</p>
<p>The second question remains unanswered, so I&#8217;ll assume that an application must be prepared to accept that, if a write request has occurred after a read request, the read request may receive a result which includes a partial write. This would seem to be true even if O_RSYNC and friend were set. Only write requests issued <em>earlier</em> are required by POSIX to have been fully completed.</p>
  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/davmac.wordpress.com/86/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/davmac.wordpress.com/86/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/davmac.wordpress.com/86/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/davmac.wordpress.com/86/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/davmac.wordpress.com/86/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/davmac.wordpress.com/86/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/davmac.wordpress.com/86/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/davmac.wordpress.com/86/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/davmac.wordpress.com/86/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/davmac.wordpress.com/86/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=davmac.wordpress.com&blog=699263&post=86&subd=davmac&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://davmac.wordpress.com/2009/10/03/posix-write/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/61df8d728c699c39c4c73507da598712?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">davmac</media:title>
		</media:content>
	</item>
		<item>
		<title>All Quiet</title>
		<link>http://davmac.wordpress.com/2009/09/07/all-quiet/</link>
		<comments>http://davmac.wordpress.com/2009/09/07/all-quiet/#comments</comments>
		<pubDate>Mon, 07 Sep 2009 06:06:49 +0000</pubDate>
		<dc:creator>davmac</dc:creator>
				<category><![CDATA[Crap software]]></category>

		<guid isPermaLink="false">http://davmac.wordpress.com/?p=82</guid>
		<description><![CDATA[I haven&#8217;t written much lately, which must have disappointed my thousands upon thousands of regular readers. For now I&#8217;ll neatly avoid the issue by linking to someone else&#8217;s content, with this rant about the OpenSSL library by Marco Peereboom.
       <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=davmac.wordpress.com&blog=699263&post=82&subd=davmac&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>I haven&#8217;t written much lately, which must have disappointed my thousands upon thousands of regular readers. For now I&#8217;ll neatly avoid the issue by linking to someone else&#8217;s content, with this<a href="http://www.peereboom.us/assl/html/openssl.html"> rant about the OpenSSL library</a> by Marco Peereboom.</p>
  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/davmac.wordpress.com/82/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/davmac.wordpress.com/82/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/davmac.wordpress.com/82/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/davmac.wordpress.com/82/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/davmac.wordpress.com/82/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/davmac.wordpress.com/82/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/davmac.wordpress.com/82/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/davmac.wordpress.com/82/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/davmac.wordpress.com/82/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/davmac.wordpress.com/82/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=davmac.wordpress.com&blog=699263&post=82&subd=davmac&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://davmac.wordpress.com/2009/09/07/all-quiet/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/61df8d728c699c39c4c73507da598712?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">davmac</media:title>
		</media:content>
	</item>
		<item>
		<title>Intel Xorg drivers in a state of chaos?</title>
		<link>http://davmac.wordpress.com/2009/07/22/intel-xorg-drivers-in-a-state-of-chaos/</link>
		<comments>http://davmac.wordpress.com/2009/07/22/intel-xorg-drivers-in-a-state-of-chaos/#comments</comments>
		<pubDate>Wed, 22 Jul 2009 08:29:21 +0000</pubDate>
		<dc:creator>davmac</dc:creator>
				<category><![CDATA[Crap software]]></category>

		<guid isPermaLink="false">http://davmac.wordpress.com/?p=76</guid>
		<description><![CDATA[My primary desktop machine has Intel&#8217;s G33 graphics chipset. It&#8217;s fairly low-end but it&#8217;s fine for my needs. For ages now I&#8217;ve been running on Xorg server 1.6.0,. Mesa 7.3rc2, and xf86-video-intel-2.6.3 and suffered only occasional X crashes, although I was certainly limited to run one X session at once (I used to like running [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=davmac.wordpress.com&blog=699263&post=76&subd=davmac&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>My primary desktop machine has Intel&#8217;s G33 graphics chipset. It&#8217;s fairly low-end but it&#8217;s fine for my needs. For ages now I&#8217;ve been running on Xorg server 1.6.0,. Mesa 7.3rc2, and xf86-video-intel-2.6.3 and suffered only occasional X crashes, although I was certainly limited to run one X session at once (I used to like running two, essentially using it as an alternative to the desktop-switchers that are common now; it was something I could live with out, but it always bothered me that it didn&#8217;t work).</p>
<p>Just recently, a gcc 4.4.1 release candidate was tagged and so I decided to upgrade a few of these system components. Firstly, Xorg-sever 1.6.2, the latest stable release. I also updated my kernel to the latest 2.6.30.2. libdrm went to 2.4.12 (the latest). Mesa went to 7.4.4 (7.5 has been released as &#8220;stable&#8221; with a warning that &#8220;you might want to wait for 7.5.1, or stick with 7.4 series for now&#8221;). And, I built the xf86-video-intel driver version 2.8.0 (which supports only UXA style of acceleration, and &#8220;really likes&#8221; <a href="http://www.phoronix.com/scan.php?page=article&amp;item=kernel_modesetting&amp;num=1">Kernel Mode Setting</a> though is still meant to function without it).</p>
<p>Results:</p>
<p><strong> Without KMS</strong>: Ok, but when I run a 3D app (Xscreensaver&#8217;s &#8220;antmaze&#8221;) I just get a blank screen. Running a second X server gives me a corrupted display and promptly crashes, forcing me to reboot via a remote log-in.</p>
<p><strong>With KMS</strong>: Ok, but no 3D still. When I switch to a different VT I get an instant freeze, no chance to even start another X server (though I can still do a remote log-in).</p>
<p>Neither of these was really acceptable so I&#8217;ve gone back to the 2.7.1 xf86-video-intel driver. This driver supports the older &#8220;EXA&#8221; acceleration method, plus Intel&#8217;s own <a href="http://en.wikipedia.org/wiki/UXA">UXA</a> method which they seem to think is the truth, the light, the way, but which has caused performance regressions and screen corruption in the past. (The even older &#8220;XAA&#8221; was ditched a while ago, I guess). I&#8217;m not even going to bother trying to use KMS again so I test between EXA and UXA:</p>
<p><strong>With UXA</strong>: Despite the fact that Intel seem to think UXA is the way of the future, it gave me only problems. Specifically, running antmaze gave a window which flickered constantly between what antmaze should look like, and what appeared to be a copy of my desktop (resulting in one of those crazy infinite recursion effects). I managed to get a screen shot, below.</p>
<p><strong>With EXA</strong>: Everything is Ok. Performance sucks a bit, but at least everything looks like it should and I don&#8217;t get crashes. Even better, it seems I am now able to run two X servers on the same machine and switch between them. I won&#8217;t be surprised if I still get the odd X crash, but that&#8217;s really just the status quo.</p>
<div id="attachment_77" class="wp-caption alignleft" style="width: 410px"><img class="size-full wp-image-77" title="uxa-screencap" src="http://davmac.files.wordpress.com/2009/07/uxa-screencap.png?w=400&#038;h=320" alt="Screen capture when using xf86-video-intel 2.7.1 with UXA acceleration" width="400" height="320" /><p class="wp-caption-text">Screen capture when using xf86-video-intel 2.7.1 with UXA acceleration</p></div>
<p>Frankly, it bothers me a lot that the 2.8.0 driver has seriously regressed from 2.7.1. For quite a while now it&#8217;s been touch-and-go with the intel drivers, I&#8217;ve seen quite a few serious problems in different releases.</p>
<p>Also, I&#8217;m totally unconvinced that UXA is the right solution for now. It may well have technical merits if done right but it really seems like it would be better to get EXA working properly &#8211; and fast &#8211; first, and worry about other improvements (like UXA) once the EXA driver is in a stable state, and is about as good performance-wise as it can be.</p>
<p>Hopefully now that EXA has been abandoned (even if it was too early) the focus on UXA will cause it to stabilise and improve.</p>
<p><strong>Update 31/08/09</strong>: I&#8217;m now running Xorg server 1.6.3 and xf86-video-intel 2.8.1, which has been released since I originally wrote this blog entry. I&#8217;m pleased to say that the crashes (non-KMS) are fixed and I can run two Xservers side-by-side without problems. OpenGL was horribly slow and caused disk thrashing, until I also upgraded to Mesa 7.5. With KMS there are still problems; when I switch away from the X server to a text-mode terminal, no mode-change happens &#8211; I just keep seeing the X screen; if I switch back to it (CTRL+ALT+F7) I can continue working in X. Exiting X also fails to restore text mode.</p>
<p><strong>Update 29/09/2009</strong>: xf86-video-intel 2.9.0 has the same problem as 2.8.1. <a href="https://bugs.freedesktop.org/show_bug.cgi?id=24208">Reported</a> to the Xorg bug database. Let&#8217;s see what happens.</p>
<p><strong>Update 1/10/2009</strong>: Ha, the old &#8220;not a bug&#8221; response. I thought about fighting this but didn&#8217;t want to devolve into a &#8220;open bug&#8221; / &#8220;close bug&#8221; ping-pong match; anyway, to summarise:</p>
<ol>
<li> Loading fbcon kind of solves the problem; I can switch away from the X session. However, it turns my text-mode virtual terminals into framebuffer VTs (which I don&#8217;t want).</li>
<li>Technically it shouldn&#8217;t be impossible to have what I want &#8211; that is, to have KMS and still have text-mode terminals. But it&#8217;s probably a kernel-side issue rather than anything to do with the xf86-video-intel driver. (I may even look and see if I can fix it myself, at some point; I can&#8217;t explain why, I just really like text terminals).</li>
<li>I personally think &#8220;NOTABUG&#8221; is the wrong resolution: there <em>is</em> a documentation bug. The fbcon requirement should be documented &#8211; either in the X driver man page, or the README that comes with the source bundle, or in the linux kernel documentation (the help text for the i915 driver). &#8220;NOTOURBUG&#8221; may have been appropriate.</li>
<li>For now I&#8217;ll stick with non-KMS (can we call it &#8220;userspace mode-setting&#8221;? I like that). Although I&#8217;m worried that UMS will disappear from the driver at some point in the future, just like EXA and DRI1, murdered in the night.</li>
</ol>
  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/davmac.wordpress.com/76/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/davmac.wordpress.com/76/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/davmac.wordpress.com/76/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/davmac.wordpress.com/76/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/davmac.wordpress.com/76/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/davmac.wordpress.com/76/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/davmac.wordpress.com/76/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/davmac.wordpress.com/76/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/davmac.wordpress.com/76/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/davmac.wordpress.com/76/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=davmac.wordpress.com&blog=699263&post=76&subd=davmac&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://davmac.wordpress.com/2009/07/22/intel-xorg-drivers-in-a-state-of-chaos/feed/</wfw:commentRss>
		<slash:comments>9</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/61df8d728c699c39c4c73507da598712?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">davmac</media:title>
		</media:content>

		<media:content url="http://davmac.files.wordpress.com/2009/07/uxa-screencap.png" medium="image">
			<media:title type="html">uxa-screencap</media:title>
		</media:content>
	</item>
		<item>
		<title>Subversive</title>
		<link>http://davmac.wordpress.com/2009/07/01/subversive/</link>
		<comments>http://davmac.wordpress.com/2009/07/01/subversive/#comments</comments>
		<pubDate>Wed, 01 Jul 2009 11:16:57 +0000</pubDate>
		<dc:creator>davmac</dc:creator>
				<category><![CDATA[Crap software]]></category>

		<guid isPermaLink="false">http://davmac.wordpress.com/?p=73</guid>
		<description><![CDATA[Eclipse was the first &#8220;real&#8221; Java IDE I used and I&#8217;ve stuck with it for a while now. We migrated a project from CVS to Subversion a while back and, after a brief and highly unsuccessful fling with Subclipse (I&#8217;m sure it&#8217;s improved in the meantime, but I&#8217;ve never gotten around to trying it out [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=davmac.wordpress.com&blog=699263&post=73&subd=davmac&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>Eclipse was the first &#8220;real&#8221; Java IDE I used and I&#8217;ve stuck with it for a while now. We migrated a project from CVS to Subversion a while back and, after a brief and highly unsuccessful fling with Subclipse (I&#8217;m sure it&#8217;s improved in the meantime, but I&#8217;ve never gotten around to trying it out again) I started using Subversive to provide Subversion support within Eclipse. Most of the basic things work but it has the following annoyances:</p>
<p>1. On my home machine, for some reason when I synchronize, it always asks for my username and password. Actually it doesn&#8217;t so much ask, seeing as the fields are already filled in and I just have to click &#8220;ok&#8221;, but it always presents the dialog.</p>
<p>2. On my work machine, on the other hand, it doesn&#8217;t do that. What it does instead is ask for the proxy password, despite the fact that I have entered the proxy password in the Eclipse preferences. Annoyingly, it asks for the password again from time to time as I do commits, synchronizes, whatever.</p>
<p>3. A whole lot of corner cases seem to be broken, especially with regards to tagging. For instance if I choose a folder under trunk and &#8220;New -&gt; tag&#8221; (which incidentally is a really awkward menu choice, why can&#8217;t &#8220;tag&#8221; be one of the top-level options?) and then give it a new tag name, it creates the tag and puts the <em>contents</em> of the folder under the tag, but not the folder itself. If I create the folder under the tag first, and supply that combined tag name and folder name as the tag name (i.e. &#8220;TAG_NAME/folder_name&#8221;), it then DOES put the folder underneath the folder with the same name that I&#8217;ve already created (TAG_NAME/folder_name/folder_name)! WTF! To get it to work I have to create the tag <em>without</em> creating the folder and then specify &#8220;TAG_NAME/folder_name&#8221; as the tag. It&#8217;s <em>borked</em>.</p>
<p>4. Some tag operations don&#8217;t automatically refresh the tree in the SVN repository browsing view, even though they should. (I can&#8217;t remember exactly which ones, but I did spent a lot of time today creating and removing tags while trying to solve the problem in [3]).</p>
<p>5. What the hell is the &#8220;ROOT&#8221; folder? It just seems to contain a copy of the repository underneath it. What&#8217;s the point?</p>
<p>6. What does &#8220;Add revision link&#8221; (in the context menu on a folder in the SVN repository browsing view) actually <em>do</em>?</p>
  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/davmac.wordpress.com/73/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/davmac.wordpress.com/73/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/davmac.wordpress.com/73/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/davmac.wordpress.com/73/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/davmac.wordpress.com/73/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/davmac.wordpress.com/73/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/davmac.wordpress.com/73/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/davmac.wordpress.com/73/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/davmac.wordpress.com/73/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/davmac.wordpress.com/73/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=davmac.wordpress.com&blog=699263&post=73&subd=davmac&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://davmac.wordpress.com/2009/07/01/subversive/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/61df8d728c699c39c4c73507da598712?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">davmac</media:title>
		</media:content>
	</item>
		<item>
		<title>C Compiler Benchmarks</title>
		<link>http://davmac.wordpress.com/2009/04/28/c-compiler-benchmarks/</link>
		<comments>http://davmac.wordpress.com/2009/04/28/c-compiler-benchmarks/#comments</comments>
		<pubDate>Tue, 28 Apr 2009 11:37:06 +0000</pubDate>
		<dc:creator>davmac</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://davmac.wordpress.com/?p=65</guid>
		<description><![CDATA[Edit 1/5/09: I&#8217;ve kind of re-done this. I wasn&#8217;t happy with it and some of the results were incorrect. I&#8217;ve also added two new benchmark programs since the first version of this post.
Well gcc 4.4.0 has been released now (with a few bugs, of course&#8230;) and I thought it&#8217;d be interesting to do some benchmarks, [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=davmac.wordpress.com&blog=699263&post=65&subd=davmac&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p><em>Edit 1/5/09</em>: I&#8217;ve kind of re-done this. I wasn&#8217;t happy with it and some of the results were incorrect. I&#8217;ve also added two new benchmark programs since the first version of this post.</p>
<p>Well gcc 4.4.0 has been released now (with a few bugs, of course&#8230;) and I thought it&#8217;d be interesting to do some benchmarks, especially as there are now a few open source compilers out there (<a href="http://gcc.gnu.org/">gcc</a>, <a href="http://llvm.org/">llvm</a>, <a href="http://www.libfirm.org/">libfirm/cparser</a>, <a href="http://pcc.ludd.ltu.se/">pcc</a>, <a href="http://tack.sourceforge.net/">ack</a>; I&#8217;m not so interested in the latter two just now). Now I don&#8217;t have access to SPEC so I cooked up just a few little programs specifically designed to test a compiler&#8217;s ability to perform certain types of optimization. Eventually, I might add some more tests and a proper harness; for now, here are the results (smaller numbers are better):</p>
<div id="attachment_70" class="wp-caption alignleft" style="width: 460px"><img class="size-full wp-image-70" title="C Compiler Benchmark results" src="http://davmac.files.wordpress.com/2009/04/c-compiler-benchmark2.png?w=450&#038;h=488" alt="Results" width="450" height="488" /><p class="wp-caption-text">Results</p></div>
<p>Thankfully, it looks like gcc 4.4.0 performs relatively well (compared to other compilers) in most cases. Noticable exceptions are bm5 (where gcc-3.4.6 does better), bm3 and bm6 (where llvm-2.5 does better, especially in bm6).</p>
<p>llvm-2.5 does pull ahead in a few of the tests, but fails dismally in the 4th, which tests how well the compiler manages a naive memcpy implementation. llvm-2.5 generated code is more than four times slower than gcc generated code in this case, which is ridiculously bad. If it wasn&#8217;t for this result, llvm would be looking like the better compiler.</p>
<p>Sadly, none of the compilers I tested did particularly well at optimising bm2. In theory bm2 run times could be almost idential to bm3 times, but no compiler yet performs the necessary optimizations. This is a shame because the potential speedup in this case is obviously huge.</p>
<p>It&#8217;s surprising how badly most compilers do at bm4, also.</p>
<p>So, nothing too exciting in these results, but it&#8217;s been an interesting exercise. I&#8217;ll post benchmark source code soon (ok, probably I won&#8217;t. So just yell if you want it).</p>
<p><span id="more-65"></span></p>
<p><strong>General notes on the benchmarks</strong></p>
<p>Firstly, I&#8217;m trying to test the compilers&#8217; ability to optimize specific constructs. These benchmarks are small and self-contained, they are not complete programs. Some may argue that this is not a good way to do a benchmark, as the tests are artificial; well, firstly, these tests allow us to see specifically what the weaknesses in certain compilers are, and secondly, it&#8217;s my contention that compiler that does well in most of these tests will do well in most real-world tests.</p>
<p>Note that there is no floating-point in these benchmark programs. I might add some in at some point.</p>
<p>So what do the various benchmarks actually test?</p>
<p><strong>bm1</strong> just tests that a switch&#8230;case statement with values outside the range of the switch&#8217;d datatype are optimized away. gcc 3.4.6 doesn&#8217;t do this, which is why it compares badly against gcc 4.3.3 and 4.4.0 (which do).</p>
<p><strong>bm2</strong> tests alias analysis of the compiler. It has a function which takes an argument pointer to a certain large structure s1, but then allocates space for a slightly smaller structure s2 on the stack (as a local variable). It copies memory (using memcpy) from s1 to s2, then makes a modification of one field of s2, before finally copying s2 back to s1. This could be optimized by just changing the field directly in s1 without doing the two memory copy operations; however, none of the tested compilers manage to do this.</p>
<p><strong>bm3</strong> is like bm2, but the s2 structure is much smaller. Most compilers then seem to be able to perform decent optimization; gcc 4.3.3 notably fails.</p>
<p><strong>bm4 </strong>is a simple memory copy written using a while loop with two char pointers. It&#8217;s amazing how much difference there is between the different compilers. Notably, a simple hand-coded assembly &#8220;rep movsb&#8221; does way, way better than <em>any</em> of the compilers (0.036 seconds).</p>
<p><strong>bm5 </strong>is a small testcase taken from a gcc PR. It contains branches and potential for common subexpression elimination; it probably puts some pressure on the register allocator. The regression affects gcc 4.3/4.4 series which is reflected in the benchmark results (gcc 3.4.6 really shines).</p>
<p><strong>bm6</strong> is another gcc PR. It&#8217;s essentially testing common subexpression elimination in combination with loop invariant hoisting. gcc-3.4.6 does shockingly badly, but gcc-4.3.3 and gcc-4.4.0 still get whipped by llvm-2.5.</p>
<p><strong>bm7 </strong>calls a function which returns a (large) structure and passes the result straight into another function. The ABI allows for returning the structure directly into the stack location from which it is then used as a parameter, thus avoiding the need to copy the structure; however, not all compilers manage this.</p>
<p>Conclusion: free compilers still suck a bit, but at least gcc 4.4.0 sucks less than earlier versions, and llvm-2.5 is looking halfway decent as well.</p>
  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/davmac.wordpress.com/65/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/davmac.wordpress.com/65/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/davmac.wordpress.com/65/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/davmac.wordpress.com/65/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/davmac.wordpress.com/65/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/davmac.wordpress.com/65/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/davmac.wordpress.com/65/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/davmac.wordpress.com/65/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/davmac.wordpress.com/65/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/davmac.wordpress.com/65/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=davmac.wordpress.com&blog=699263&post=65&subd=davmac&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://davmac.wordpress.com/2009/04/28/c-compiler-benchmarks/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/61df8d728c699c39c4c73507da598712?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">davmac</media:title>
		</media:content>

		<media:content url="http://davmac.files.wordpress.com/2009/04/c-compiler-benchmark2.png" medium="image">
			<media:title type="html">C Compiler Benchmark results</media:title>
		</media:content>
	</item>
		<item>
		<title>Mplayer version 1.0&#8230; ever?</title>
		<link>http://davmac.wordpress.com/2009/02/19/mplayer-version-10-ever/</link>
		<comments>http://davmac.wordpress.com/2009/02/19/mplayer-version-10-ever/#comments</comments>
		<pubDate>Thu, 19 Feb 2009 07:15:54 +0000</pubDate>
		<dc:creator>davmac</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://davmac.wordpress.com/?p=60</guid>
		<description><![CDATA[The guys that develope MPlayer have some serious hangup about doing an actual 1.0 release. I mean, they&#8217;ve been through 1.0pre1, pre2, pre3, pre4, pre5, -rc1 (2006-10-22, that&#8217;s over 2 years ago) and -rc2 (2007-10-7, over 1 year ago) and still we don&#8217;t have a 1.0 release.
Now, there are mailing list posts like this one [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=davmac.wordpress.com&blog=699263&post=60&subd=davmac&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>The guys that develope <a href="http://www.mplayerhq.hu/">MPlayer</a> have some serious hangup about doing an actual 1.0 release. I mean, they&#8217;ve been through 1.0pre1, pre2, pre3, pre4, pre5, -rc1 (2006-10-22, that&#8217;s over 2 years ago) and -rc2 (2007-10-7, over 1 year ago) and still we don&#8217;t have a 1.0 release.</p>
<p>Now, there are mailing list posts like <a href="http://lists.mplayerhq.hu/pipermail/mplayer-users/2008-June/073540.html">this one</a> which say &#8220;it&#8217;ll be ready when it&#8217;s ready&#8221; and calling for the use who dared venture forth with the question (of when the next rc or release might be forthcoming) to be the release manager. I mean, look, I understand that these guys are doing a lot of hard work developing MPlayer and it is, after all, a pretty good product by open source standards (I mean, it has some actual documentation for one thing) BUT geez, if you&#8217;re not going to actually release 1.0 in some reasonable timeline then why have &#8220;release candidates&#8221;? Was -rc2 so bad that it can&#8217;t be called 1.0? (I mean, that is the point of a &#8220;release candidate&#8221; right? It is the candidate for the release, yes?) And if -rc2 has problems, wouldn&#8217;t it be prudent to at least do another release candidate, i.e. rc3?</p>
<p>Sigh. I guess I&#8217;m complaining not so much about the absence of MPlayer 1.0 (although I would certainly like it to arrive) but the fact that these &#8220;release candiates&#8221; exist and did so for so long without any actual release occurring. I mean, you shouldn&#8217;t have a release candidate if you&#8217;re not planning (or able) to do an actual release &#8211; it kind of gives the wrong impression. (Let&#8217;s be clear. The developers aren&#8217;t at fault, at least, not most of them. I&#8217;m just kind of irked at whoever had the bright idea to bundle a tarball and call it &#8220;Mplayer 1.0pre1&#8243; in the first place&#8230;)</p>
  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/davmac.wordpress.com/60/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/davmac.wordpress.com/60/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/davmac.wordpress.com/60/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/davmac.wordpress.com/60/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/davmac.wordpress.com/60/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/davmac.wordpress.com/60/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/davmac.wordpress.com/60/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/davmac.wordpress.com/60/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/davmac.wordpress.com/60/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/davmac.wordpress.com/60/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=davmac.wordpress.com&blog=699263&post=60&subd=davmac&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://davmac.wordpress.com/2009/02/19/mplayer-version-10-ever/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/61df8d728c699c39c4c73507da598712?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">davmac</media:title>
		</media:content>
	</item>
		<item>
		<title>Xorg server 1.5.3 fails to build&#8230; because of glproto</title>
		<link>http://davmac.wordpress.com/2009/01/14/xorg-server-153-fails-to-build-because-of-glproto/</link>
		<comments>http://davmac.wordpress.com/2009/01/14/xorg-server-153-fails-to-build-because-of-glproto/#comments</comments>
		<pubDate>Wed, 14 Jan 2009 10:12:33 +0000</pubDate>
		<dc:creator>davmac</dc:creator>
				<category><![CDATA[Crap software]]></category>

		<guid isPermaLink="false">http://davmac.wordpress.com/?p=57</guid>
		<description><![CDATA[So when I try to build xorg-server-1.5.3, I get:
/bin/sh ../libtool --tag=CC   --mode=compile gcc -DHAVE_CONFIG_H -I. -I../include -I../hw/xfree86/os-support -I../hw/xfree86/os-support/bus -I../hw/xfree86/common -I../hw/xfree86/dri -I../hw/xfree86/dri2 -I../mi   -DHAVE_DIX_CONFIG_H -Wall -Wpointer-arith -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations -Wnested-externs -fno-strict-aliasing -D_BSD_SOURCE -DHAS_FCHOWN -DHAS_STICKY_DIR_BIT -I/usr/include/freetype2 -I/usr/X11R7/include -I/usr/X11R7/include/pixman-1     -I../include -I../include -I../Xext -I../composite -I../damageext -I../xfixes -I../Xi -I../mi -I../miext/shadow  -I../miext/damage [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=davmac.wordpress.com&blog=699263&post=57&subd=davmac&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>So when I try to build xorg-server-1.5.3, I get:</p>
<pre style="padding-left:30px;">/bin/sh ../libtool --tag=CC   --mode=compile gcc -DHAVE_CONFIG_H -I. -I../include -I../hw/xfree86/os-support -I../hw/xfree86/os-support/bus -I../hw/xfree86/common -I../hw/xfree86/dri -I../hw/xfree86/dri2 -I../mi   -DHAVE_DIX_CONFIG_H -Wall -Wpointer-arith -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations -Wnested-externs -fno-strict-aliasing -D_BSD_SOURCE -DHAS_FCHOWN -DHAS_STICKY_DIR_BIT -I/usr/include/freetype2 -I/usr/X11R7/include -I/usr/X11R7/include/pixman-1     -I../include -I../include -I../Xext -I../composite -I../damageext -I../xfixes -I../Xi -I../mi -I../miext/shadow  -I../miext/damage -I../render -I../randr -I../fb -I/usr/X11R7/include -I/usr/X11R7/include -I/usr/include/drm -I/usr/X11R7/include/X11/dri -DXFree86Server -DGLX_USE_TLS -DPTHREADS  -g -O2 -MT glxdriswrast.lo -MD -MP -MF .deps/glxdriswrast.Tpo -c -o glxdriswrast.lo glxdriswrast.c
 gcc -DHAVE_CONFIG_H -I. -I../include -I../hw/xfree86/os-support -I../hw/xfree86/os-support/bus -I../hw/xfree86/common -I../hw/xfree86/dri -I../hw/xfree86/dri2 -I../mi -DHAVE_DIX_CONFIG_H -Wall -Wpointer-arith -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations -Wnested-externs -fno-strict-aliasing -D_BSD_SOURCE -DHAS_FCHOWN -DHAS_STICKY_DIR_BIT -I/usr/include/freetype2 -I/usr/X11R7/include -I/usr/X11R7/include/pixman-1 -I../include -I../include -I../Xext -I../composite -I../damageext -I../xfixes -I../Xi -I../mi -I../miext/shadow -I../miext/damage -I../render -I../randr -I../fb -I/usr/X11R7/include -I/usr/X11R7/include -I/usr/include/drm -I/usr/X11R7/include/X11/dri -DXFree86Server -DGLX_USE_TLS -DPTHREADS -g -O2 -MT glxdriswrast.lo -MD -MP -MF .deps/glxdriswrast.Tpo -c glxdriswrast.c  -fPIC -DPIC -o .libs/glxdriswrast.o
In file included from glxdriswrast.c:49:
glxdricommon.h:32: error: expected ':', ',', ';', '}' or '__attribute__' before '*' token
glxdricommon.h:36: warning: type defaults to 'int' in declaration of '__DRIcoreExtension'
glxdricommon.h:36: error: expected ';', ',' or ')' before '*' token
glxdricommon.h:38: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'systemTimeExtension'
glxdriswrast.c:67: error: expected ':', ',', ';', '}' or '__attribute__' before '*' token</pre>
<p>(and a bunch more).</p>
<p>It took me a while to figure this one out. There are conflicting &#8220;GL/internal/dri_interface.h&#8221; files &#8211; one comes from Mesa and the other one from the glproto package (version 1.4.9) which is part of the Xorg distribution. Deleting the latter (at /usr/X11R7/include/GL/internal/dri_interface.h) made the problem go away.</p>
<p>It is a bit strange, though; why does glproto include that header file if it&#8217;s not needed &#8211; if it is, in fact, problematic?</p>
  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/davmac.wordpress.com/57/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/davmac.wordpress.com/57/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/davmac.wordpress.com/57/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/davmac.wordpress.com/57/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/davmac.wordpress.com/57/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/davmac.wordpress.com/57/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/davmac.wordpress.com/57/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/davmac.wordpress.com/57/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/davmac.wordpress.com/57/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/davmac.wordpress.com/57/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=davmac.wordpress.com&blog=699263&post=57&subd=davmac&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://davmac.wordpress.com/2009/01/14/xorg-server-153-fails-to-build-because-of-glproto/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/61df8d728c699c39c4c73507da598712?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">davmac</media:title>
		</media:content>
	</item>
		<item>
		<title>Comcast is screwing its customers&#8230;</title>
		<link>http://davmac.wordpress.com/2009/01/09/comcast-is-screwing-its-customers/</link>
		<comments>http://davmac.wordpress.com/2009/01/09/comcast-is-screwing-its-customers/#comments</comments>
		<pubDate>Fri, 09 Jan 2009 02:48:23 +0000</pubDate>
		<dc:creator>davmac</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://davmac.wordpress.com/?p=53</guid>
		<description><![CDATA[Comcast is screwing its customers by blocking &#8220;spam&#8221; which isn&#8217;t spam and also preventing mail servers which are accused of &#8220;spamming&#8221; from being removed from Comcast&#8217;s blacklist. I&#8217;ve tried to respond to two support requests from Comcast subscribers recently and in both cases, my reply bounced.
I got this back rom my mail server:
Reporting-MTA: dns; *********

Final-Recipient: [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=davmac.wordpress.com&blog=699263&post=53&subd=davmac&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>Comcast is screwing its customers by blocking &#8220;spam&#8221; which isn&#8217;t spam and also preventing mail servers which are accused of &#8220;spamming&#8221; from being removed from Comcast&#8217;s blacklist. I&#8217;ve tried to respond to two support requests from Comcast subscribers recently and in both cases, my reply bounced.</p>
<p>I got this back rom my mail server:</p>
<pre style="padding-left:30px;">Reporting-MTA: dns; *********

Final-Recipient: rfc822;********@comcast.net
Action: failed
Status: 5.0.0 (permanent failure)
Diagnostic-Code: smtp; 5.4.7 - Delivery expired (message too old) 554-'IMTA06.emeryville.ca.mail.comcast.net comcast ***.***.***.*** Comcast BL004 Blocked for spam.  Please see http://help.comcast.net/content/faq/BL004' (delivery attempts: 0)</pre>
<p>(Of course &#8220;***&#8221; are places where I&#8217;ve removed identifying information).</p>
<p>On following the link to <a href="http://help.comcast.net/content/faq/BL004">http://help.comcast.net/content/faq/BL004</a>, I get a page which suggests I can go to <a href="http://www.comcastsupport.com/rbl">http://www.comcastsupport.com/rbl</a> to get my mailserver unblocked. However, following that link redirects me to <a href="http://www.comcastsupport.com/browserupgrade/">http://www.comcastsupport.com/browserupgrade/</a> which gives me a 404 Not Found.</p>
<p>Way to go, Comcast.</p>
  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/davmac.wordpress.com/53/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/davmac.wordpress.com/53/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/davmac.wordpress.com/53/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/davmac.wordpress.com/53/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/davmac.wordpress.com/53/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/davmac.wordpress.com/53/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/davmac.wordpress.com/53/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/davmac.wordpress.com/53/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/davmac.wordpress.com/53/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/davmac.wordpress.com/53/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=davmac.wordpress.com&blog=699263&post=53&subd=davmac&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://davmac.wordpress.com/2009/01/09/comcast-is-screwing-its-customers/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/61df8d728c699c39c4c73507da598712?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">davmac</media:title>
		</media:content>
	</item>
	</channel>
</rss>