In case you don’t want to waste a week trying to get windows update to work like I just did…

If you are trying to test uploading device drivers to windows update and you follow the documentation here https://msdn.microsoft.com/en-us/library/windows/hardware/br230770.aspx which tells you about the magic registry key HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\Test Drivers – use at own risk

Please kindly ignore it and instead read the documentation here

https://sysdev.microsoft.com/en-US/Hardware/member/ddc/HelpTesting.aspx

About the magic registry key:

“HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\DriverFlighting\Partner\” “TargetRing” with the value “Drivers”

The Cosmic Trigger Play

Charlie:  I’ve written myself into my screenplay

Donald: That’s kind of weird

Charlie Kaufman, Adaptation

Adapting Robert Anton Wilson’s  Cosmic Trigger was never going to be easy.  Cosmic Trigger isn’t a novel.  it doesn’t have a clear story running through it.  Rather it is the thoughts and reflections of a man who has experimented with causing intentional psychological change on himself – and how all hist past experiences – and all the past roles he played – built up into one mind blowing, conciousness expanding experience – and the ramifications it left behind.  It is both a guide to experimenting with your notions of self and a warning about what might happen should you be willing to try.

It doesn’t leap out at you and say ‘Put me on the stage’

But Director Daisy Campbell isn’t one to back down from an insane challenge.  She has directed the insanely long Warp and put on Shakespear in Pidgen.  Oh and she was conceived backstage at her father Ken Campbell’s adaptation of Robert Anton Wilson’s Illuminatus! (which is a book which absolutely demands to be put on a stage… but which also suggests rather forcefully that the stage ought to be so big that if all you had was all the world, you would likely to be slightly underwhelmed…)

I’m a big Robert Anton Wilson fan.  I’ve reread Illuminatus and Cosmic Trigger many many times.  I reread both again earlier this year to make sure I was primed and ready.  And on the 22nd of November (51 years to the day since the assaination of Kennedy and a day short of being 37 years since Illuminatus! opened) I was in Liverpool to see the cosmic trigger being pulled.

 The Venue was the Camp and Furness – a warehouse converted into an impossibly cool and trendy arts venue of the sort I love but never manage to feel quite at home in (because I am neither cool nor trendy, and not especially impossible).  I was surrounded by one of my tribes – fellow oddballs ranging from teenagers through to the elderly – but quite obviously younger at heart.  People who shared my love for RAW’s take on reality.  the theatre space was makeshift, but the production values were high.  intermission comments from the surrounding throng praised the visuals used to make the sets – and the props, and costumes, while basic, were also astonishingly effective at changing a bare white room into a mutitude of locations across time and space.

Were I to find criticisms (and a fair and honest review requires that I do) I would mention the sound – which was always going to be a problem in a venue with accoustics not designed for the purpose and that much of the play was performed sitting low down on the stage – which was a slight issue in a venue with stalls which were not on a slanted floor, and because the tallest man in the universe happened to choose to sit in front of me.  But these were minor – they in no way spoiled the fun (though I did wake up the next mornind with an achins shoulder, having had to convolve myself into awkward positions to see the action!)

The play itself follows the book – divesting some of the autbiographical details of RAW’s childhood and putting some of RAWs words into the mouths of others to avoid excessive monologuing.  But I think it is fair to say it also expands upon the book.  It opens with Oliver Senton – perfectly channeling RAW – breaking down the forth wall – and that wall is never rebuilt.

When Cosmic Trigger was written its audience were presumed to have read Illuminatus.  That is less reasonable for an audience of a play decades later, and so scenes from the original Illuminatus! are interspersed to convey key events.  But these scenes break down into backstage scenes from the production – with Josh Darcy taking the role of Ken Campbell.

Darcy probably was Ken Campbell in another life (either that or he’s a remarkably talented mimic who deserves plaudits.  In any event, the voice, likeness and gait are creepily accurate)

 At this point things become dangerously close to being self-indulgant.  A play about her father’s play – not an adaptation standing on it’s own merits.  And this was the danger of the Comsic Trigger play – it has been sold on the basis of being “What Daisy Cambpell did instead of doing Illuminatus”.  And had this been the end of things, it would have been a fine enough production.  Thankfully they were just getting started.

