lkml.org 
[lkml]   [1997]   [Apr]   [28]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    Date
    From
    SubjectRe: Signal 7 and "Couldn't get a free page..."

    On Mon, 28 Apr 1997, Hubert Mantel wrote:

    > > Something like that. I've started getting SIGNAL 7 from GCC since
    > > upgrading to 2.0.30. This happens when I stress test the machine.
    >
    > I got this on three different machines. Everybody would say that it's a
    > classical hardware problem (see http://www.bitwizard.nl/sig11), but too
    > many machines are affected so I cannot believe it's a hardware problem.

    ok, if you can reproduce it easily, could you try the following debug
    patch, it puts the reason for the SIGBUS (signal 7) into the syslog. [well
    there are two more possible reasons for SIGBUS that this patch doesnt
    handle, but they are _very_ unlikely in the case of GCC]

    are all those machines set up by you? Maybe you use the same swapsize or
    similar other stuff, which tickles the same type of memory shortage. But
    anyways, it would be interesting to see what the exact reason for your
    SIGBUS's is.

    the patches are against a vanilla 2.0.30 kernel, cd linux/mm before
    applying them.

    -- mingo

    --- memory.c.original Mon Apr 28 19:30:05 1997
    +++ memory.c Mon Apr 28 19:34:43 1997
    @@ -900,8 +900,10 @@
    */
    page = vma->vm_ops->nopage(vma, address,
    (vma->vm_flags & VM_SHARED)?0:write_access);
    - if (!page)
    + if (!page) {
    + printk("SIGBUS: pinhead, page not mapped.\n");
    goto sigbus;
    + }
    ++tsk->maj_flt;
    ++vma->vm_mm->rss;
    /*
    @@ -928,8 +930,10 @@
    entry = pte_wrprotect(mk_pte(ZERO_PAGE, vma->vm_page_prot));
    if (write_access) {
    unsigned long page = __get_free_page(GFP_KERNEL);
    - if (!page)
    + if (!page) {
    + printk("SIGBUS: ayiee, couldnt allocate page table.\n");
    goto sigbus;
    + }
    memset((void *) page, 0, PAGE_SIZE);
    entry = pte_mkwrite(pte_mkdirty(mk_pte(page, vma->vm_page_prot)));
    vma->vm_mm->rss++;
    --- vmscan.c.original Mon Apr 28 19:31:32 1997
    +++ vmscan.c Mon Apr 28 19:32:12 1997
    @@ -103,8 +103,10 @@
    if (vma->vm_ops && vma->vm_ops->swapout) {
    pid_t pid = tsk->pid;
    vma->vm_mm->rss--;
    - if (vma->vm_ops->swapout(vma, address - vma->vm_start + vma->vm_offset, page_table))
    + if (vma->vm_ops->swapout(vma, address - vma->vm_start + vma->vm_offset, page_table)) {
    + printk("SIGBUS: ayiee, couldnt swap out, no memory.\n");
    kill_proc(pid, SIGBUS, 1);
    + }
    } else {
    if (page_map->count != 1)
    return 0;

    \
     
     \ /
      Last update: 2005-03-22 13:39    [W:0.020 / U:5.028 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site