When is a virus scanner like a virus?
I spent a few hours on the wrong side of that riddle recently.
Most of the engineers here at OpenLogic work in some flavor of Linux on their development machines. When I first received my laptop I attempted to join the crowd and install Ubuntu. However, due to hardware issues with the video and wireless chipsets on the machine I got, I reluctantly decided to back out and go with the standard issue Windows XP and am still running that today.
This past week I joined a new project team working in Ruby on Rails. Having been previously focused on Java projects, I had to install and configure a number of things to get up and running in the new development environment. Part of that setup involved installing a MySQL instance used by the application.
Once I had everything ready to roll, I wanted to run "rake test" to verify that all the tests passed. Well, they didn't. I realized that I initially set some things in the MySQL configuration to be too restrictive. I'll spare you the details, as that's not the point of this blog post. So, I reconfigured, based on the settings another developer had working in Windows.
I ran "rake test" again. Things were looking better. Tests were passing. Feeling good. Nope, boom, suddenly failures left and right. I ran "rake test" again and got failures from the start. The errors that were occurring repeatedly looked something like this:
ActiveRecord::StatementInvalid: Mysql::Error:
Can't create/write to file '#sql_1830_0.MYD' (Errcode: 17): SHOW FIELDS FROM tags
The file it was trying to write to was in the temp data directory under the MySQL installation. I messed with file permissions. I deleted the temp file and ran again. Things started off well, but started failing again mid-stream. I was trying my best to apply logic to the situation rather than jump to the typical re-install, reboot approach it's so tempting to take when things go wrong in a Windows environment. I decided to peruse some Google search results a little deeper than I had at first. Thankfully, I followed a link to a post on an Alfresco forum. Obviously the issue I was dealing with had nothing to do with Alfresco, but was dealing with the same MySQL error.
There it was: "The problem is fixed now. Newer version of McAfee was protecting MySql temporary folder."
No way. Could that really be it? I am running McAfee… I temporarily disabled the virus checker and ran "rake test" again… Success. All the tests passed.
Unbelievable. I honestly don't know that I would have ever thought of that as the possible cause of the problem. Let me just say I am thankful when people like Senthil follow up their posts with the solution they found, even when it wasn't one someone suggested in a reply. Then again, if I hadn't found the solution, maybe this would have been the impetus to finally get Linux working on my laptop. Then, afterall, I wouldn't have much need for a virus scanner anymore.



