* Unkillable gdb process gets system unusably slow
@ 2007-11-23 4:54 Timo Sirainen
2007-11-23 13:23 ` Duane Griffin
0 siblings, 1 reply; 2+ messages in thread
From: Timo Sirainen @ 2007-11-23 4:54 UTC (permalink / raw)
To: linux-kernel
[-- Attachment #1: Type: text/plain, Size: 683 bytes --]
Fully reproducible with me. v2.6.23.1 x86-64 SMP kernel, Core 2 CPU, gdb
v6.6.90.20070912-debian.
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;
}
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 189 bytes --]
^ permalink raw reply [flat|nested] 2+ messages in thread* Re: Unkillable gdb process gets system unusably slow
2007-11-23 4:54 Unkillable gdb process gets system unusably slow Timo Sirainen
@ 2007-11-23 13:23 ` Duane Griffin
0 siblings, 0 replies; 2+ messages in thread
From: Duane Griffin @ 2007-11-23 13:23 UTC (permalink / raw)
To: Timo Sirainen; +Cc: linux-kernel
On 23/11/2007, Timo Sirainen <tss@iki.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
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2007-11-23 13:24 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-11-23 4:54 Unkillable gdb process gets system unusably slow Timo Sirainen
2007-11-23 13:23 ` Duane Griffin
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox