public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Timo Sirainen <tss@iki.fi>
To: linux-kernel@vger.kernel.org
Subject: Unkillable gdb process gets system unusably slow
Date: Fri, 23 Nov 2007 06:54:55 +0200	[thread overview]
Message-ID: <1195793695.3843.7.camel@hurina> (raw)

[-- 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 --]

             reply	other threads:[~2007-11-23  4:55 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-11-23  4:54 Timo Sirainen [this message]
2007-11-23 13:23 ` Unkillable gdb process gets system unusably slow Duane Griffin

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1195793695.3843.7.camel@hurina \
    --to=tss@iki.fi \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox