Fixing a broken windows installation

I recently had a rather sick server that was exhibiting all sorts of weird behaviour. Applications pools under IIS were shutting down as soon as the site was hit. All sorts of weird stuff was happening. Event logs were providing nothing useful. Even trying to install IIS diagnosis tools failed.

Clearly a very sick machine.

Diagnosis

One of the challenges was what to trust. Clearly there were some underlying issues with the operating system. Once you go down that rabbit hole, where do you stop? Is the event log still working?

Where do you start?

I had the following info:

  1. A web application that was working 6 hours before was now failing, without any useful errors in the event log. There was an exit code but I couldn’t find any info.
  2. Diagnosis tools were failing to install
  3. A colleague was reporting that some apps wouldn’t run

My best guess was that some of the operating system was corrupted in some way.

Solution!

In my extensive research (googling frantically) on this, I came across System File Checker. This runs through all system files and finds any files that might be corrupt.
I also found this rather helpful link that covers how to read the log files.

Resolution

The scan indicated an issue with a specific dll. I passed this onto a colleague who was able to fix the issue by uninstalling and re-installing windows updates. It’s a great tool to add to the toolbox.

The 

System File Checker

System File Checker

Welcome to the nightmare factory

In my earlier post I called software development the dream factory.

Unfortunately the very things that make software the stuff of dreams can also create nightmares.

World without rules

Once you’ve started to write some software, you are setting up rules for your new world.

Those rules define what you can or can do. Once they are defined, it’s often very hard to change them.

There lies the problem. Software is so unbounded by rules that inevitably people make the wrong decisions and are then locked into those decisions.

Once you have created your world you have to live in it. You must live with all the decisions you’ve made.

Looking into the future

Software changes so rapidly that it becomes a challenge to choose tools and techniques that will stand the test of time. Today’s best practice becomes tomorrow’s worst practice.

I recall when bitshifting was a clever optimisation. I was there when winforms was the best way to build desktop applications. I saw service locator go from being a best practice to a worst practice, replaced by IoC containers.

Right now, if you wanted to build a SPA, which javascript framework would you choose? How many of the current favourites will still be in use and being maintained just 2 years from now?

Imbalance

    One of the problems with software is that is it really, really flexible … until it isn’t. One moment you are defining the rules, then you are bound by the rules. Depending on the choices made up front, some of the flexibility might remain.

    Imagine for a moment if a software project were building a bridge over a canyon (I know it’s an overused example). Some of the things that might be completely impossible in the real world are easy, but things that easy in the real world might be close to impossible, depending entirely on the decisions made earlier. For example, it might easy to move the bridge 200m down the canyon, but impossible to add a new coat of paint.

    This is terribly confusing for consumers of the software as the rules aren’t consistent. In the last ‘bridge’ they requisitioned, moving the bridge was hard but painting was easy, why is it so hard this time?

    Welcome to the nightmare factory

    The dream factory also creates nightmares. There are no rules. You are in full control.
    You are going to make the wrong decisions with long term consequences.
    Welcome to the nightmare factory, enjoy your stay 1.

    1 On the bright side, not all dreams turn to nightmares