[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <e9e943910711230523y2376c908s360bafc19f661d5d@mail.gmail.com>
Date: Fri, 23 Nov 2007 13:23:50 +0000
From: "Duane Griffin" <duaneg@...da.com>
To: "Timo Sirainen" <tss@....fi>
Cc: linux-kernel@...r.kernel.org
Subject: Re: Unkillable gdb process gets system unusably slow
On 23/11/2007, Timo Sirainen <tss@....fi> wrote:
> Fully reproducible with me. v2.6.23.1 x86-64 SMP kernel, Core 2 CPU, gdb
> v6.6.90.20070912-debian.
Fixed in 2.6.23.2, see discussion starting here:
http://marc.info/?l=linux-kernel&m=119379156819358&w=2
> gdb ./hang
> run
> fr 1
> p (char*)base
>
> p command hangs and the entire system becomes unusably slow. kill -9
> doesn't kill gdb.
>
> /* gcc hang.c -o hang -g -Wall */
> #include <stdio.h>
> #include <string.h>
> #include <fcntl.h>
> #include <unistd.h>
> #include <sys/mman.h>
>
> int main(void)
> {
> int fd;
> char buf[100];
> void *base;
>
> fd = open("hang.tmp", O_RDWR | O_CREAT, 0600);
> if (fd == -1) perror("open");
>
> base = mmap(NULL, 100, PROT_READ|PROT_WRITE, MAP_SHARED, fd, 0);
> if (base == MAP_FAILED)
> perror("mmap");
> memcpy(buf, base, sizeof(buf));
> return 0;
> }
Cheers,
Duane.
--
"I never could learn to drink that blood and call it wine" - Bob Dylan
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists