Archive for the ‘General’ Category

Upgraded blog to Wordpress

Thursday, 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

Sunday, 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

Saturday, 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

Thursday, 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

Saturday, 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).

Quick update

Monday, November 22nd, 2004

[ from the very-quick-photo-link dept. ]

Photo: The Eiffel Tower visited at night.

I am in Paris following a weekend of varied sightseeing and a little contemplation with some working. Visiting LynuxWorks today and hoping to do some work before returning to the UK tonight.

Jon.

November’s first jcm update

Friday, November 12th, 2004

[ from the finally-it-gets-written dept. ]



Photos (from left to right): After-dinner Geocaching with the family in Prospect Park, An autumn walk along the South Bank (Thames, London), visiting friends in Nottingham, Redhat’s Michael Tiemann speaking at LinuxWorld Expo 2004.

In this issue…Laptop update, walking, travelling, LinuxWorld Expo 2004 and Wolves LUG, Geocaching, and more!

Once again, it’s been rather a while since the last update to this blog. Never mind, anyone suffering from withdrawl symptoms in the interim is strongly advised to consult a qualified physician about this issue. Soldiering on, I’ll attempt to give a rough and ready take on life at the moment and what I’m generally up to – as is the custom of blogging. Since I don’t seem to update this blog very often, I have toyed with the idea of running an announce mailing list for this site – in fact I’ll try it (subscribe here) and if anyone bothers to signup then I’ll announce blog updates there. Indeed, I’ve been doing some CGI development for an embedded box using only busybox and l33t sed scripting so I might indulge a little dynamicness on this site once again – perhaps even in sed, since it’s about as easy to use as perl, or something “nasty” like that :-) .

Since I last updated this blog, Carl and Susie have got married, we had the clocks change back, and it’s true to say that Autumn has well and truly come along now. It won’t be too long before my 23rd birthday – December 10th. I’ll be in Nottingham for dfb’s Christmas dinner – the first under the Digital Document Engineering renaming mantra. The group formerly known as Electronic Publishing. It’s funny, those years spent at Nottingham seem like such a long time ago already, and I am certainly trying to keep in touch with as many people as possible, but it is already evident that this is going to be difficult going forward.

Laptop Update

My laptop was repaired on behalf of John Lewis (since I had made a warrenty claim within the 2nd year of ownership, under the additional John Lewis extended warrenty, as mentioned in my last entry) and returned in about a week; I happened to be walking passed the store and it had just come back in at the time that I picked it up. In any case, the repair covered the issues I had had with the unit – everything from the right hinge to the DVD/CDROM drive and the asthetic damage to the paintwork on the metal palmrest. The system now has new casing and even a new battery – which actually gets 4 hours runtime, although it gets hot when charging.

The repair technician did follow the advice on one of the ten notices I had printed (directions for how to handle the unit – I stuck one to the laptop screen, one inside the laptop, and handed one over – the others were stuck in and around the laptop case, which they didn’t need) which stated I did NOT want System Restore run on the unit (of course it also displayed this in block capitals in yaboot if booted that way – just to be sure). As with friends of mine, they even returned it booting in to yaboot (I had previously switched it to Mac OS X). Of course, I cleaned out personal data files before it went off (including my GPG key) and restored those after it was returned. I didn’t want the hassle of restoring bits of the OS just for the sake of making it a bit easier for Apple authorised folk to swap my unit for another or something (the MAC matches the one it went off with and we know they didn’t swap it anyway).

Walking and travelling around

I’ve been walking a little, but nowhere near enough, and hope that the newly purchased GPS will assist me in getting more outdoor exercise during the winter months. I did recently walk along the Thames in Oxford and get stuck in a boggy marshland, after being a bit overadventurous as a result of my forary in to wearing boots (they really do rock – I’m wearing boots quite regularly now – whenever pratical and/or appropriate) and taking a town bike offroad. I also recently walked along the Southbank again, as well as the canal from Selly Oak to Birmingham when visiting Hannah and Joe Wrigley.

I’m going to Paris next weekend, with a friend from work. I’ve not been abroad in a couple of months but have some plans for early in the new year which I hope do actually happen. In February, there are plenty of geek events to go to, including: FOSDEM, GeekSki, and LinuxWorld Boston too. I would also like to pop in to Ontario to visit the fine folks at the Ottawa Linux User Group when next on that side of the Atlantic (and perhaps as a recourse to spending too long in the U$ – I’m sure it’s a nice place to visit but…). It’s interesting how many immigration requests Canada is rumoured to have had following the re-election of George W. Bookend. He managed to piss off the Chinese within a few weeks and bomb half the countries he didn’t like last time, I wonder what he’ll do next? There’s always China but he hasn’t deeply offended the Russians yet and we’re probably overdue for another Cold War (his dad would be very proud).

Working, writing et al.

