Category: Tech

Wikileaks Censored by US Judge

A controversial website that allows whistle-blowers to anonymously post government and corporate documents has been taken offline in the US.

BBC News

WikiLeaks and its domain registrar for the wikileaks.org domain name, Dynadot, have been sued by the Swiss Bank Julius Baer, because of leaks claiming illegal activities at the bank’s Cayman Island branch.

The Judge order the DNS registrar to freeze the domain. The main servers are in Sweden though, so the cover names still work (such as the UK one: http://wikileaks.org.uk). There are also mirror sites. This is a good example of why you shouldn’t rely on US domain names (and why we need more diversity of root server control no doubt). Not sure how much better the UK system is though.

The Tor network has hidden services for this kind of thing and though not perfect, helps protect against this kind of attack (the Tor website is censored by my Vodafone ISP btw). A good time as any to volunteer to host a Tor router server.

Cryptome has a Wikileak archive and more information.

Leeds Ruby Thing, Victoria Hotel 7th Feb 2008.

Some of the people of the North West Ruby User Group (who usually meet in Manchester) have organised the first little Leeds get together.  No real name yet, so it’s the Leeds Ruby Thing for now.

No clear plan yet either, but expect unstructured discussion of Ruby and Ruby on Rails at least.

Thursday 7th February 2008 at 7pm in the Victoria Hotel pub. All welcome!

More details here: http://upcoming.yahoo.com/event/423116

North West Ruby User Group Talk: Building Brightbox

Oh, btw, I’m doing a talk tomorrow at the North West Ruby User Group in Manchester about how we do the Ruby on Rails hosting at Brightbox.

I’ll be talking about SANs, Centos, Ubuntu, Xen, Apache, Lighty, NGINX, MySQL and other goodies. Heck, I might even mention Ruby, which would be nice considering it’s a Ruby user group.

My business partner Jeremy will be nattering about the business side and various other things.

Update: A couple of photos here and here.

Rubinius multiple instances, one process

Rubinius has support (as of today!) for running multiple instances of it’s VM within one process, each VM on it’s own *native* thread, each VM running many ruby green threads. Each VM has it’s own heap and so each VM could load different apps that wouldn’t interfere with each other. We have plans for a mod_rubinius for apache that takes full advantage of this feature. Stay tuned ;)

Ezra Zygmuntowi on a comment on Ruby Inside.

Very interesting stuff. Why bother making Rails thread safe when you have an awesome Ruby VM such as Rubinius. I’d like to see Mongrel (or FastCGI! Bring back FastCGI!) make use of this somehow, running multiple Rails instances itself in one process and distributing requests between them. Interested in knowing how it’d deal with memory leaks in external libraries though (like rmagick suffers from).

Still, you lose finer grained access to most of the nice UNIX process management stuff though then, like limiting memory usage with ulimits, but nobody seems to be using that for Ruby deployment anyway. It’s all fiddling around with Monit and such instead (why always with the steps backward!).

Reliable rake task execution

My News Sniffer project needs to regularly do some back-end stuff like checking a bunch of rss feeds and downloading web pages. I do this with some rake tasks, which I call using the cron daemon.  Recently I’ve been having problems where some tasks take a bit longer than usual to complete and end up running in parallel. This slows things down, which means more tasks end up running in parallel and then my little virtual machine eventually falls on it’s face under memory pressure.

I could implement some locking in my application, but it’s always good to avoid as much new code as possible so, in the good old *NIX fashion, I cobbled together a short bash script taking advantage of existing tools. What this does is executes the given rake task in the given rails root using the Debian/Ubuntu tool start-stop-daemon (provided by the dpkg package, which is therefore always installed). start-stop-daemon uses a pid file to keep track of the rake program for the given task, so it will never run a second concurrent instance of rake for this task. Cron just keeps trying to run it every 5 minutes or whatever, but it only runs once concurrently.
(more…)

Open Rights Group: Two Years Old!

Open Rights Group logo The Open Rights Group (UK’s equivalent of the Electronic Frontier Foundation) is two years old today.  They fight for our digital civil rights (shoddy electronic voting schemes, software patents, all that kind of stuff) and are very good at it from what I’ve heard and seen.  Go read all about them and please consider supporting them, if you haven’t already.

Search interfaces

Ugh. I just did a search on streetmap.co.uk for a latitude and longitude reference and it didn’t recognise it. I spotted the radio button to tell it what kind of search I’m doing and clicked again. Still no luck. Removing the comma between the two numbers got me what I wanted.

It is not difficult to detect when someone is searching for a latitude and longitude. It is a pair of floating point numbers with 13 decimal places. Who lives on a street named with 13 decimal places? How many businesses are named with just numbers such that I would require 13 decimal places to tell them apart?

