Thursday, July 17, 2008
Thank you Fedora.
I have Corsair RAM in my machine, the kind that has the activity LEDs on it, and these LEDs were also acting strange, again showing the unusual burst of activity pattern followed by pauses of inactivity. I immediately thought this might be memory related so I left Memtest 86+ (available free through the link) running for the night only to discover that my memory was likely just fine.
So after a long week of arduous troubleshooting I narrowed it down to the SATA drive I was running the OS off of. Looking through the drive's S.M.A.R.T info revealed that the drive was failing (SpeedFan gives you a nice breakdown of your drive info). I also have 2 other IDE drives in my machine which up until now I have been primarily using for storage. I backed up one of them on an external drive and installed XP on it hoping my defective drive would last long enough for me to back up my most important data.
The good news was that once XP was installed all of the problems immediately went away (confirming the role of the SATA drive in the problems I have been having), and I also managed to grab some of the most important data off the defective drive for backup. I figured I could breath easy for now and get the rest of the data off later on. Well in retrospect that was a mistake, as the next morning when I woke up, the drive was gone.
Now you would think this would be the end of the story, except that a week later, upon waking up, I discovered that my system was hung and required a reboot. After restarting the system I found out that my dead drive had come back to life. Needless to say I was exhilarated, in the sort of way that I rarely am upon waking up. However, my excitement at the thought of having my data back did not last long, as I had quickly discovered that while the drive was available, it was not accessible and neither was the data in it.
Not intent on giving up, I decided to try my best to get that data off even if it took me all day (the data I'm referring to was mostly composed of pictures - 3.5GB worth of family pictures that while not crucial, certainly had a lot of sentimental value - especially since many of them were not backed up anywhere else). So on I went running CHKDSK and Western Digital diagnostic utilities, wasting many hours with absolutely no luck. I then decided to give Linux a shot. So I downloaded Fedora 9 Live, burned the ISO and booted into the OS. Thanks to some instructions I found on a blog post by Rodney Fletcher, I was able to determine the commands to mount an NTFS partition in Linux and decided to see what would happen. Unfortunately, while I was able to mount my external drive without a hitch, trying to mount the defective drive ended up repeatedly hanging the live OS. About to admit defeat, I booted back into XP only to discover that whatever Fedora did while trying to mount the partition on the defective drive, allowed me access to the partition's content. Overjoyed, I started frantically grabbing the data and copying it to my external drive. Everything seemed to be working well except that a minute or so into the copying process, my computer resumed the strange burst behavior it was exhibiting with the old XP, which also stopped the copying in its tracks.
After rebooting and trying again a number of times without any real success, I noticed that just as the strange behavior started, Windows was outputting an unusual message, notifying me that a delayed write action had failed on the defective drive. I thought about this for a while and I could not figure out why would anything need to be written to the drive during the copying process. I never actually figured that out but I did come up with an idea and a plan to solve the problem. I realized that reading from the drive seemed to be working just fine, until something attempted to write to it, at which point the strange behavior commenced. I realized that if I could make the drive read-only, perhaps the problem can be avoided and I can get my data off the drive. The only problem is that Windows does not support making a partition read-only. So off I went looking for freeware that might do the job.
Unfortunately I could not find such software (an idea for an open source project perhaps?), but I was able to locate a shareware by the name of HDGuard which among other things allows you to designate a partition read-only. I jumped through some hoops and managed to download their 30 day trial version. After a simple install, a bit of configuration and a couple of reboots I was finally able to get my files off that dreaded drive.
So to conclude:
Thank you Fedora, thank you Rodney Fletcher, thank you HDGuard, thank you TeraCopy (a great free program that replaces the dreaded Windows copy utility) and thank you Western Digital for having relatively long warranties and a relatively hassle free RMA service (and sorry for the unusually long rant!).
Saturday, July 5, 2008
New PluginWatcher extension release (v1.1)
The new version primarily adds the ability to customize PluginWatcher's UI while also introducing a number of changes to the core of the extension. In the UI department it now also offers a second panel, displaying the plugin activity expressed as a percentage of utilization. The biggest change, however, is in the way the extension calculates the plugin load on the system - that algorithm has now been refined and it should prove to be significantly more accurate. This release also addresses some of the packaging issues that were observed with the previous xpi; mainly it provides a much cleaner and smaller xpi file, containing only the files that are required by the extension.
I also plan on releasing version 1.2 of the extension soon, as I already have a number of ideas for possible improvements. If you care to try the new version, it can be downloaded here (since it is still in the sandbox, you will need a Mozilla add-ons account to install it). Feedback is as always welcome.
Tuesday, May 6, 2008
Spring cleaning
This is what my drive looks like after getting rid of the biggest space offenders:
The big gray block on the left (highlighted in white) is the post cleaning free space I have gained (approx. 65GB freed).
Get all the info here!
UPDATE:
I am not a MAC user but was made aware of a similar program for OSX called Disk Inventory X. You can find out about it here!
Hat tip: Lukas Blakk.
And of course we can't leave the Linux community behind... so if you are using a Linux distribution you can use a similar application called KDirStat, find out about it here!
Hat tip: James Boston.
Linux minefield and plugins
Thursday, April 24, 2008
The story of one Hotmail and a Blackberry
Open source to the rescue. After a bit of looking around I found this great little POP3 server proxy called FreePOPs. What this great little program does, is it allows you to retrieve your free web mail messages with any application or device that supports the POP protocol (including a Blackberry). The best part is that it works with most popular free web mail providers out of the box (and some less popular ones too) and it is extensible, so in theory support could be easily added for almost any service. It's also very light and very much in the background.
While this is an easy way to get your Hotmail messages on your Blackberry, it can also be used to get them in your Gmail inbox. Gmail's options include retrieving emails from a different account that supports POP3 access. The only downside with Gmail's POP retrieval is that you don't get to control how often it checks - which at times could mean as long as an hour between checks. Still, it sure beats paying for Hotmail Plus just to be able to forward your mail.
Pesky email problems like these are all too common, which is also why I'm posting this up in the hopes that this might be of some use to people out there looking for a similar solution.
You can find a download link for the program as well as more info right here.
PW Core/Extension Docs Up
I have also created draft support documents for both PW Core and the extension:
PW Core
PW Extension
As always, your feedback is appreciated!
UPDATE:
The article on PW Core has been generalized and moved to MDC. Find it here.
Also, thanks to Cesar, my extension went public on AMO. See link above for download page.
Friday, April 18, 2008
PW v1.0 and Final OSD700 note
Now I would like to thank the many people who have been a part of my journey and helped me along (in no particular order):
Dave (humph), Chris (ctyler), Robert (roc), Mark (mfinkle), Mike (shaver), Gijs, Armen (armenzg), Cesar, Andrew, Lukas (lsblakk) and Ted (for his extension making script -- really useful!!).
Thank you all and I hope I'm not forgetting anyone!
Wednesday, April 16, 2008
PW Extension v0.91 is out
- The extension can now be enabled/disabled directly from the status bar icon.
- A new popup notification appears above the status bar meter if a consistent high run time is detected.
- The extension now listens for the new "experimental-notify-plugin-call" topic name
Please note: the latest extension only works with the latest PW Core patch (v0.91).
Find the download link and installation instructions on the project wiki.
PATCH going "experimental"
Formerly known as 'notify-plugin-call', it is now named 'experimental-notify-plugin-call'. This change may seem small or insignificant but it actually makes a lot of sense, especially when you consider that the way the run time is currently determined and communicated is almost certain to change in future releases. This change will also mean a new version of the PW extension as it needs to be adjusted to the new topic, but the new version will also incorporate some improvements to the UI as well.
A number of people have also noted that in the performance test charts I have posted recently, the y-axis does not start at 0. Admittedly this was a bit of an oversight on my part, especially since when you do have the y-axis start at 0 my case for PW becomes much easier to make. I have therefore recreated the chart for the two tests I posted earlier - this time with the y-axis properly labeled:
Test 1
Test 2
Tuesday, April 15, 2008
What a day...
In addition to releasing the latest patch, I had also created a performance test that allows a user to time how long calls made from JavaScript to an exposed Actionscript function take. The idea behind this was to run the test on a fresh build and then run this same test on a build that includes my patch. By comparing the two, it should be possible to determine what sort of overhead my code creates.
Below are the latest 2 tests that I have run:
Here is the result from test run number 1
PW ON | PW OFF | |
Test 1 | 3135 | 3174 |
Test 2 | 3144 | 3156 |
Test 3 | 3139 | 3130 |
Test 4 | 3140 | 3175 |
Test 5 | 3161 | 3135 |
Test 6 | 3144 | 3153 |
Test 7 | 3156 | 3173 |
Test 8 | 3154 | 3139 |
Test 9 | 3146 | 3165 |
Test 10 | 3153 | 3154 |
Average | 3147.2 | 3155.4 |
And some screen shots:
Test run with PW OFF:
Test run with PW ON:
Test 1 data plotted on a bar graph:
Test number one was run on minefield 3.0pre, with PW OFF running first.
And here is the result from test run number 2
PW ON | PW OFF | |
Test 1 | 3176 | 3142 |
Test 2 | 3399 | 3160 |
Test 3 | 3197 | 3137 |
Test 4 | 3142 | 3159 |
Test 5 | 3155 | 3137 |
Test 6 | 3172 | 3141 |
Test 7 | 3152 | 3167 |
Test 8 | 3177 | 3148 |
Test 9 | 3166 | 3148 |
Test 10 | 3165 | 3162 |
Average | 3190.1 | 3150.1 |
And some more screen shots:
Test run with PW OFF:
Test run with PW ON:
Test 2 data plotted on a bar graph:
Test number two was also run on minefield 3.0pre, with PW ON running first.
What these runs suggest is that the overhead that is created by my code is so minute that the difference simply "drowns" in the noise. As Chris Tyler (ctyler) put it, that places it firmly "into [the] 'who cares' territory". I tend to agree!
Tuesday, April 1, 2008
Demo 2 and PW Extension v0.9 + screenshots
I have decided to remove the plugin recorder feature from the extension as it would not be of much use to most end users. Instead I'm considering making the recorder into its own extension, in case anyone would find that sort of thing useful. The recorder is in fact its own class, and should be easy enough to transplant into an existing extension skeleton; for now however, there are more immediate issues I must tend to, so this will be on the back burner for now.
A lot of the missing code can also be attributed to the old method by which PW made the decision to notify the user of a high runtime. The new method is much more compact - considering it consists only of about 45 lines of code vs. the old method totaling almost 120 lines. The major difference between the two methods is in the usefulness of the information each provides. The old method sampled the runtime values over a given period of time. If a runtime of 'x' or more was reported 'y' or more number of times, the system would notify the user that the plugin might be consuming too many resources. The current method by contrast samples the runtime values within a given period of time, totaling them and then calculating this as a percentage of total time (the sampling time). The new method makes away with most all of the somewhat clunky settings in the previous extension and it also allows for a far more informative graphical representation of the load compared to that of the old method.
So now for some screen shots of the new graphical components:
First what it looks like in its inactive state.
Active, with a plugin running.
Various flash content.
Youtube video playing.
Flash video loading.
Flash based game.
Can't forget the new and compact settings dialogue.
Now that the extension is taking shape for the 1.0 release and the core patch is inching closer to the tree, I'm going to concentrate on getting the performance testing under way. In the meantime feel free to try out the extension for yourself. The details are on the project wiki page: click here.
Thursday, March 20, 2008
First demo, new Plugin Recorder features and a new core patch
So I had my first demo yesterday, which turned out pretty well I think. Looking back, it does feel like I have come a long way, and doing the demo helped cement that thought; which strangely motivated me to start working on some of PW's more exotic frontiers - namely lack of OSX support and the somewhat shifty Unix compatibility. To that end I started debugging late last night (or early this morning) and managed to find where all that plugin fun happens. Also I owe Mike Shaver (shaver on IRC) a big thank you for helping me make sense of that hairy code. Now I feel closer than ever to being able to implement PW on all platforms uniformly.
Plugin Recorder v0.2:
There have also been some developments in the new Plugin Recorder feature of PW - I have implemented a new option that allows the user to control how the data gets written to the file. Admittedly however, this feature would not be of great use to the large majority of people who might otherwise have interest in using PW's notifications feature. Because of this I will be shifting most of my attention to creating some type of a graphical notification feature using some sort of an existing graphical library. If you happen to know of a good one that would fit this task, don't hesitate to tell me by leaving a comment!
For those of you interested in seeing, I have created a screen capture video of a flash plugin and its run time being charted in real time using LiveGraph. I am working on compositing the two videos together and will post a link here to the uploaded video when its done.
New Core Patch:
In my second review from Robert (roc on IRC), I was instructed to switch some of my code from a MACRO into a helper function. This new PW v0.81 core patch addresses this issue by introducing a new file to the mix - dubbed nsNotifyPluginCall.cpp. This was a slightly more challenging implementation compared with the MACRO solution I came up with initially, but it was a great learning experience - teaching me how to include new files in a patch and enriching my knowledge of the build system in general. I have not yet received any feedback for this patch, but I'm fairly confident Robert would be satisfied with the changes, as they do seem to address most all of the points raised in both his reviews (Update: new review has been posted by Robert, currently working on updating my code). The only point this patch fails to address is the performance testing which still needs to get done. After talking to Dave (humph) and Chris (ctyler) I think I have a more concrete plan as to how to go about this testing. The first thing I would need is to locate (or more likely create) a page that contains a loop with JS calls into a flash object. Once I have that I would need to create a script that opens Firefox, launches the plugin page and closes the browser when the loop is done. Calling this script with the "time" command, both when PW is present and when it is not, should give me an indication if my code affects performance in any significant way.
Monday, March 17, 2008
New patch and new extension feature to assist with benchmarking
The first thing I did was some major surgery on the C++ code me and Brandon wrote at the end of last semester in OSD600. That code has not changed much since then and although these new changes are still largely cosmetic by nature, I do hope they bring me closer to the final product and ultimately to having the code integrated into FF.
The second thing I had done was add a new feature to the PW extension. This new feature allows you to record a plugin's run time to a file. If I'm correct, this should make benchmark testing of various plugins much easier. I still have to add some functionality for this feature as it is pretty basic right now but I was still able to hook it up with liveGraph (open source real time charting software) to produce a real time graphical representation of the plugin's run time. I'm planning on posting a video depicting this, as soon as I find a good screen video capture software. For now you will have to enjoy this lovely screen shot:
In case you are wondering, this depicts an interactive flash object running for approximately 8 minutes.
If you would like to try the new extension you must also use the new 0.8 patch, otherwise this will not work. You can download the necessary files and read the installation instructions on my wiki page.
As always, your feedback is appreciated, and if you have a plugin that you would like tested leave a comment with the plugin's name and a URL to a page containing it.
Tuesday, March 4, 2008
0.7 is Out
Here is a summary for all the new changes and additions:
- Fixed notification bar bug where the user notifications would collect one on top of the other. The notification will now only appear if no other PW notifications are present.
- Added option to turn PW on and off in the context and Tools menu.
- Added a preference panel to the extension where a user can control various settings of PW.
- Users may turn PW on and off.
- Users may change the monitoring settings of PW to notify them when a certain run time has occurred, a certain number of times, within a certain period of time.
- Users may view the current run time directly in the preference panel.
Monday, February 18, 2008
PW extension release
Thursday, January 17, 2008
Releasing PW 0.4
Monday, January 14, 2008
Rebuilding firefox and starting OSD700
So regarding part a - I decided to rebuild minefield last night on my home desktop. I did this partially because I still have not been able to checkout an XPS laptop from ORI but perhaps primarily because I had recently upgraded my computer from 1GB to 3GB of ram and was curious to see how that might affect the build time. As some of you may recall, when I first tried building the source tree on this machine it took no less than 10 hours, so I was rather curious to see how much shorter the process will be with the new hardware. Unfortunately however, I got an error during compilation and therefore I can't report on any improvements for now. I will be trying again shortly though and will post here if you are curious.
And as far as part b goes - I have given it some thought and came up with the following list of things I would like to achieve for my 1.0 release:
- File a bug with my 0.3 patch and get some feedback for the code.
- Work on the code in accordance with the feedback I receive.
- Get the code to work on macs.
- Get the JS portion out of the browser and into a proper extension.
- Improve the heuristics of the front end extension.
- Provide more information about the plugin that is causing the issue.
- Provide a way to disable the plugin.
- Add code to the front end JS that will collect and display statistical information about plugin runtime.
- Do plugin benchmarking and publish the results.