Monday, 17th January 2005

January 17th, 2005

Bah. I’m ill. I’ve had a headache for the past day or so (no, I’ve not had much coffee – I’ve been keeping it to a couple of cups per day so far this year) and a slightly runny nose. So meh.

Let’s see, try to keep this up to date with small installments. Today I spent some time at home sleeping, made a few config changes at work from my armchair, and played with the beta of VMware to get a devel FC3 environment having given up on waiting for it to install under bochs (RedHat: please please please offer a “minimal install” option in a future release. I guess a bug report is necessary, I just want a couple of hundred megs of environment). I need to play with rawhide stuff and have a box that I can do kernel debugging on – a virtual machine seems to be the best option for FC until either this old devbox can be made to take SDRAM (enough to actually run an FC) or I get around to buying an Apple MiniMac (which hopefully will happen) so I can use this desktop for development stuff. I am willing to consider using VMware as an option – after all, I use closed source proprietary hardware so using their software is only an equivalent. The kernel sources are open.

Air Canada cancelled my booking, because I booked tickets on the 31st of December (New Year’s Eve) and elected to collect from a travel agent (as opposed to on the day at the airport or whatever the other entailed) but was given until the very next day to collect. It just so happens that New Year’s Day is a public holiday in both Canada and the UK (no, we don’t have the exact same public holidays btw – I’ve looked them up, they do have federal holidays for things like Thanksgiving, but earlier than the USians) so, Air Canada, this would be an obvious glaring bug in your website software. Please fix it. Alternatively, you could elect to respond to my customer service email rather than giving me a coronary when I called to confirm the weirdness with the booking status on the website (it was showing up, but nothing was showing for ticket status and the site generated an error code to accompany it) only to be told the booking had been “auto-cancelled”. Could you please not go cancelling my bookings without telling me you’ve done that? Thanks. I’ve now paid them again and been told I was never actually charged the first time – but I’ve checked with Barclays and will also have any double payments immediately cancelled from the account. Despite the obviously British sounding phone system at Air Canada UK, I’m not entirely convinced I wasn’t ultimately speaking to someone in a call centre in India – not that it bothered me too much since they did work with me on both occasions that I called them (the second time to reconfirm the confirmation and to get another copy of the second confirmation mailed out to me just to be certain). Note that, despite this, I am generally happy with the airline and their prices seem quite reasonable – just under 250GBP for a return flight is not bad at all.

I’m reading Designing Embedded Hardware. Specifically, brushing up on electronics – it’s the interactions of passive components and so on that I need to improve upon; For example being able to put precise values on rather fuzzy descriptions of “that probably wants a pullup resistor there or something”.

Jon.

Sunday 16th January 2005

January 16th, 2005

Here’s the first “big” update of the new year. First the obligatory photos of various recent events:

Photos (from left to right, and top to bottom on most standard displays): Amstrad E3 Video Phone, a visit to Totnes, Trafalgar Square on Christmas Eve, OxLUG Food end of year gathering, the Canonical Ubuntu Conference in Mataro, Wolves LUG Christmas Bash, the final days of the office being based in Witney, visiting Hannah and Joe, dfb’s Christmas Party 2004, the Christmas fayres in Birmingham (listening to Hannah Sing and Sir James Galway playing).

On Friday the 10th of December in the year 2004, I celebrated my 23rd birthday in the company of good friends and family, up in Nottingham. For the third year running, I went to dfb’s EP (now Digital Document Engineering) Christmas Party and this time took Hannah and Joe along for the ride. We stayed up in Nottingham at the Gresham and enjoyed a late night party on Campus with Dave and gang, before retiring for the evening. I had been staying with Hannah and Joe in Birmingham on the previous few evenings, following Hannah’s enjoyable performance with the Birmingham University Choir at Symphony Hall on the Wednesday. In fact, I was so reminded that I enjoyed Symphony Hall as to attend a concert on the Thursday also – Sir James Galway and Friends. At that concert, I happened to be sitting near to a physicist who also has worked for one the companies I work with and we ended up talking about magnets while he graciously offered to give me a lift back home afterwards (thanks!).