Cosmic Trigger hinges around when after a moment of mental breakdown (or possibly supreme clarity) Robert Anton Wilson begins to believe he is receiving psychic messages from extra-terrestrials from the dog star Sirius.  As this occurs in the world of Cosmic Trigger, the fourth wall breaks down with Not just RAW but Senton (or Senton playing the Character of Senton) questioning who he is, and asking Ken Campbell for advice (which fails to arrive, since Campbell is fully aware that he is a character in Daisy Campbell’s play…  a play in which Daisy Campbell has cast an actress to play the character of herself for this very moment) – Not only has the forth wall fallen, they have moved into strange and new dimensions and found new (and quite possibly non-euclidean) walls to break down.  It’s a metaphor for the new world in RAW’s head and it works well.

But Cosmic Trigger isn’t just about what RAW learns from sirius – the tragic and hearbreakign ending revolves around what RAW learned from his daughter.  And to this the Cosmic Trigger play adds what Ken Campbell’s Daughter learned from her father about drama and heroism.

But ignoring my interpretations, what remains in crazy, forth wall breakign madness involving sirians, an accoridan playing singing Alistair Crowley, Sex, Nudity, Drugs, A giant inflatable golden apple, pantomime, a could of sence which had a rather odd (and I’ve no idea how intentional) How I Met Your Mother vibe about them, Philosophy and a musical number about Timothy Leary’s 8 Circuit model of conciousness.

I did wonder “Would this be even vaugly comrihensible to someone who had never read Cosmic Trigger?” – but thankfully I found myself sitting two seats away from someone who had neve read Cosmic Trigger, and she confirmed it was totally understandable and that she was having a blast.

I spoke to Daisy briefly the day after (and I will write more about the Cosmic Trigger Confrestival later) and all I wanted to do was thank her.  Not just for putting on a production which far exceeded my hopes, but also – as a fan of the original material –  for not fucking it up.

I think there can be no higher praise!

It’s mving to London.  Go and see it.  Highly Highly Recommended.

This is why you use git

I wanted distributed version control before their was distributed version control.  When it finally became practical, I looked at the options, and chose Mercurial – because murcurial clearly works like a distributed version control system ought to, while git was… lets say idiosyncratic (because ‘weird looking’ would be rude)

Recently (when we open sourced XenServer) I found myself having to get to grips with git and github.  Over the last year or two I’ve begun to understand why git turns out to be better in many respects for real world version control usecases (except for managing patch queues on Windows – hg still wins there)

Today gave me an example of ‘one of those times’…

My problem was:

I had submitted a patch to a public repository – but it turned out to have problems, and for reasons of time constraints I had to revert it.  Since this was all done in github, I used the very handy github revert feature.  The github repository then progressed somewhat without me.

Meanwhile, i fixed the problems in a local private repo.  Which didn’t pull in the revert from upstream.  So I ended up with branches looking like

Upstream: —–Patch A—-Changes—-Revert Patch A—-More Changes

Local:         —–Patch A—-Fixes for Patch A—-More fixes for Patch A

What I wanted to submit to upstream was Patch A again, with all fixes, rebased to work on top of the existing upstream… all as one big patch

How I managed this was:

Clone the upstream branch into my personal github repository

create a pull request against my clones upstream branch which reverted ‘Revert Patch A’ – and merge it.  Giving

Personal Upstream : —–Patch A—-Changes—-Revert Patch A—-More Changes——-Revert “Revert Patch A”

I then fetched this into my local git repo

I rebased my previous local branch against this branch, leaving me with a branch containing

—–Patch A—-Changes—-Revert Patch A—-More Changes——-Revert “Revert Patch A” —–Fixes for Patch A—-More fixes for Patch A

And finally another interactive rebase let me squash things down to

—–Patch A—-Changes—-Revert Patch A—-More Changes——-Patch A (2nd attempt)

 

This was then sent back up to github so I could issue a pull request to merge to upstream.

 