And then, after the user goes out of their way to tell your software what to expect, why not accept a few variations of the input (though one lousy comma would hardly count as a variation to me).

I’d be better off with a pencil sketch map and a divining rod. No wonder these services are losing all their business to services like Google maps.

Eclipse IDE

Eclipse logo I’ve just tried out the Eclipse Integrated Development Environment. It appears to be named Eclipse due to how it consumes all your CPU and RAM, overshadowing anything else you might want to do.

I tried the RadRails addon thing out for developing Rails. It has some nice features but is rather a big jump from vim, which I’ve been using up until now. And to the best of my memory, vim has never crashed once. Whereas Eclipse has already crashed about 10 times in 24 hours.

UPDATE: I used Eclipse for all my Ruby on Rails development for almost two weeks but I’ve now given up.  Even with leaky old Firefox and the monolith that is OpenOffice running concurrently I would rarely notice swapping, but Eclipse has decimated my swap partition.  It’s resource requirements (mostly RAM) have turned my brand new laptop into a 486 DX66 with 4MB RAM and a broken CPU fan.  It would regularly crash too.  Any time saving it’s features might have offered were well cancelled out by all the lost work.

I am using the Aptana Ruby on Rails Eclipse addons, so maybe you can blame that, though the Haskell addons were misbehaving too. Ridiculous stuff.

I’m just going to learn how to use some of the more advanced features of VIM.  I’m giving GVIM a go too.  Oh VIM, how I missed you so.

Dell DRAC 5 – DCRAP 5

We have some Dell PowerEdge 1950’s with Dell’s server remote access device, the DRAC.  Previously, this DRAC system provided remote console using a java applet – worked fine once you had the jvm installed, even on Linux.

I think since DRAC version 5, they’ve replaced this with some custom plugin they’ve written and it’s appalling.  Firstly, whilst there is a Linux version I’ve not been able to make it even install.  Looking at their installer code, it just couldn’t have ever come close to working unless the quality testing department (ha!) were running their browsers as root, though it still wouldn’t work.  So I’m assuming Dell have no Linux QA.

(more…)

Segfault in Ruby Ferret query parser

Whilst working with the Ruby text search engine library Ferret, I came across a segfault in the query parser. It had already been reported and fixed, but I realised it can lead to a denial of service.

If you use Ferret anywhere that allows users to execute queries, those users can crash the Ruby process with a specially crafted query.  This was quite serious for a number of my sites (not to mention slowing development of a current app) so I applied the fix to the released 0.11.4 source and repackaged it as 0.11.4.1.

Obviously this isn’t in any way official, but it works for me and I’m sharing here for anyone else affected. Gem, tgz and zip here and just the patch available here (derived from the author’s changeset to trunk).

The patch is against the release source, as the subversion repository seems to be down atm (I got the changeset from the web bases subversion viewer).

Get upgrading!

ELER: Kill Your Tribal Elder

The video of the talks from Lug Radio Live 2007 are now online.  My talk was about free and open source software, crowd wisdom and leaders and was called ELER: Kill Your Tribal Elder.  If you missed it, you can view it there, if you feel it important.

Lighttpd and the wonders of strace

I ran Lighttpd under strace today whilst debugging a problem with mod_deflate and I found two mis-configurations just from watching the system calls it was making. In case anyone is interested, this is what I found.

Firstly, I’d enabled the system.use-noatime option but I could see that it was failing to set this mode when opening a file to serve:


open("/home/john/.../newsniffer.css", O_RDONLY|O_NONBLOCK|O_LARGEFILE|O_NOATIME) = -1 EPERM (Operation not permitted)
open("/home/john/.../newsniffer.css", O_RDONLY|O_NONBLOCK|O_LARGEFILE) = 40

I realised that Lighty drops privileges on start-up, and the O_NOATIME option is privileged. No biggie, but a wasted system call is a wasted system call, so I disabled the option. To my surprise, this fixed the blank/empty page problem I was having with mod_deflate. Clearly a bug, but now I can file a slightly more helpful bug report (this is the Lighttpd dev trunk btw).

Secondly, I’d always assumed (having read it somewhere, I’m sure) that Lighttpd selected the most efficient event-handler available on the operating system – on my Linux 2.6 system this would be epoll, but strace showed Lighttp using regular poll:


poll([{fd=4, events=POLLIN}, {fd=5, events=POLLIN}, {fd=-1}, {fd=-1}, {fd=-1}, {fd=-1}], 6, 1000) = 0

So, I explicitly configured it with server.event-handler = "linux-sysepoll" and now strace shows me:


epoll_wait(39, {}, 4096, 1000)          = 0

I’ve always found the strace tool very useful, but sometimes I forget and take it for granted. I love you strace tool.