Messages in this thread | | | Date | Wed, 17 Mar 2010 15:21:16 +0800 | From | Li Zefan <> | Subject | [BUG] perf: hard lockup when using perf-sched |
| |
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. #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; }
| |