Re: Simple script that locks up my box with recent kernels



On 22/11/06, Linus Torvalds <torvalds@xxxxxxxx> wrote:


On Wed, 22 Nov 2006, Jesper Juhl wrote:
>
> So it *seems* to be somehow related to running low on RAM and swap
> starting to be used.

Does it happen if you just do some simple "use all memory" script, eg run
a few copies of

#define SIZE (100<<20)

char *buf = malloc(SIZE);
memset(buf, SIZE, 0);
sleep(100);

on your box?


I'll try, when I get home from work. I'll let you know later.


> The box has 2GB of RAM and 768MB swap.

I wonder.. It _used_ to be true that we were pretty good at making swap be
"extra" memory. But maybe we've lost some of that, and we have trouble
with having more physical memory. We could end up in a situation where we
allocate it all very quickly (because we don't actually page it out, we
just allocate backing store for the pages), and we screw something up.

But stupid bugs there should still leave us trivially able to do the SysRQ
things, so..

Well, it's a fact that sysrq works just fine before the lockup but
does not work at all after a lockup, so...


Is it highmem-related? Some bounce-buffering problem while having to swap?

I can try building a kernel without highmem support and see if I can
still cause it to lockup. Would be an interresting datapoint.

I'll also try reproducing the lockup without any swap active to see if
that makes a difference.


What block device driver do you use for the swap device?

It's a swap partition on a IBM Ultra160 10K RPM SCSI disk. The
controller is an Adaptec 29160N. Using the SCSI_AIC7XXX driver.


I don't think we use any irq-disable locking in the VM itself, but I could
imagine some nasty situation with the block device layer getting into a
deadlock with interrupts disabled when it runs out of queue entries and
cannot allocate more memory..

Just let me know what you would like me to try/test to prove/disprove that.

--
Jesper Juhl <jesper.juhl@xxxxxxxxx>
Don't top-post http://www.catb.org/~esr/jargon/html/T/top-post.html
Plain text mails only, please http://www.expita.com/nomime.html
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/



Relevant Pages

  • Re: abnormal OOM killer message
    ... I have got a log message with OOM below. ... one last chance is given to allocate memory before OOM routine is executed. ... Total swap = 81916kB ...
    (Linux-Kernel)
  • Re: abnormal OOM killer message
    ... I have got a log message with OOM below. ... one last chance is given to allocate memory before OOM routine is executed. ... Total swap = 81916kB ...
    (Linux-Kernel)
  • Re: mdconfig using malloc()
    ... kernel memory available. ... Wouldn't allocating 2GB of it to a RAM disk would be okay? ... That should give me 2.5GB of KVM, from which I should be able to safely allocate 2GB to a RAM disk, right? ... I saw some old post advocated using -t swap instead, ...
    (freebsd-questions)
  • Re: PS3: trouble with SPARSEMEM_VMEMMAP and kexec
    ... Call Trace: ... Total swap = 0kB ... a new region of the memory map. ... Subject: sparsemem: sparse_add_one_sectionmay fail to allocate memory ...
    (Linux-Kernel)
  • Re: Heaps and Foreigners
    ... >> can ask for the memory and get a pointer to it. ... cause unfathomable deaths when swap space gets low or is exhausted. ... It's probably because there is some reserve memory to print out errors ... of RAM and disk space) and virtual swap (which is just a number managed ...
    (comp.lang.lisp)