On Saturday, 11th December, we met up with Carl and Susie for some shopping and general traversing around Nottingham centre. Carl, Susie, and I went looking for a geocache near to the National Ice Centre, but came away empty handed – Carl used his shiney mobile to lookup the website and ultimately found a photo which elluded as to where the cache might have actually been (but then, apparently some of those caches have been very awkward indeed). I suggested that a useful service would be to use mobile phone triangulation to approximate a location and then have various nearby caches automatically SMS’d to the cacher in response to a simple text. The idea must have been considered previously and probably has already been done – but it would nonetheless be reasonably easy to do and pretty cool for those spontaneous cachers.

We had lunch in V1 on that day, and went to Starbucks for some coffee (well, I suppose at least one of us had one in the end). Discussed Simon Cozens’ blog entry on ozymandns before Hannah poked me in to getting my arse in gear and going back to Birmingham with them. While up in Birmingham during the preceeding week, I had enjoyed visiting the German market and having a number of pretzels and fresh coffee. Saw Dan (must arrange to meet again soon when I’m next up in Birmingham or London or even perhaps in Kent), popped in to Open Advantage and talked with Jono Bacon for a while about random stuff – he’s keen on this ABI/API compatibility stuff for the Linux Kernel – I’m not so sure whether it’s not already covered or even will actually work out. But he’s keen for me to do something about it and that’s probably worth covering in LU&D.

I was in Witney, Oxford and Reading, helping to begin to sort out the office move from Witney out to Tubney Woods (think clinical private hospital looking place in the woods – hard to get to by public transport but luckily not quite impossible). Went up to Wolverhampton for the Wolves LUG Christmas Bash 2004 – great stuff. Got an early train from Wolverhampton to London so as to get a flight to an airstrip^W RyanAir serviced airport quite some way outside of Barcelona. Canonical hosted their second Ubuntu Conference out in Mataro, Spain, and I was there to see what they were up to – and generally to meet the likes of Mark Shuttleworth, Matt Zimmerman, Jeff Waugh, Lu (Louise McCance-Price), and the other guys and gals behind the team that everyone’s talking about (well it would seem pretty everyone in the Debian universe is involved at this point at any rate).

Back in the UK, I tried to get stuff flowing in to LU&D for the January issue of the magazine. January’s “Open Source Car” issue 45 looks pretty damn cool – go buy it now! We’ve got a DVD of Fedora Core 3 on the front cover and the a shiney new cover design to boot. Popped in for the OxLUG Food Christmas gathering (just four of us this time around in the Pizza Express in the centre of Oxford, off George Street). I popped in to London on Christmas Eve and finally got around to some shopping – bought a lot of stuff in Selfridges and prior to that got my dad a book token in Foyles bookstore. Selfridges changed me for tape to go with wrapping paper as their giftwrap service was overbooked (not surprising) and I couldn’t resist buying a Hershey’s bar while I was in there too. It’s truly disgusting by the way – nothing like Cadbury’s and “only” 30% fat too – so just a few squares and you’d be ready to swell up like a giant Texan.

I saw a couple of plays over the Christmas period. One with my friend Emma in the week before Christmas itself, at the Arts Theatre – How to Lose Friends and Alienate People – and another at the Playhouse theatre on Christmas Eve itself. This is how I came to be wondering along Shaftesbury Avenue and in Trafalgar Square on Christmas Eve, watching singers and noting numbers of people standing outside a church trying to catch a glimpse of the action. I also met a Canadian woman from Ottawa, which is always appreciated. I actually quite enjoy walking down Shaftesbury Avenue and towards the Thames, especially on a clear evening as I can walk across the Thames and on to the Southbank, pondering silently to myself. I’ve recently (as in now 2005) popped in to the Southbank Centre, in search of upcoming perfomances that I might attend over the next few months. I’ve not mentioned meeting Ben or Markus, but we did meet. In actual fact we met just after I got back from Spain and had crashed at the house of Sladen up in Seven Sisters. We installed panic.printk.net in Redbus in Harbour Exchange and then did the whole Docklands weekend coffee experience, followed by a trip in to central London. Discussion with the London Eye administration (for not coping with being able to store my suitcase in their luggage area) eventually lead to a private capsule on the London Eye, and curry somwhere just off the South Bank. I suppose I should write more about all this sometime.

