OLPC Wireless packet loss

Last week Pia asked me to help her out with her yet to be name Australian OLPC deployment. The deployment involves two remote sites connected by an ADSL WAN and one of the key applications across this LAN is the use of the VideoChat activity.

The children at the site were experiencing audio blips and video artefacts, a sure sign of some sort of network related packet loss. With Pia at one site and myself at the other we did some testing to try and rule out the WAN itself as the problem and determine what the issue was.

It became quickly obvious that the WAN wasn’t at fault. We setup some pings with an interval of 1/10 of a second from the XO’s to their respective default gateways and between the default gateways themselves. Pia and I then started counting out loud, which got us a couple of strange looks from children playing around us :). During the audio blips there was no loss across the WAN but there was loss to the default gateways.

Now here comes the interesting part, the packet loss to the default gateways seemed to be syncronised. Now remember these are totally independant wireless networks sitting a couple of 100 kilometers apart. At this stage I was cooking up crazy theories about difficult to decode/encode video packets hitting both XOs at the same time but I was fairly dubious.

We did a little testing on XOs at the same site and while the problem didn’t seem to manifest in as obvious a manner it was still there (I think the latency involved across the WAN exacerbated the symptoms).

Back at home I did some further testing for a few days, trying all manner of different loads and writing various script to watch tcpdump output. To cut a long story short eventually while glancing at the XO during packet loss I noticed the antennae light was flashing which would indicate the XO is disassociating from the network.

A few minutes later I was able to verify that wireless scans were causing the problem and that it is easily reproducible by doing

ping -i 0.1 GATEWAY_IP &

iwlist eth0 scan

You should notice the drop of about 4 packets.

I’ve filed the bug on the OLPC bug tracker

Ticket #9048 – Wireless scanning causes network pauses

A temporary work around is to get Network Manager to stop performing scans, although I assume this means the network view probably won’t get updated. You can do this using wpa_cli.

wpa_cli
> ap_scan 0

Melbourne Cup Dip2

To quote Justaan:

This is what we call the Melbourne Cup Network Effect

Melbourne Cup network effect

It seems it really is the race that stops the nation. This is a graph of Bulletproof’s outbound web traffic for today. That’s a 37% drop in outbound traffic just after 3pm.

Make sure you take note of my l33t gimp skills!

Disabling “Subscribe to feed” in firefox

At Vquence we do a lot of crawling of various video hosting sites and where possible we like to use APIs or RSS feeds instead of page scraping. A semi-recent features of firefox is that when you click on an RSS link you get a “Subscribe to this feed in your favourite reader” header and then the formatted contents of the feed.

This is really annoying if what you really want to see is the raw XML. Sure I could hit CTRL-U to see the source but thats an extra step and a whole other window I now have open. I couldn’t find any way to disable this functionality so I ended up writing a greasemonkey script called disable_subscribe_feed.js.

The meat of the script looks like

// Pick three element ids that appear in the "Subscribe to page" and probably 
var tag1 = document.getElementById('feedHeaderContainer');
var tag2 = document.getElementById('feedSubscriptionInfo2');
var tag3 = document.getElementById('feedSubscribeLine');

// Show the source
if (tag1 && tag2 && tag3) {
    location.href = 'view-source:' + document.location.href;
}

Basically it tries to detect the “subscribe to feed” page based on a couple of tag ids that exist on it and then performs a redirect to view-source: for that page. Which gives us nicely formatted XML.

Getting your key into debian-maintainers using jetring

I’m currently going through the process of becoming a Debian Maintainer so that I can upload Annodex packages without bugging one of the DDs I know. Thanks to horms and jaq for their help thus far.

As part of this process you need to file a bug against the debian-maintainers package to get your key added. You need to do this using a piece of software called jetring. jetring allows you to create changesets for a gpg keyring, a binary format, to make it easy for the maintainers to add and remove keys and know exactly whats being added and removed. I couldn’t find very much information on how you actually do this and hence the reason for this post.

To start with you need to grab the latest copy of the debian-maintainers keyring and extract the actual keyring from it. You can find the link to the latest version at debian-maintainers, just click on all to download it.

Here is the process I followed with comments along the way


# Download the latest debian-maintainers keyring
wget http://http.us.debian.org/debian/pool/main/d/
debian-maintainers/debian-maintainers_1.38_all.deb
dpkg-deb -x *.deb keyring
mv keyring/usr/share/keyrings/debian-maintainers.gpg .
rm -rf keyring *.deb

# Create a copy of it and add your key to it
cp debian-maintainers.gpg debian-maintainers.gpg.orig
gpg --export johnf@inodes.org | 
    gpg --import --no-default-keyring --keyring `pwd`/debian-maintainers.gpg

# Create the changset with jetring
jetring-gen debian-maintainers.gpg.orig debian-maintainers.gpg 
    "Add John Ferlito <johnf @inodes.org> as a Debian Maintainer"

# Check the changeset
jetring-review -d debian-maintainers.gpg.orig add-*

Once you have completed the above you should have a file with something like the following contents

Comment: Add John Ferlito <johnf @inodes.org> as a Debian Maintainer
Date: Sat, 05 Jul 2008 14:26:31 +1000
Action: import
Data: 
  -----BEGIN PGP PUBLIC KEY BLOCK-----
  Version: GnuPG v1.4.6 (GNU/Linux)
  
  mQGiBEd6MmQRBADF+BLVChN/AqKVXkrJFU2LtJoiCdYJ
  <snip>
  =SSNk
  -----END PGP PUBLIC KEY BLOCK-----

You should now add something along the lines of the below to the top of the file.

Recommended-By:
  Simon Horman <horms @verge,net.au>,
  Jamie Wilkinson <jaq @spacepants.org>
Agreement: http://lists.debian.org/debian-newmaint/2008/07/msg00010.html
Advocates:
  http://lists.debian.org/debian-newmaint/2008/07/msg00011.html,
  http://lists.debian.org/debian-newmaint/2008/07/msg00012.html

The agreement line should be a URL to your signed email applying to become a DM and the advocates should be the URLs for the signed emails from your advocates.

Once you’ve done that, submit a bug with the file attached and hopefully sometime later you will have become a DM.

Firefox popup blocking

Wouldn’t it make more sense for firefox to allow popups based on the destination site rather than on the source?

For example most popups I click on are for YouTube. Now some on these are on random blogging sites. Which means that to jump to the YouTube page for that video I have to allow popups for some random blog, which can now popup as many ads as it wants.

Wouldn’t it make more sense to allow YouTube as a popup destination. It really comes down to the fact that I trust YouTube more than some random blog embedding YouTube videos.

I haven’t thought about this very much so maybe there is a good reason why you wouldn’t want this. If a few other people agree with me I’ll go file a bug. Hmm I wonder if you could write an extension to do it.

Update: Peter raises a good point as to why this is a bad idea.