This certainly isn’t a workflow you would see in a non-distributed vcs – but it also isn’t the sort of workflow you would expect to see with mercurial (which has more of a policy of not changing history – rather than trusting you and giving you the tools to perform patch management)

After one week of Android Wear

I decided right away to pick up an Android Wear watch – I’ve been interested in wearables since I bought a fitbit a year or so ago, and Android Wear seemed to be the next logical step.  The watch I bought was the Samsung Gear Live, but I suspect most of my comments are likely to be relevant for most of Android Wear.  So, after a week of playing with it, here are my initial thoughts:

Battery Life:  I take of my watch every evening, so it has been no problem with plugging it into a charger.  I suspect I might occasionally forget, so I’m going to possibly need a backup watch for those days.  The battery seems to easily last through my waking hours, but I’m a bit concerned about travelling with the watch as, when flying to the west cost, I’ve had days bordering on 24 hours long – which I’m not sure it will cope with.

Maps: Many people have identified the directions feature as being one of the watch’s best.  And they are right – a brief buzz on your arm every time you need tu turn a corner is much less obtrusive than having to hold a phone out in front of you.  But it isn’t suitable for driving, which is a shame, because that’s what the app defaults to.  I haven’t yet figured out how to get public transport directions on the watch  -which is a big shame, because live bus times (along with directions to walk to the nearest bus stop) would be a big win.

“OK Google” : the voice recognition is quite impressive – and certainly up to sending text messages and (using the Bunting app) tweets.  However, voice control of the watch and phone leaves a little something to be desired.  To start with, you’re only ever going to say “OK Google” when showing the watch off, or in a car or your own home – so it is really best for hands free usage – you don’t particularly want to have to press any buttons on the watch to do anything.  It is rather good for starting playing music (“OK Google, play My Life Story” gets my phone playing mixes of Jake Shillingford’s finest), but not able to pause or skip tracks using voice – which would be handy when driving.  It’s also not great for launching apps – I use an application called Dog Catcher for playing podcasts – and when I ask my watch to launch it, it opens the Play Store page for the free version, rather than noticing I have an app with that name installed on my phone.

Range:  I’ve actually been quite impressed with how far away i can get from my phone, and still have the watch working.  This has two advantages:  Most of the time, I leave my phone on my desk charging when i’m at work.  The range means I can get notifications from it in nearby meetings rooms and the office kitchen which is handy.  The range also means I can contact my phone from anywhere in my house… should I lose my phone, a quick ‘OK Google, play music’ will help me track it down.

Apps: I’ve tried a few, so far, Bunting, a neat tool for working with twitter, and Evernote are my two favourites.  IFTTT lets you add buttons to trigger tasks – I’ve added a few for putting my phone’s ringer onto silent, for instance.  But I’m sure more IFTTT functionality would make the watch more useful.  App-wise, there is lots of scope for more development here.

Notifications:  You probably want to cut down the number of notifications you receive to your phone, if you use an Android Wear watch.  But that’s a god thing.  It is quite smart at filtering out notifications you don’t need.  Over all, notifications coming to the watch is the most important part of the android wear experience, and it is probably the place app developers should spend their time improving their apps and integrating with Wear.

Fitness features:  The step tracker just works, and lets you set a daily goal.  Fine, but nothing special.  The heart rate monitor requires you to stand still while you use it – so not great for tracking how much effort you should be spending when running or walking.

The watch faces:  There are a selection of faces to choose from, and they are fine.  But there isn’t yet a face which displays an analogue clock with day and date on the screen.  I believe it is possible to write new faces, so I’m waiting for one to turn up which meets my specifications.  As far as moving between low power and high visibility modes goes, the watch is quite good at getting it right, but not perfect.  Since you need to be in high visibility mode to use voice commands, this is a bit of a distraction when driving.  The visibility of the watch screen in the sun isn’t great, but despite some sunny days, I haven’t needed to cup my hand over the screen to tell the time from an analogue watch face.