Just before the new year, I popped down to Totnes for an afternoon to see Richard. Twas nice. Hannah and Joe were en route to Devon anyway so I stopped off with Joe’s parents for lunch – his mum makes the most wonderful tomato chutney and it was good to see Susie and Andy too. Totnes was as pleasant as the last time, and I especially enjoyed popping in and out of various little pubs as we tried to find the perfect place to grab a bite to eat. The photos show a bookstore Richard spotted, with a sale sign to rival all sale signs: Seriously Stupid [a la Bush] Sale.

New Year’s Eve was spent with the family at home once again, but we did go out in the evening for a change (this being my criteria for rejecting a friend’s party in Oxford in favour of being with my family at home – that we at least go somewhere different if we are all staying at home). We went to The Hinds’ Head out on the A4 towards Aldermaston – where Hannah and Joe are to put up some of their wedding guests later in the year. The “Masters Minds” team came second in the pub quizz and we won far too much chocolate to be even remotely healthy over New Year’s.

I did make a bunch of New Year’s resolutions, but I’ll choose to ellaborate upon them as I see fit. While on Christmas holiday, I did do some cleaning at home and bought myself an nice comfy leather chair to work in at the computer. This place is almost tidy right now and certainly much improved upon how I had let my stuff get. I did some reading over Christmas (I’m really enjoying having a Safari account so far – although I should use it more) and some reflection. I am trying to be more organised and to operate more regular hours, and to finish things I start. I also am now doing 10 press-ups, 20 sit-ups, and 10 press-ups both morning and evening, and it’s making a difference already. I can now eat 3 regular meals per day and still hopefully lose weight. I’ll mix that with regular outdoor exercise, as I’ve been trying to do, at least when feasible.

I am off to Munich this week and then I’ll be in Ontario (Canada) and Boston (Massachusetts) for much of February as I visit Canada for a week and a bit of skating and holidaying and Boston for the LinuxWorld. I spoke to Jeremy Allison recently about meeting up over there and happened to be at a Lonix meeting the other night, in which I heard Richard Cohen might be popping in.

Another update sometime soon. Should mention various stuff – also have a look over at planet.jonmasters.org for various news feeds.

* One of my favourite Christmas gifts was a shit spewing George W. Bush doll. Just press the button and he comes out with one of those trademark quotes. A great desktop item for anyone who dislikes George Dubya as the “leader of the free world”. Bah.

Jon.

Upgraded blog to Wordpress

January 6th, 2005

This blog just got automagically imported into WordPress, courtesy of a PHPslash to Wordpress conversion script that I just wrote.

It’s not perfect yet – but with a bit of work it should be better than it was. Please don’t moan at me about templates and layout – I’ve had to do the hard bit of migration first.

Jon.

Wasted time, but fun

January 2nd, 2005

[ from the arrrgh-damn-versioning-we-meet-again dept. ]

I just spent 2 days trying to fix a potential bug in the PCMCIA driver for my PRISM2 based wifi card (Sitecom GmBH) in my Apple Powerbook, only to discover it was somewhat a non-bug. As it would turn out, I had a few loadable modules (LKMs) kicking around which were compiled with slightly different set of options (bizzarely though, nothing which I would have thought would have needed a rebuild anyway) which resulted in somewhat random wait_queue corruption in khelper.

