lkml.org 
[lkml]   [2004]   [Sep]   [20]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: lost memory on a 4GB amd64
    On Mon, 20 Sep 2004, Sergei Haller (SH) wrote:

    SH> On Sun, 19 Sep 2004, Jon Masters (JM) wrote:
    SH>
    SH> JM> On Mon, 20 Sep 2004 07:47:20 +1000 (EST), Sergei Haller
    SH> JM>
    SH> JM> > I guess I should write a simple C-program using malloc or something to
    SH> JM> > reproduce the crash in the simplest possible way, shouldn't I?

    here we go again. that's the program I wrote:
    --------------------------------------------------------------
    #include <stdlib.h>
    int main(int argc, char **argv) {
    unsigned long long int bytes;
    char *mem;
    if (argc < 2)
    bytes = 0x40000000; // 1gb
    else
    bytes = strtoll(argv[1], NULL, 10);
    printf("allocate %llu: ", bytes);

    if (mem = malloc(bytes))
    {
    printf("ok\n");
    printf("set them to 0... ");
    memset(mem,0,bytes);

    printf("done\n");

    }
    else
    printf("not ok\n");
    return 0;
    }
    --------------------------------------------------------------
    and that's the log:

    fang ~sergei> ./memtest 10000
    allocate 10000: ok
    set them to 0... done
    fang ~sergei> ./memtest 100000
    allocate 100000: ok
    set them to 0... done
    fang ~sergei> ./memtest 1000000
    allocate 1000000: ok
    set them to 0... done
    fang ~sergei> ./memtest 10000000
    allocate 10000000: ok
    set them to 0... done
    fang ~sergei> ./memtest 100000000
    allocate 100000000: ok
    set them to 0... done
    fang ~sergei> ./memtest 1000000000
    allocate 1000000000: ok
    Message from syslogd@fang at Mon Sep 20 18:03:16 2004 ...
    fang kernel: Oops: 0000 [1] PREEMPT SMP

    Attached is the full OOPS excerpt from /var/log/messages


    Sergei
    --
    -------------------------------------------------------------------- -?)
    eMail: Sergei.Haller@math.uni-giessen.de /\\
    -------------------------------------------------------------------- _\_V
    Be careful of reading health books, you might die of a misprint.
    -- Mark TwainSep 20 18:03:16 fang kernel: Unable to handle kernel NULL pointer dereference at 0000000000000e70 RIP:
    Sep 20 18:03:16 fang kernel: <ffffffff8016a8e1>{pte_alloc_map+193}
    Sep 20 18:03:16 fang kernel: PML4 13f7a0067 PGD 13b439067 PMD 0
    Sep 20 18:03:16 fang kernel: Oops: 0000 [1] PREEMPT SMP
    Sep 20 18:03:16 fang kernel: CPU 1
    Sep 20 18:03:16 fang kernel: Modules linked in: sg af_packet raw ide_floppy ide_tape ide_cd floppy ipt_TOS ipt_REJECT ipt_LOG ipt_state ip_nat_irc ip_nat_tftp ip_nat_ftp ip_conntrack_irc ip_conntrack_tftp ip_conntrack_ftp ipt_multiport ipt_conntrack iptable_filter iptable_mangle iptable_nat ip_conntrack ip_tables ohci1394 ieee1394 rtc
    Sep 20 18:03:16 fang kernel: Pid: 3264, comm: memtest Not tainted 2.6.8.1
    Sep 20 18:03:16 fang kernel: RIP: 0010:[<ffffffff8016a8e1>] <ffffffff8016a8e1>{pte_alloc_map+193}
    Sep 20 18:03:16 fang kernel: RSP: 0000:000001013bc7ddc8 EFLAGS: 00010213
    Sep 20 18:03:16 fang kernel: RAX: ffffffff7fffffff RBX: 0000002ac7000000 RCX: 0000000000000018
    Sep 20 18:03:16 fang kernel: RDX: 0000010109c97000 RSI: 0000000000000000 RDI: 0000010109c98000
    Sep 20 18:03:16 fang kernel: RBP: 000001013f00d000 R08: 000001000000e000 R09: 0000000000000000
    Sep 20 18:03:16 fang kernel: R10: 0000002a9566ca88 R11: 0000002a956f0820 R12: 0000000000000000
    Sep 20 18:03:16 fang kernel: R13: 0000010110c5e1c0 R14: 0000010110c5e1c0 R15: 000001013ec1edb0
    Sep 20 18:03:16 fang kernel: FS: 0000002a958bf4c0(0000) GS:ffffffff806bbc40(0000) knlGS:0000000000000000
    Sep 20 18:03:16 fang kernel: CS: 0010 DS: 0000 ES: 0000 CR0: 000000008005003b
    Sep 20 18:03:16 fang kernel: CR2: 0000000000000e70 CR3: 000000013ff9a000 CR4: 00000000000006e0
    Sep 20 18:03:16 fang kernel: Process memtest (pid: 3264, threadinfo 000001013bc7c000, task 000001013ec1edb0)
    Sep 20 18:03:16 fang kernel: Stack: 000001013f00d000 000001013f7a0558 000001013f00d000 0000002ac7000000
    Sep 20 18:03:16 fang kernel: 000001013bc7df58 ffffffff8016ab12 0000002a956f0820 0000002a9566ca88
    Sep 20 18:03:16 fang kernel: 0000000000000000 0000000000000000
    Sep 20 18:03:16 fang kernel: Call Trace:<ffffffff8016ab12>{handle_mm_fault+258} <ffffffff80123174>{do_page_fault+452}
    Sep 20 18:03:16 fang kernel: <ffffffff804c0b3b>{schedule+219} <ffffffff8033db49>{tty_write+777}
    Sep 20 18:03:16 fang kernel: <ffffffff80111361>{error_exit+0}
    Sep 20 18:03:16 fang kernel:
    Sep 20 18:03:16 fang kernel: Code: 48 8b 8e 70 0e 00 00 76 07 b8 00 00 00 80 eb 0a 48 b8 00 00
    Sep 20 18:03:16 fang kernel: RIP <ffffffff8016a8e1>{pte_alloc_map+193} RSP <000001013bc7ddc8>
    Sep 20 18:03:16 fang kernel: CR2: 0000000000000e70
    Sep 20 18:03:16 fang kernel: <1>Unable to handle kernel NULL pointer dereference at 0000000000000e70 RIP:
    Sep 20 18:03:16 fang kernel: <ffffffff8016a05c>{unmap_vmas+860}
    Sep 20 18:03:16 fang kernel: PML4 13f7a0067 PGD 13b439067 PMD 0
    Sep 20 18:03:16 fang kernel: Oops: 0000 [2] PREEMPT SMP
    Sep 20 18:03:16 fang kernel: CPU 1
    Sep 20 18:03:16 fang kernel: Modules linked in: sg af_packet raw ide_floppy ide_tape ide_cd floppy ipt_TOS ipt_REJECT ipt_LOG ipt_state ip_nat_irc ip_nat_tftp ip_nat_ftp ip_conntrack_irc ip_conntrack_tftp ip_conntrack_ftp ipt_multiport ipt_conntrack iptable_filter iptable_mangle iptable_nat ip_conntrack ip_tables ohci1394 ieee1394 rtc
    Sep 20 18:03:16 fang kernel: Pid: 3264, comm: memtest Not tainted 2.6.8.1
    Sep 20 18:03:16 fang kernel: RIP: 0010:[<ffffffff8016a05c>] <ffffffff8016a05c>{unmap_vmas+860}
    Sep 20 18:03:16 fang kernel: RSP: 0000:000001013bc7dab8 EFLAGS: 00010217
    Sep 20 18:03:16 fang kernel: RAX: 00000000000000e0 RBX: 000000000007d000 RCX: 0000000000000000
    Sep 20 18:03:16 fang kernel: RDX: 0000000000109c00 RSI: 0000000000000000 RDI: 0000010004a3dfc8
    Sep 20 18:03:16 fang kernel: RBP: 000001010a296b48 R08: 000001000000e400 R09: 000001013bc7db90
    Sep 20 18:03:16 fang kernel: R10: 0000000000000001 R11: 0000000000aaaaaa R12: 0000000000114000
    Sep 20 18:03:16 fang kernel: R13: 0000000000000020 R14: 0000000000000000 R15: 0000000000000000
    Sep 20 18:03:16 fang kernel: FS: 0000002a958bf4c0(0000) GS:ffffffff806bbc40(0000) knlGS:0000000000000000
    Sep 20 18:03:16 fang kernel: CS: 0010 DS: 0000 ES: 0000 CR0: 000000008005003b
    Sep 20 18:03:16 fang kernel: CR2: 0000000000000e70 CR3: 000000013ff9a000 CR4: 00000000000006e0
    Sep 20 18:03:16 fang kernel: Process memtest (pid: 3264, threadinfo 000001013bc7c000, task 000001013ec1edb0)
    Sep 20 18:03:16 fang kernel: Stack: 0000002b06eec000 0000002ac70e6000 0000010110c5e1b8 0000002ac6eec000
    Sep 20 18:03:16 fang kernel: 000001013f7a0558 0000002ac70e6000 000001000564b100 00000000001fa000
    Sep 20 18:03:16 fang kernel: 0000002ad126d000 0000000900000000
    Sep 20 18:03:16 fang kernel: Call Trace:<ffffffff8016ce8a>{exit_mmap+186} <ffffffff801378a0>{mmput+128}
    Sep 20 18:03:16 fang kernel: <ffffffff8013cce5>{do_exit+597} <ffffffff80111fea>{oops_end+74}
    Sep 20 18:03:16 fang kernel: <ffffffff8012347b>{do_page_fault+1227} <ffffffff80132288>{recalc_task_prio+440}
    Sep 20 18:03:16 fang kernel: <ffffffff8015cdf4>{__rmqueue+228} <ffffffff80111361>{error_exit+0}
    Sep 20 18:03:16 fang kernel: <ffffffff8016a8e1>{pte_alloc_map+193} <ffffffff8016a885>{pte_alloc_map+101}
    Sep 20 18:03:16 fang kernel: <ffffffff8016ab12>{handle_mm_fault+258} <ffffffff80123174>{do_page_fault+452}
    Sep 20 18:03:16 fang kernel: <ffffffff804c0b3b>{schedule+219} <ffffffff8033db49>{tty_write+777}
    Sep 20 18:03:16 fang kernel: <ffffffff80111361>{error_exit+0}
    Sep 20 18:03:16 fang kernel:
    Sep 20 18:03:16 fang kernel: Code: 48 2b 91 70 0e 00 00 48 8d 04 d5 00 00 00 00 48 29 d0 48 8b
    Sep 20 18:03:16 fang kernel: RIP <ffffffff8016a05c>{unmap_vmas+860} RSP <000001013bc7dab8>
    Sep 20 18:03:16 fang kernel: CR2: 0000000000000e70
    Sep 20 18:03:16 fang kernel: <6>note: memtest[3264] exited with preempt_count 1
    Sep 20 18:03:16 fang kernel: Unable to handle kernel NULL pointer dereference at 0000000000000028 RIP:
    Sep 20 18:06:01 fang syslogd 1.4.1: restart.
    \
     
     \ /
      Last update: 2005-03-22 14:06    [from the cache]
    ©2003-2014 Jasper Spaans. Advertise on this site