Work is ok enough (takeover completion finally happened so I now work part time for a pretty large Plc.) at the moment and I’ve recently been doing some writing with Jono Bacon for an upcoming issue of the magazine. I’m also running a regular feature on Kernel Hacking and have just finished the second installment, for the next issue. I’ve also been doing some work on RoboDuck, having visited Gee Dee models in Nottingham last weekend to buy a rudder servo and some bits. I also found out about a popular online and offline model supplier – Robbe, where I can buy a Z drive prop and rudder assembly for power drive function.

I have reasonably recently been to Wolverhampton to meet up with Jono, and also visited Open Advantage West Midlands as a technical member of the press, to attend the PayThyme pre-release Open Source preview session. I popped in to Milton Keynes a couple of weeks ago, to visit Nexcom UK, where I reviewed one of their Blade servers (see upcoming magazine issue). I have also visited the Monta guys in Bracknell again. I had a conference call with various folks at

Monta a couple of weeks ago, and a longish chat with Victor Yodaiken of FSM Labs, at around that time. Both calls concerned the new Real-time work going in to the 2.6 Linux kernel and their different takes on it, as well as the release of RTLinux Pro 2.1. I did a feature on the RT stuff and plan a code walkthrough at some point – the latest patches by Ingo Molnar of RedHat are pretty interesting indeed.

Coffee

I won a coffee hamper in Whittard as part of their Big Coffee morning charity event (I don’t recall who my local store were running the event in aid of now unfortunately). After I received a message on my voicemail to say I had won, it was some time before I listed to it, and even longer before I went to collect the sweet coffee goodness. However I did eventually get a hamper and 25 pounds worth of goods to go inside. This included a selection pack of 6 coffees, some cantuccini biscotti and an oversized mug with a text printed on the side reading “I’LL HAVE A DOUBLE DE-CAF NON-FAT LATTE MEDIUM FOAM DUSTED WITH THE FAINTEST WHISPER OF CINNAMON” (as one of the Monta folks likes to describe such drinks, it’s also perhaps known as a “why bother”). In other coffee news, Starbucks now have Ginerbread Latte’s again and I’ve switched to Caffe Nero as my preferred coffeehouse (whenever possible – despite the smoking, they’re seemingly less evil than Starbucks). I did buy a four pack of syrups from that certain American coffeehouse (including Gingerbread) and spent the best part of 30 quid in a Birmingham outlet during last Friday on wifi/coffee when finishing up an article, and am considering signing up to Surf and Sip for wireless (Caffe Nero wifi affiliate).

There’s a Wagamama opening in Reading soon, at the Oracle riverside, next to what might be an interesting new Italian place. I’m looking forward to popping in on a semi-regular basis for Japanese. I went looking for the Oracle microcache but haven’t managed to find it yet since it really is very well hidden (well it would be, given the busy area).

LinuxWorld Expo 2004 and Wolves LUG

October featured the LinuxWorld 2004 conference and Expo, at Kensington Olympia in West London. I went along to the show, mostly to meet up with friends and catch up with Jono and the
WolvesLUG folk. The magazine listed them as LUG of the month last month, and I enjoyed having a curry with the Wolverhampton folk, as well as meeting several of Joe’s workmates who are LUG members. The Expo was quite small this year and followed the trend of ever smaller and more reconciled events, filled with a few large players and a few smaller guys. The .org village was tucked away in the corner but I met up with a number of the people I had gone to see. Evidently every show must have its showgirls, and Novell had hired some girls who were not shy to extoll their skanty outfits (and at least one was wearing an obvious g string underneath). JD managed to get some phone numbers, I of course was beyond such tactics, electing instead to arrange something more official, but apparently they’re only in the business of providing software and services solutions. The SuSE/Novell people were quite fun in the pub afterwards too, though I think a certain person from Wolves regretted drunken activities a little on the next day. Twas fun, I saw David, Paul, Philippe, Justin, Alasdair, the usual gang.

Geocaching

I bought a GPS from a friend at work. It’s a Garmin 12XL 12 channel receiver which works reasonably well. Although this unit is not as small as the popular Etrex, it does have a few features which are missing from the cheaper models and the battery life is pretty good too. As usual, it never ceases to amaze me how new technology can be so fascinating for that initial period after purchase – I have pointless statistics on distances from home to most places I went soon after getting the GPS, and many other wonderful facts (like that work is 29.7 miles from my home). I’ve restrained myself from posting my current co-ordinates in an effort to avoid the ICBMs this evening.

Other stuff

Obviously other stuff happened. We had family fireworks a couple of weekend’s ago – Joe did them again, and did a good job (see photos). There were a few trick or treat visitors this year, who at least had taken some effort with face masks and costumes. I caught the end of the Forest Fields event in Nottingham last Friday night (literally arriving at the end by the time Jo and I had eaten), when I went to visit Robin and Beckie and jok. I found the Caffe Nero in Nottingham and confirmed that I can use Surf and Sip there too :-) . Also I decided to follow another friend’s recommendation on music, having had several good purchases recently – from an Ultimate collection of the Kinks to Euphoric techno music. I’m going to buy a Hoobastank album this weekend. I did also finally buy some bootcut jeans and warm jumpers as part of my winter collection 2004.

Jon.