I’ve been experiencing a few problems with Powerbook Linux, and as part of my resolutions to make myself a better person – I’ve decided to actually fix stuff that really bothers me. Like having PCMCIA die on any cardctl eject event – or randomly when putting the Powerbook to sleep. Generally I would recommend running Linux on one of these since the support is usually pretty good – but sometimes things do go wrong, and for those who care, here’s the “411″ on this recent non-bug.

Linux has various parts of the hotplug subsystem and events subsystem, which work together when a new device is inserted before it becomes available. Linux has a permanent kernel_thread helper running called khelper. This thread is occasionally used as a schedulable context for stuff that call_usermode_helper wants to run – like /sbin/hotplug or modprobe. It’s a pretty cool solution to the problem of calling out to userspace for help. khelper is responsible for running up hotplug when I insert my wifi card, which then configures the netdevice and hooks up ifplugd to watch for net events. Incidentally, for those who don’t have ifplugd watching their network sockets – where have you been?

I have recently been seeing kernel oopses on card removal, similar to this one:

Oops: kernel access of bad area, sig: 11 [#1]
PREEMPT
NIP: 4800024C LR: C001A3F4 SP: CFF97ED0 REGS: cff97e20 TRAP: 0400    Not tainted
MSR: 40001032 EE: 0 PR: 0 FP: 0 ME: 1 IR/DR: 11
TASK = c0570660[4] 'khelper' THREAD: cff96000Last syscall: 120
GPR00: 4800024D CFF97ED0 C0570660 C00305BC 00000003 00000000 00000000 00000000
GPR08: 00009032 C00305C8 C1275D80 CFF96000 CFF96000 00000000 00000000 00000000
GPR16: 00000000 00000000 00000000 00000000 00000000 CFFA68A0 CFF96000 CFFA68B8
GPR24: 00000003 00000000 00000000 00000001 C1275D84 38A5A768 7C00F028 CFF97ED0
NIP [4800024c] 0x4800024c
LR [c001a3f4] __wake_up_common+0x58/0xa4
Call trace:
 [c001a5c4] complete+0x58/0x98
 [c0030800] __call_usermodehelper+0x78/0x88
 [c0030ca0] worker_thread+0x1ac/0x27c
 [c0035b0c] kthread+0xb8/0xc0
 [c000b490] kernel_thread+0x44/0x60
note: khelper[4] exited with preempt_count 1

Note how the LR (Link Register) contains c001a3f4, the address of __wake_up_common+0x58 (hex offset 0×58 bytes), a function which is apprently 0xa4 hex bytes in length. On PowerPC, the Link Register serves as a saved instruction pointer one can return to in a function epilogue by doing a blr, or similar. So the cause of the exception was whatever happened at that address. It turns out that this was a branch instruction. Here’s the offending function:

/*
 * The core wakeup function.  Non-exclusive wakeups (nr_exclusive == 0) just
 * wake everything up.  If it's an exclusive wakeup (nr_exclusive == small +ve
 * number) then we wake all the non-exclusive tasks and one exclusive task.
 *
 * There are circumstances in which we can try to wake a task which has already
 * started to run but is not in state TASK_RUNNING.  try_to_wake_up() returns
 * zero in this (rare) case, and we handle it by continuing to scan the queue.
 */
static void __wake_up_common(wait_queue_head_t *q, unsigned int mode,
                             int nr_exclusive, int sync, void *key)
{
        struct list_head *tmp, *next;

        list_for_each_safe(tmp, next, &q->task_list) {
                wait_queue_t *curr;
                unsigned flags;
                curr = list_entry(tmp, wait_queue_t, task_list);
                flags = curr->flags;
                if (curr->func(curr, mode, sync, key) &&
                    (flags & WQ_FLAG_EXCLUSIVE) &&
                    !--nr_exclusive)
                        break;
        }
}

The offending line turns out to be the call to curr->func(curr, mode, sync, key) since this dereferences an entry in the waitqueue and attempts to run the func element. func is the wakeup function, which is usually default_wake_function but presumably might be changed for some special applications (example sought) . Suppose this wait queue entry existed on a dud stackframe somewhere or was otherwise trashed and the function pointed off in to space, as is the case with this oops. Then the kernel would get very unhappy calling it.

What followed was over a day of exploring with the PCMCIA subsystem and going through the source to cs.c and ds.c in an attempt to understand what might have registered itself for a wakeup. Eventually I did a full recompile with spinlock and wait queue debugging, which failed to run properly without recompiled modules – that was a fairly obvious mistake – but when I did re-install modules, I eventually figured it must have been that I had missed this step on a previous build.

So that’ll teach me to always be sure I do a make modules_install step on any new kernel.

Jon.

Forthcoming Events

January 1st, 2005

[ from the happy-new-year-all dept. ]

Happy new year everyone!

This is a placeholder until a full update goes up properly. I’ll be away quite a lot over the next two months – a partial list follows.

  • Munich, Germany – 2005/01/20 – 2005/01/23
  • Ottawa, Canada – 2005/02/01 – 2005/02/20
    • LinuxWorld – Boston, MA – 2005/02/14 – 2005/02/17
  • UKUUG Conference – Birmingnam 2005/02/24 (possibly).
  • FOSDEM – Brussels, Belgium 2005/02/25 – 2005/02/26

Jon.

Calling Chris

December 23rd, 2004

[ from the hi-where-are-you? dept. ]

I’m using my blog as a way to get in touch with an old friend…

Hi Chris,

When you read this, could you drop me a line from your Sun or non-Sun email address or even call me so that I have some way of reaching you?

I’m contemplating visiting Dubai next year.

Jon.

A full blog update will happen, maybe it’ll even be available as an mp3.


Random Update

December 4th, 2004

[ from the please-insert-amusing-anecdote dept. ]

Photos (from left to right): Holly and Hannah at Holly’s birthday dinner outing, Christmas lights in Oxford, Wagamama opens in Reading.

This is a quick update until I get around to writing something slightly more substantial, perhaps later this week. In this blog entry we have musical tendancies, unrequited interests, kernel hacking and some forthcoming travelling.

Musical tendancies

I really like MUSE (shockwave flash unfortunately used heavily on their site). I really like them. This is a good thing – it proves that I might actually have some form of musical taste beyond 80s electropop, euphoric mixes and pre-1800 classical music. Readers should feel free to buy me any of MUSE’s music :-) I also recently bought a Best of Accoustic album and Jamie Cullum’s “Twenty Something”. I enjoy Jamie’s music, but not all in equal measure. Today, I bought some more music from magnatuneFalling You are simply amazing to listen to.

Once again, I have taken an interest in learning the guitar – I especially enjoyed a recent impromtu session with one of the guys from work who has several electrics and an accoustic. Yes, Joe bought a guitar recently, but I don’t think this isn’t just a fad of mine – I actually have had an interest for some time. Additionally, I am going to actually examine the music theory material again properly too – I bought the Associated Board books for a second time a while back (Hannah’s borrowed them but she can probably keep those if I get yet some more – just don’t tell her I said that). I took grade 5 music theory a number of years ago, but never found out whether I passed or failed it and at this point don’t really care.

Aside from that, I’ve been trying to learn Pachelbel’s Canon in D for a while and have had a few breakthroughs. Firstly, I realised some fundamental problems with my rusty technique – my basic positioning and tuning are much improved now, in my own opinion (Hannah and Joe might disagree with me though). Secondly, I noticed that a fast fingering section didn’t actually want to be in third position on the G string (it really really didn’t), and once you get that right it actually starts to sound more like it should. I’ll practice it some more and then record it so that I can inflict it upon readers of this blog.

Unrequited interests

The Incredibles is a good film. In fact, it was as good on the second viewing as it was on the first (I originally saw it with members of my nuclear family, when it came out). All the more enjoyable for the company I was in at the time – I met a friend of a friend who really peaked my interest. Of course, as per usual, this was unrequited. A real shame because the person concerned is exactly my type – and about as interested in distant lands as I am, but not interested in me. Perhaps I’ll end up at one of these speed dating sessions in the new year – I think I hate being single. It has got its advantages since I’d have to be more organised if I were not single. Either way, it’s been too long since there was someone I could really talk to, I’m really mostly after companionship more so than anything else.

