hello,every one:
我的系统环境是:
system:centos 6.3 x86_64
kernel:Linux localhost 2.6.32-279.el6.x86_64 #1 SMP Fri Jun 22 12:19:21 UTC 2012 x86_64 x86_64 x86_64 GNU/Linux
stap -V:
Systemtap translator/driver (version 2.4/0.152, non-git sources)
enabled features: TR1_UNORDERED_MAP NLS
rpm -qa|grep kernel:
kernel-debuginfo-common-x86_64-2.6.32-279.el6.x86_64
kernel-2.6.32-279.el6.x86_64
kernel-headers-2.6.32-279.el6.x86_64
kernel-debuginfo-2.6.32-279.el6.x86_64
kernel-firmware-2.6.32-279.el6.noarch
dracut-kernel-004-283.el6.noarch
kernel-devel-2.6.32-279.el6.x86_64
/usr/local/nginx/sbin/nginx -v:
nginx version: nginx/1.4.4
ps -ef|grep nginx
nobody 2080 2079 0 13:18 ? 00:00:00 nginx: worker process
问题:
当我执行
./sample-bt -p 2080 -u -t 5 >a.bt
报错,在pass 4的时候报错,报错内容如下:
gcc: 内部错误:已杀死 (程序 cc1)
请提交一份完整的错误报告。
具体步骤请参见 <http://bugzilla.redhat.com/bugzilla>。
make[1]: *** [/tmp/stapuZrcYR/stap_0df1b43dbb169a80ee2a151bbcd6e476_6388_src.o] 错误 1
make: *** [_module_/tmp/stapuZrcYR] 错误 2
WARNING: kbuild exited with status: 2
Pass 4: compilation failed. [man error::pass4]
我将其stap源码dump下来,直接用stap执行,报错信息如下:
./sample-bt -p 2080 -u -t 5 -d >a.stp:
probe begin {
warn(sprintf("Tracing %d (/usr/local/nginx/sbin/nginx) in user-space only...\n", target()))
}
global bts;
global quit = 0;
probe timer.profile {
if (pid() == target()) {
if (!quit) {
bts[ubacktrace()] <<< 1;
} else {
foreach (bt in bts- limit 1024) {
print_ustack(bt);
printf("\t%d\n", @count(bts[bt]));
}
exit()
}
}
}
probe timer.s(5) {
nstacks = 0
foreach (bt in bts limit 1) {
nstacks++
}
if (nstacks == 0) {
warn("No backtraces found. Quitting now...\n")
exit()
} else {
warn("Time's up. Quitting now...(it may take a while)\n")
quit = 1
}
}
执行代码报错:
stap -v a.stp:
Pass 1: parsed user script and 96 library script(s) using 149516virt/25224res/2136shr/23872data kb, in 80usr/100sys/294real ms.
Pass 2: analyzed script: 3 probe(s), 10 function(s), 3 embed(s), 2 global(s) using 283984virt/27672res/3300shr/24984data kb, in 20usr/600sys/3367real ms.
Pass 3: translated to C into "/tmp/stapAcXu4x/stap_fa0509c561a58db16e17179146219025_4682_src.c" using 284848virt/35820res/8132shr/28392data kb, in 370usr/50sys/663real ms.
gcc: 内部错误:已杀死 (程序 cc1)
请提交一份完整的错误报告。
具体步骤请参见 <http://bugzilla.redhat.com/bugzilla>。
make[1]: *** [/tmp/stapAcXu4x/stap_fa0509c561a58db16e17179146219025_4682_src.o] 错误 1
make: *** [_module_/tmp/stapAcXu4x] 错误 2
WARNING: kbuild exited with status: 2
Pass 4: compiled C into "stap_fa0509c561a58db16e17179146219025_4682.ko" in 6420usr/4640sys/34765real ms.
Pass 4: compilation failed. [man error::pass4]
麻烦各位大哥帮我看看是什么原因,非常感谢!!