Media Control:  This was the biggest surprise when it came to a use I hadn’t thought of for the Wear.  I’m a big user of netflix with my chomecast at home, and of DogCatcher for podcasts in my car.  Both of these apps put up notifications when they are playing, to allow you minimal control… and in both cases these controls turn up on the watch face.  So should I want to pause a track or a film, I just tap my watch – no need to dig around for my phone.  While these is scope to improve these features further, they are already the functionality i use the most.

My conclusion is:  The watch isn’t perfect – and in a year or two, if the wearables sector takes off, we’ll probably have much better models which are more suited to day to day use.  That said, it meets my needs, and exceeds my expectations so far.  Most of the downsides I’ve mentioned are software issues, so I expect the watch on my arm to become more powerful as time progresses.  We are still in an early adopter phase for wearables, but at this point you can see a viable consumer product peeping out from the future.

Pull My Trigger

There were two things that stopped me from seeing the original performance of Ken Campbell’s adaptation of Robert Anton Wilson and Bob Shea’s Illuminatus trilogy:

The first reason I didn’t see the original adaptation was, at the time Illuminatus! was performed, I hadn’t yet come across the books, and didn’t know how much I would fall in love with them, and the worldview that created them.  Indeed, it almost felt like there was a conspiracy both introducing me to Illuminatus, and stopping me getting my hands on a copy.  The story of how I finally managed to get my grubby mits on a copy of Illuminatus is a complicated one, involving roleplaying games, two IRA bombs, a gorilla bookseller, almost dying of heat stroke minutes away from Disneyland, a chance discovery on the wrong bookshelf and counting sheep (and in the process turning them into sweet, sweet, money), but not one I choose to go into right now.  Suffice to say that along with “Godel, Escher, Bach” and “Practical Computer Programming for the BBC Microcomputer and Acorn Atom” it is one of my Desert Island books (I’ve never understood desert island disks – I have lots of music trapped in my head, but I can’t easily reread books without actually having them to hand)

The second reason I didn’t see the original adaptation was that I hadn’t been born.

Yet despite the lack of me being in the audience, Illuminatus was a groundbreaking production, and a key stepping stone in the careers of many people who have gone on to become well known and loved faces in theatre and on screen.  I have often wished I had been there.  But such things are not to be.

However…

Another of my Desert Island Books is Robert Anton Wilson’s ‘Cosmic Trigger’ a combination of autobiography, philosophical discussion and general introduction to the world Robert Anton Wilson inhabited as he wrote Illuminatus.  It is simultaneously mind expanding, laugh out loud funny and poignant.

And, word came to me from the doggiez from sirius (or possibly from a webpage…) that someone has been fool enough to consider putting on a stage adaptation of Cosmic Trigger.  And also that the particular someone is Daisy Eris Campbell, Ken Campbell’s daughter.  You can imagine my ears perking up at this.  Also, Alan Moore is going to be the voice of FUCKUP, which is rather cool in and of itself.

Cosmic trigger is going to be crowdfunded.  I’ve already made a small contribution, but the crowdfunding proper begins tonight (quite why the 23/5 was chosen as the launch date for the crowdfunding campaign is anybody’s guess…)

And so I shall tonight be making my way down to a small and exclusive gathering where similarly discordant people will be meeting, and almost certainly pontificating (literally).  I am told my cosmic trigger will be pulled.  The launch party is a sell out, but should you wish to be not only a patron of the arts but also a genuine official pope, you may want to head over to http://cosmictriggerplay.com/ tonight and give them all of your money.

Opening Up XenServer – Reworking XenIface.sys

When we first began to discuss the specifics of open sourcing XenServer I had to raise my hand and say “No”.  Not because I didn’t want the software to be opened up, but because I knew that one of the modules I look after (XenIface.sys – the XenServer Windows PV Interface driver) had code in it which we wouldn’t be allowed to ship under an open source licence (we could ship the bainaries – we could even give away the source code, but we couldn’t let other people give that code away).  We had to come up with a new plan.  And the plan that was agreed on was the one I suggested:

The interesting bits of XenIface are in files which we unambiguously own.  But there is no chance we will ever get the right to give the rest away.  Nor is there any chance of us having the time to rewrite that code by the date XenServer goes open source.  So what we can do is just put the files we own out into the world, and rewrite the rest in our own time.

This was a dangerous plan.  Specifically because I know how corporations work, and once the buzz of hitting the ‘We’ve open sourced everything’ has passed, people will want new features, not just rewrites of perfectly functional code.  It would be too easy for things to get missed.

The last couple of weeks have seen a lot of excitement.  We opened up (most of) the code.  The XenServer team all gathered in a kitchen at work to drink Champagne and celebrate.  There was also the release of Citrix XenServer 6.2 accompanying the open sourcing.  And (on the Windows team at least) we started our new development processes with all the code changes happening out in the open, going via GitHub.

But behind the scenes, I’ve been getting some programming done too.  Specifically, I managed to find the time (quite where from I’m not sure) to rework XenIface, strip it of the code we don’t own and get it working again.  The way I did this was quite simple:  I ripped the bottom end of the XenVif driver, pulled out all the networking and providing-PDOs-for-NDIS-drivers-to-attach-to code, and then plumbed in the remaining parts of XenIface.

The code isn’t quite ready for public consumption yet but:

It installs, enables, disables and uninstalls nicely

It passes our dev tests (which we use to ensure the WMI and IOCTL interfaces don’t change)

It has passes the HCK successfully (once I found the filter for something I was pretty sure was an HCK bug and persuaded it to install)

 

This is all, primarily, testament to the quality of the XenVif code which was so easy to pull apart and put into the XenIface driver.

Before we put it out in the world, I just want to prove that our internal system testing won’t show up any regressions – but I think we’re likely to be safe, as the changes to the code which provide the functionality have been very minor.

I wasn’t really expecting to see this code finished for another month or two (and was quite scared it would never happen at all).  Instead it looks like it’ll be out the door well ahead of schedule.  And once XenIface is in place, thats the complete driver set needed to let you run the Guest Agent and have the full PV tools optimised Windows guest experience.

 

It would just be nice if it was easy to install.

 

The good news there is that the installer package – which is the final missing part of the PV tools is also close to being releasable.  We didn’t ship that because we didn’t have confidence that the click through licence it displays was the right thing to display.  Well, I’ve finally had word back from legal about what we should be displaying and so there is only a bit of plumbing to do before that can be put up in all of its glory too.

Replacing RSS

The death of Google Reader has made it clear to me that there is a gap in the market.

No, not a gap for another RSS feed reader, that has been well and truly satisfied by the mass of new contenders for the previously unloved RSS Reader throne.

The gap is a gap for control over your information.

You see, the reason we have to assume Google have dropped Reader is that they think Google+ is where all your reading should happen.  Facebook is much the same.  Like reader it is both a reading and a writing platform.  And when you develop a platform you can read and write to, you have very little incentive to keep it open so that other people can read from it, or write to it elsewhere.

Oddly, we tend to try to resolve this by imagining new read/write platforms that emulate Facebook and Google+, but are more open.  And any such system is destined to fail because of network effects.  Or friends and families are already using Facebook, so if we want to read what they have to say, and be read by them, then we have to go to Facebook.

But what if we decided to break the link between reading and writing?

Most of my Facebook posts are actually just copied from Twitter.  But Twitter is Read/Write,just like Facebook (and becoming more so every day).  Also, I don’t actually care where people read my posts – I just care that it is available to them to read.  But it would be better if it was also available to the world to read in other, better, more open ways.  Ways which are under the control of the author, not the reader provider.

Now, the way we used to do this was via blogs.  And blogs are a good thing – but I suspect blogging is to some extent dying, and the loss of Reader might, potentially hasten this demise.

My suggestion is that someone produce a write only microblogging, blogging, photo and video sharing platform.  The business model is simple – you charge people a recurring subscription for their account, and you ensure they are in control of their data.  But you make it easy for them to share the data they’ve provided.  You make the system automatically be able to post to Facebook, Twitter, Linked In, Pinterest, whatever network you want.  You also make sure it provides RSS feeds so that people who want to aggregate content .  And you make sure it offers an ‘email people’ option, so you can push your content to friends and family who haven’t yet grasped what the internets are for.  You probably also want to allow people to read your content if they come to your site directly.  You could also provide the ability to be better at deciding who gets to see what content – by letting the publishing platform understand how private your various accounts on different social networking sites are.

