lkml.org 
[lkml]   [2011]   [May]   [25]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectEasy portable testcase! (Re: Kernel falls apart under light memory pressure (i.e. linking vmlinux))
On Tue, May 24, 2011 at 8:43 PM, KOSAKI Motohiro
<kosaki.motohiro@jp.fujitsu.com> wrote:
>
> Unfortnately, this log don't tell us why DM don't issue any swap io. ;-)
> I doubt it's DM issue. Can you please try to make swap on out of DM?
>
>

I can do one better: I can tell you how to reproduce the OOM in the
comfort of your own VM without using dm_crypt or a Sandy Bridge
laptop. This is on Fedora 15, but it really ought to work on any
x86_64 distribution that has kvm. You'll probably want at least 6GB
on your host machine because the VM wants 4GB ram.

Here's how:

Step 1: Clone git://gitorious.org/linux-test-utils/reproduce-annoying-mm-bug.git

(You can browse here:)
https://gitorious.org/linux-test-utils/reproduce-annoying-mm-bug

Instructions to reproduce the mm bug:

Step 2: Build Linux v2.6.38.6 with config-2.6.38.6 and the patch
0001-Minchan-patch-for-testing-23-05-2011.patch (both files are in the
git repo)

Step 3: cd back to reproduce-annoying-mm-bug

Step 4: Type this.

$ make
$ qemu-kvm -m 4G -smp 2 -kernel <linux_dir>/arch/x86/boot/bzImage
-initrd initramfs.gz

Step 5: Wait for the VM to boot (it's really fast) and then run ./repro_bug.sh.

Step 6: Wait a bit and watch the fireworks. Note that it can take a
couple minutes to reproduce the bug.

Tested on my Sandy Bridge laptop and on a Xeon W3520.

For whatever reason, on my laptop without the VM I can hit the bug
almost instantaneously. Maybe it's because I'm using dm-crypt on my
laptop.

--Andy

P.S. I think that the mk_trivial_initramfs.sh script is cute, and
maybe I'll try to flesh it out and turn it into a real project some
day.


\
 
 \ /
  Last update: 2011-05-25 22:21    [W:0.211 / U:0.060 seconds]
©2003-2017 Jasper Spaans. hosted at Digital OceanAdvertise on this site