28.08.2015 Views

The Design and Implementation of the Anykernel and Rump Kernels

1F3KDce

1F3KDce

SHOW MORE
SHOW LESS
  • No tags were found...

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

214<br />

• We noticed that even in superficially identical setups, such as installations<br />

<strong>of</strong> <strong>the</strong> same OS version in QEMU, different results could be produced. An<br />

example case <strong>of</strong> such a scenario was a test involving rename() on a FAT file<br />

system. In some setups <strong>the</strong> test would simply panic <strong>the</strong> kernel with <strong>the</strong> error<br />

“stack size exceeded” [40]. It was very difficult to start to guess where <strong>the</strong><br />

error was based purely on this information.<br />

To make it easier to find problems, we adjusted <strong>the</strong> ATF test tool to automatically<br />

include a stack trace in <strong>the</strong> report in case <strong>the</strong> test case dumped a core.<br />

Since a rump kernel runs as a regular application <strong>and</strong> a kernel panic causes<br />

a regular core dump, no special support is required for extracting <strong>the</strong> kernel<br />

stack trace. <strong>The</strong> contents <strong>of</strong> <strong>the</strong> test report which motivated this change are<br />

presented in Figure 4.9. <strong>The</strong> tests are run against a production build <strong>of</strong> <strong>the</strong><br />

binaries with compiler optimizations turned on, <strong>and</strong> <strong>the</strong> stacktrace needs to<br />

be examined with that in mind. <strong>The</strong> information from <strong>the</strong> stack trace allowed<br />

us to fix an <strong>of</strong>f-by-one buffer size problem in <strong>the</strong> FAT driver’s rename<br />

routine 18 .<br />

Low overhead<br />

Here we do not look at any particular test case, but ra<strong>the</strong>r <strong>the</strong> NetBSD test suite<br />

as a whole. <strong>The</strong> test suite in 5.99.48 contains a total <strong>of</strong> 2,053 cases. <strong>The</strong>se test<br />

cases bootstrap 911 rump kernels, with each test case using zero, one, or up to 16<br />

rump kernels. Running <strong>the</strong> entire test suite in a NetBSD instance hosted in qemukvm<br />

took 56 minutes on March 31st, 2011 [40]. For comparison, if we assume that<br />

bootstrapping one virtualized OS for testing were to take 4 seconds, bootstrapping<br />

911 instances would take over an hour; this overhead is more than what it took to<br />

run <strong>the</strong> entire test suite.<br />

18 revision 1.72 <strong>of</strong> sys/fs/msdosfs/msdosfs_vnops.c

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!