This would never be popular.  Facebook and its kin are good enough for most people.  But every time they betray their users by tightening their locking, or tilting things further in favour of the advertisers, a social publishing platform would make it easier for people to begin to opt out.  And it would mean more content was available outside the gated walls of the big social networks, which would be good for those of us who prefer more powerful and personalised ways of accessing interesting things to read.

What I Do At Work

Normally I don’t post about what I do at work.  This isn’t due to it being any sort of state secret, it’s just that I want to try my best to avoid giving any corporate secrets away or otherwise upsetting the hand that feeds me.

However, things have changed.

As of today (well, actually as of a week or so ago… but we announced it today, so today is what counts) the corporate secrets we had are somewhat less secret.  Because Citrix have released XenServer as open source software.

This is both a huge deal, and not a huge deal at the same time.

Let me try to explain:

Xen is a hypervisor.  And Xen has always been open source.  As of a month or two ago Citrix passed the Xen hypervisor project management over to the Linux foundation.  Why?  Well mainly to get rid of the accusation that Citrix owned Xen and could take away their ball at any time.  This was a good thing – it wasn’t about making the code more open (it was already GPLed up to its eyeballs), it was about making the development process and governance more open.

But that’s in the past, and that isn’t what I’m talking about today.  Today I’m talking about XenServer being open sourced.

Now, XenServer is, in effect, a number of things.  Specifically its the brand of Xen – and the associated bits of software – that Citrix have sold and supported ever since they bought XenSource.  But thats all a bit unclear…

So lets consider XenServer the software

As of a week ago it consisted of:

Xen – the hypervisor.  Already open source and part of the Linux Foundation

XCP – which is most of the other tools that you need to actually use Xen.  This was also all handed over to the linux foundation.

Some privately owned bits of  code – including the Windows guest PV Drivers and tools.

 

And what has happened today is that we have rethought what XenServer is.  XenServer is now

“An open source distribution of Xen and all the tools needed to make Xen useful. “

So XenServer is to Xen what Ubuntu is to the Linux Kernel.

And all the tools that are part of XenServer have also been turned into their own open source projects.  You’ll find them on GitHub.  (Actually, this is a bit of a lie.  There are things that haven’t made it to github yet – the xeniface.sys windows PV driver, for instance, needs to have a chunk of code rewritten before we can open it up under a BSD licence.  But everything will get there. Eventually.  Citrix have been kind enough to dedicate a lot of manpower to let us do this)

You’ll soon be able to download and use a free, fully working version of XenServer.  No strings attached.

Meanwhile Citrix will have their own product plans based around this fully open XenServer model.

So thats the story – a free, enterprise grade, trusted virtualization solution that you can contribute to, based entirely on open source technologies, including the Xen hypervisor.  Thats a huge deal.  But most of it was actually already free – what has changed is how we develop it inside Citrix.  Thats a less big deal for you, but it has been quite a big deal for me and for my day job:

So.  What do I do at work all day?

I’m part of the Windows team for XenServer

In fact I’m the Dev Lead – which means I sit in more meetings than I’d like, worry more about bug numbers that I would like, and get involved in lots of discussions about process… which I actually do like… because I’m weird like that. I code and fix bugs.  And I write new bugs.  I scrummaster a little on the side.

Recently I’ve been handling our open sourcing efforts.  Writing our ReadMes and Maintainers files.  Moving our code out of Mercurial and into Git.  Changing out build system to cope with this.  Negotiating which licence we’ll be using.  And attending meetings.  Lots of meetings.

What the Windows team do is write the tools and PV drivers that you install on Windows guests running under XenServer.  And as of now all of these tools are open (except xeniface, like I mentioned above, and the installer, because we have some confusion as to what exactly should go in a clickthrough licence.).

We also do lots of the things that open source code alone can’t easily do, like sign drivers and get them to pass Microsoft’s logo tests and ensure our platforms are supported by Microsoft.

