From: Li Zefan <lizf@cn.fujitsu.com>
To: Ingo Molnar <mingo@elte.hu>, Peter Zijlstra <peterz@infradead.org>
Cc: Frederic Weisbecker <fweisbec@gmail.com>,
Arnaldo Carvalho de Melo <acme@redhat.com>,
Paul Mackerras <paulus@samba.org>,
LKML <linux-kernel@vger.kernel.org>
Subject: [BUG] perf: hard lockup when using perf-sched
Date: Wed, 17 Mar 2010 15:21:16 +0800 [thread overview]
Message-ID: <4BA082EC.8030101@cn.fujitsu.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 374 bytes --]
An idea came to me that running perf-sched with a fork "bomb" might
reveal some bug.
So I wrote a program (attached), and did the following test:
# gcc fork.c
# ./a.out &
# perf sched record
After a few seconds, the machine froze, without printing any message.
I've tried the test both on v2.6.34-rc1 and v2.6.34-rc1-tip+.
I'll send you any other information you need.
[-- Attachment #2: fork.c --]
[-- Type: text/plain, Size: 404 bytes --]
#include <unistd.h>
#include <stdlib.h>
#include <stdio.h>
#include <sys/types.h>
#include <sys/wait.h>
int main(void)
{
int i;
int pid;
while (1) {
for (i = 0; i < 400; i++) {
pid = fork();
if (pid == 0) {
return 0;
} else if (pid < 0) {
fprintf(stderr, "faild to fork!\n");
continue;
}
}
for (i = 0; i < 400; i++)
if (wait(NULL) < 0)
break;
}
return 0;
}
next reply other threads:[~2010-03-17 7:20 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-03-17 7:21 Li Zefan [this message]
2010-03-24 5:52 ` [BUG] perf: hard lockup when using perf-sched Li Zefan
2010-03-24 7:32 ` Mike Galbraith
2010-03-24 8:17 ` Mike Galbraith
2010-03-25 8:04 ` Li Zefan
2010-03-25 9:27 ` Mike Galbraith
2010-03-25 9:54 ` Peter Zijlstra
2010-03-26 10:11 ` Mike Galbraith
2010-03-26 17:23 ` Frederic Weisbecker
2010-03-26 19:10 ` Mike Galbraith
2010-03-26 19:27 ` Frederic Weisbecker
2010-03-26 20:22 ` Mike Galbraith
2010-03-26 21:41 ` Frederic Weisbecker
2010-03-26 21:45 ` Frederic Weisbecker
2010-03-29 2:01 ` Li Zefan
2010-04-02 19:07 ` [tip:perf/core] perf: Fix 'perf sched record' deadlock tip-bot for Mike Galbraith
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=4BA082EC.8030101@cn.fujitsu.com \
--to=lizf@cn.fujitsu.com \
--cc=acme@redhat.com \
--cc=fweisbec@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=paulus@samba.org \
--cc=peterz@infradead.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