There’s nothing more soul destroying than telling someone how you feel and finding there’s no reciprication.

Kernel bits

I have written a couple of articles on Linux kernel development, with some example code available for 2.6 stable series kernels. So far we’ve done the general intro and char and block hacking examples, but I’m working on a UML debugging article and planning some more interesting examples for the new year. I had one guy call me up late one evening to thank me personally for the first article – that’s a nice gesture. Feel free to do that at any time of the day :-) .

I’m going to test ac’s ite8212 driver code (having written a simple mode driver of my own a while back – it wasn’t very good, didn’t do dma or anything even remotely fun like that, but it was my first forary in to the 2.6 gendisk driver stuff). Alan’s much better driver is in 2.6.9-ac13 now (turns out this might actually be 2.6.9-ac12 as apparently they both have the same checksum so there might have been a problem with publishing the patches – I didn’t look in to that yet myself, it’s hardly that bad, but saw a list post about it earlier). The kernel’s BK was down earlier on today and kernel CVS has apparently been unresponsive lately – don’t know if anything’s up with that stuff in general. Probably not.

Travelling bits

I am going to the Canonical Ubuntu conference in Mataró, Spain. The conference itself runs for the next couple of weeks, but I am going along to the final few days. I am also planning a few other trips but I will have more to say about those once I have worked out the details. Flights costing only 30quid return make it more financially viable to fly abroad than to go to another part of this country for a weekend – enjoy it while it lasts though, the oil’s running out. I should pay a carbon tax. Perhaps I will have a look at one of those websites where you can buy trees as a way of coping with such moral turpitude (update 05/12/2004: donated a tree to offset C02 emmisions via Future Forests).

Paris was really enjoyable. I especially enjoyed walking along the Champs-Eleysees in the rain and a Sunday stroll along the Seine. It’s this side of a trip that I enjoy especially – but of course I was fascinated by the scale of the Louvre museum and the cultural sophistication of the city in comparison to others. Rue Saint Germain is an excellent place for small coffee shops and I enjoyed a few cafe au laits while there. I visited the Paris Travelbug hotel and dropped off a travelbug from my Canada trip which had been in my possession for rather a bit too long at this point – still no Fuzzy Wuzzy geocache of my own to rival my friends’ efforts, but I’ll get there.

Random bits

This week featured quite a few visits to the latest Wagamama. It’s at the Oracle Riverside in Reading (near to GC402A The Oracle Microcache – but can I find the damn thing? Have I looked several times now? Too many muggles to really look for it during the day and too many bouncers in the evenings standing outside the Bar Risa). There’s also a Strada pizzeria opening in a week or so – so I hope that finally there will be some good food choices at the Oracle Riverside now, rather than a majority of Americanised rubbish, with the odd exception.

I spent all of Saturday messing around, but this time actually got out of bed before lunch and felt more productive than is usual for Saturday. Building various UML test kernels and compiling up a few other bits to experiment with is fun. I got my mol installation to boot a Linux kernel (by noting that someone else had had to replace the current “new” oftree.linux with the original oftree.linux_old in the latest releases) and figuring out a few other things – the pseudo-disk filesystem doesn’t like symlinks but doesn’t really like to tell you that, the debian/rules build script does a very simple configuration job which doesn’t build the debugger in and I’m not sure whether it should or not for production use. Probably it should not, but then, if there’s very little overhead it might be worth having it, as many of us want to use it from time to time. I need to get somewhere with this OF stuff I had been putting off, but today (it’s Sunday now here – the times reported on this blog are in need of adjusting for timezone locality) mostly should be spent working on the duck as it’s quite behind now.

Jon.

* Joe’s influence is rubbing off on Hannah – my sister Hannah recently started blogging (scary! but good reading).