And this is what we’re going to carry on doing.  Windows 8.1 and 2012 r2 are looming on the horizon and we have some things we need to massage into shape.  But now everything we do you’ll be able to see on GitHub, download from XenServer.org and hear about on mailing lists (which haven’t actually arrived today – but word is they’ll be here soon)

Now, there are some caveats:  These new projects (Windows projects included) are not part of the Linux Foundation.  Just as some parts of Ubuntu are not part of the Linux Kernel.  And these new projects are not things we are used to maintaining as open source projects.  So we’re likely to make some mistakes (and quite possibly some enemies) as we make this adjustment to how we work.  But I’m planning on writing about it as much as I can in order to do my best to make sure we show as much of the working as possible.  I don’t know how easy it will be for us to take contributions, especially in the short term (but we’ll do our best).   Part of my contribution to this will be writing about what is going on – so you can see there is stuff going on.

This has been a lot of work and there is a lot more work to do in the coming days, weeks, months and years – but hopefully the end result will make using XenServer a lot easier, will make working with XenServer (both the product its interfaces and the people behind it) a lot easier, and will encourage more people to give it a go (and then, having fallen in love with it, to buy paid support and pay my salary)

As for me?  Well, that new other half of xeniface still needs to be rewritten.

Technology Isn’t For Me Any More

Yesterday, I was sitting with my nephew and niece as they were playing with their iPads.  I wasn’t so shocked at the skill and dexterity with which they were manipulating their games (indeed, the 3 year old was barely able to play Sonic the Hedgehog – pah, when I was her age I… hadn’t ever seen or touched any form of computing device.  I didn’t even have teletext or a Nintendo game and watch.) as I was shocked by the fact that to them the iPad will have always been the least technically advanced computers have ever been.

To the generation born only two or three years ago, will the iPad will be remembered in the same way as we remember the ZX81?  Perhaps – although it might be better to compare the iPad to the more well established consumer technologies of my youth:  the iPad will be remembered by them in the same way the massive, fake wood paneled black and white CRT TV set (which later became my BBC B’s monitor) is remembered by me in the age of PVRs, HD, Netflix and Youtube.

Talking of Youtube, apparently the youth of today are using it to show each other what they bought on trips to shopping malls.  Which seems boring and asinine until you think more about what is happening.  In my youth, you established your social status by constantly, hour after hour, hanging around with your friends and engaging in a million small acts of oneupmanship – or in my case, generally ignoring your friends, fiddling with computers, and praying that something like the internet would come along to ensure you never had to have any real social contact with anyone if you didn’t want to.  In the new world, they are doing the same – but they are trying to one-up the world.  Youtube has become the school yard, people are jockeying for social status and celebrity on a global scale.

And this isn’t abnormal – this is totally normal to them.  Their peer-reviewed value is now not down to who they got off with at the school disco or where they sit during assembly, but how many people liked their new profile picture.  And as they grow up and take more influential roles in society (and thats only ten or so years away folks – I won’t even be close to retiring – barring a lottery win or decent set of share options) these attitudes are what are will be shaping our world and our cultural currency.  Even for someone like me who has lived their life online as much as possible, the culture shock will be crippling.  I probably need to quickly invent a virtual lawn so that I can attempt to keep those kids off it.

But there are upsides too.

The new users of technology are not going to be satisfied with the iPads and iPhones of today.  They are going to be confused about why the rest of the world doesn’t work like the iPad does.  Why are TV remotes so clunky? Why do I actually have to be present at a particular place for my lessons, lectures and job?  Driving is hard – why I can’t I tell the car where to go and let it take me?  Shouldn’t Tesco know what shopping I’ve used and refilled my fridge while I’m at work? Unpacking is so irritating!  And probably lots of other things too – things I’m so used to that I can’t conceive of being any different.  I’m past the point where I’m going to be driving new technology (unless I happen to develop it), but the coming consumers will be looking at the world with fresh, already bored by the amazing futuristic world we live  in, eyes.

As for me, while my niece – thanks to television and computer games – is already better than me at speaking spanish, I can still outplay her at Sonic the Hedgehog – at least for a few more months.  After that I’m a relic – a walking dinosaur who will be harking back to the days of loading Elite from cassette tape, when music came on little shiny disks and when phones were mainly about talking to people.  She will be creating the world, and, at best, I’ll be responsible for implementing her demands until the government her generation elects decides it’ll be more cost effective to ship me off to Dignitas.

But the world will keep on changing.  And the future she creates will be amazing.

 

A debugging war story

The bug has been around for most of the last year.  It’s intermittent and a pain to replicate.  We hadn’t heard anything about it from our customers, but our test system threw the errors up when we performed our nightly runs.  But the failures were all slightly different.  And different tests were failing each time.

All we knew were we were blue-screening, and that the problem was something to do with memory corruption.

The first thing to do was look at the crash dumps.  And the good news was that our drivers weren’t on the stack.  The bad news was that more and more testing showed the problem only occurred when our drivers were loaded.  You see, the problem was clearly a memory corruption – but the crash wasn’t happening at the time memory was being corrupted – no, the crash was happening when the memory got freed. You couldn’t tell who corrupted the memory, just that it got corrupted.

We tried driver verifier.  As soon as we put verifier to work on the driver we suspected, all the problems went away.

We did find that close to where the corruptions occured there was often a memory pool allocated with the tag ‘HAL’ – what was interesting about this pool, which looked like being some sort of mapping between addresses and page frame numbers, was that it seemed to have one entry too many – it had overflowed the space allocated for it.  The good news is it wasn’t one of our pools.  The bad news – I was beginning to suspect it was something like a double free of memory which caused this situation to arise.

Because we thought our driver might be causing this, we added all the instrumentation in the world to its memory allocations and frees.  But this didn’t show anything up.  The driver seemed to be working perfectly.

We were close to giving up.

One of our test engineers went through the test logs, and came up with a set of situations most likely to cause the problem.  With a bit of effort he made a reproduction of the bug that could happen in about an hour – much better than the six hour repro we had earlier.  One of the things he found was that the issue mainly happened on Windows 2008 Sp2 32 bit.

We then wen’t through ruling out any number of potential hypotheses.  Everythign from ‘Was a DVD in the drive at the time?’ to ‘Does it only happen at on machines with 2 CPUs’.  Once we had ruled out the impossible, whatever reamined, however unlikely was sure to be the cause.

Unfortunately, we ended up with the same suspicious driver.  And the same lack of clues.

Not knowing where else to look, I tried reproducing the reproduction on a checked build of 2008 sp2.  I didn’t hold out much hope.  We frequently use checked builds in developing our code, and this issue looked like being timing specific – the checked build was going to play havoc with the timing.

I installed the drivers, rebooted, and:

Assertion failed: RaidIsRegionInitialized

OK.  great.  What now?  Google was our friend.  Well, almost.  We found two results.  One was an MSDN page which didn’t mention anything about this.  The other wasn’t clear but had a few lines of hope

You may need to call GetUncachedExtension, even if you’re not going to use it. IIRC, on Win7 Storport would allocate the DMA adapter object during the GetUncachedExtension context. Your adapter likely doesn’t have any DMA restrictions, so Storport probably doesn’t really need the DMA adapter object, which is why everything works without the call.”

http://lists.openfabrics.org/pipermail/nvmewin/2012-March/000075.html

And, as it turned out, we did.  We did need to call GetUncachedExtension, even though there was no reason for us to do so.

One line fixed our storport driver, removed the bugs, fixed everything.

A year of irritating, intermittent, bluescreens gone.  And a good reason to help us understand what, roughly, was happening:  Microsoft Windows was freeing memory which we had never asked it to allocate.  More or less a double free.

Its astounding how often my job ultimately comes down to being a Google Monkey.  But there was a lot of work to lead us to Google.  And some bad luck too – we used checked builds a lot, but – it turns out – not the 2k8 checked build, which was the one that had the assertion.  We only used that this time because 2k8 was part of the repro we found.

But figuring this out is something that our team (and it was absolutely a team effort) can be proud of.

Today is a good day to code.

© Ben.Cha.lmers.co.uk
CyberChimps