FreeBSD on EC2 FAQ

In the week since I announced the availability of FreeBSD on EC2 I've been hearing some questions many times; in the interest of my spending less time replying to emails (and more time fixing bugs and writing code), I figured I'd answer some of these questions publicly here.

How do I get started with FreeBSD on EC2?

Read Amazon's EC2 Getting Started Guide. When you get to the 'Choose an AMI' step, click on the 'My AMIs' tab, select 'Public Images' from the 'Viewing:' drop-down box, and then enter an AMI # from the FreeBSD on EC2 status page into the box. Then select the AMI which is shown.

When will a FreeBSD 8.x AMI be available?

Soon. I merged a long list of fixes to stable/8 earlier today and I'll be building an AMI for 8.2-RC1.

What's the deal with these 'lock order reversal' messages I keep seeing?

FreeBSD contains a system called 'WITNESS' which detects bugs which could result in deadlocks. It also produces false positives from time to time.

There are three lock order reversals which are very commonly seen and appear to be harmless:

  1. The ufs lock in vfs_mount.c vs. the devfs lock in vfs_subr.c.
  2. The bufwait lock in vfs_bio.c vs. the dirhash lock in ufs_dirhash.c.
  3. The ufs lock in vfs_subr.c vs. the bufwait lock in ffs_softdep.c.

If the lock order reversal you're seeing is one of these, just ignore it. Otherwise please file a PR (especially if you see the letters 'vm' somewhere, since that makes it more likely to be related to the Xen code).

I managed to trigger a FreeBSD kernel panic; now what?

Start by checking the FreeBSD on EC2 status page to see if it is a known bug. If it isn't, please look in /var/crash for files named info.X and core.txt.X. Please keep these somewhere safe (i.e., if you're going to kill the EC2 instance, download them first).

Submit a PR, including the contents of the info file and (if one exists) the backtrace from the core.txt file. Then send me an email so that I can take a look at the PR.

Why doesn't ZFS / pf / anything else loaded as a kernel module work?

I didn't ship a full set of kernel modules on the AMI I built. Most modules are irrelevant (e.g., drivers for devices which don't exist in a paravirtualized world), but I'll add the rest back into a future AMI.

What about other BSDs?

I'm hoping that NetBSD will be available soon. The NetBSD Xen code [EDIT: at least, the paravirtualized code — I haven't looked at their HVM support] is in a much better state than FreeBSD's Xen code, and I had actually expected to announce a NetBSD AMI first; but we ran into a problem a few months ago which I'm working with a NetBSD developer to fix.

I have no idea if OpenBSD or DragonFlyBSD have any Xen support, but if they do I'd be happy to work with their developers to get them into EC2.

What about other clouds?

I'd be happy to work with other cloud vendors to help them support FreeBSD, especially if they can pay for my time.

Who paid for this work?

I didn't get paid for this. (Or, depending on your point of view, Tarsnap users paid for this work.) Amazon provided me with some AWS credits to pay for the instances I launched while testing the code, but that's all.

A while back I asked people if they could put money towards hiring someone to work on the FreeBSD Xen code, but in the end I just did the work myself.

Where can we send money to support this?

If anyone wants to give me money, I certainly won't object. I can't honestly say that it would result in me getting anything done which I wouldn't do eventually anyway; but money can certainly influence the relative priorities of various tasks.

Alternatively, I'd be very happy to see more people donate to the FreeBSD Foundation, since they're still $140k away from hitting their fundraising target for 2010 — and if you write "please support work on FreeBSD/Xen" in the comments box, there's a good chance that it will somehow end up helping with EC2.

Posted at 2010-12-20 22:50 | Permanent link | Comments
blog comments powered by Disqus

Recent posts

Monthly Archives

Yearly Archives