我正在使用ubuntu 12.04,我有一个应用程序,当我运行时,退出:
./ardrone_navigation
Setting locale to en_GB.UTF-8
Errore di segmentazione (core dump creato)
如果我像普通用户或root
那样运行它,问题就是一样的,但我找不到核心转储.....,我已经检查了
cat /proc/sys/kernel/core_pattern
|/usr/share/apport/apport %p %s %c
但是
apport-cli
Nessuna segnalazione di crash pendente. Provare --help per maggiori informazioni.
(no crash pending)
然后我尝试
strace ./ardrone_navigation
现在,我有很多输出到consolle,如果我再次运行 apport-cli,它有一个报告但是对于strace程序....
为什么呢?我需要知道什么? (我是这个问题的新手)
最后一行是
open("/usr/lib/locale/locale-archive", O_RDONLY|O_LARGEFILE|O_CLOEXEC) = 5
fstat64(5, {st_mode=S_IFREG|0644, st_size=4455872, ...}) = 0
mmap2(NULL, 4096, PROT_READ, MAP_PRIVATE, 5, 0x432) = 0xb5c5a000
close(5) = 0
fstat64(1, {st_mode=S_IFCHR|0600, st_rdev=makedev(136, 6), ...}) = 0
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb5c59000
write(1, "Setting locale to en_GB.UTF-8\n", 30Setting locale to en_GB.UTF-8) = 30
socket(PF_NETLINK, SOCK_RAW, 0) = 5
bind(5, {sa_family=AF_NETLINK, pid=0, groups=00000000}, 12) = 0
getsockname(5, {sa_family=AF_NETLINK, pid=4221, groups=00000000}, [12]) = 0
time(NULL) = 1351515893
sendto(5, "\24\0\0\0\22\0\1\3\365~\216P\0\0\0\0\0\0\0\0", 20, 0, {sa_family=AF_NETLINK,pid=0, groups=00000000}, 12) = 20
recvmsg(5, {msg_name(12)={sa_family=AF_NETLINK, pid=0, groups=00000000}, msg_iov(1)=[{"\340\3\0\0\20\0\2\0\365~\216P}\20\0\0\0\0\4\3\1\0\0\0I\0\1\0\0\0\0\0"..., 4096}],msg_controllen=0, msg_flags=0}, 0) = 3008
recvmsg(5, {msg_name(12)={sa_family=AF_NETLINK, pid=0, groups=00000000}, msg_iov(1)=[{"\350\3\0\0\20\0\2\0\365~\216P}\20\0\0\0\0\1\0\4\0\0\0C\20\1\0\0\0\0\0"..., 4096}],msg_controllen=0, msg_flags=0}, 0) = 2988
recvmsg(5, {msg_name(12)={sa_family=AF_NETLINK, pid=0, groups=00000000}, msg_iov(1)=[{"\24\0\0\0\3\0\2\0\365~\216P}\20\0\0\0\0\0\0\4\0\0\0C\20\1\0\0\0\0\0"..., 4096}],msg_controllen=0, msg_flags=0}, 0) = 20
sendto(5, "\24\0\0\0\26\0\1\3\366~\216P\0\0\0\0\0\0\0\0", 20, 0, {sa_family=AF_NETLINK, pid=0, groups=00000000}, 12) = 20
recvmsg(5, {msg_name(12)={sa_family=AF_NETLINK, pid=0, groups=00000000}, msg_iov(1)=[{"0\0\0\0\24\0\2\0\366~\216P}\20\0\0\2\10\200\376\1\0\0\0\10\0\1\0\177\0\0\1"..., 4096}], msg_controllen=0, msg_flags=0}, 0) = 228
recvmsg(5, {msg_name(12)={sa_family=AF_NETLINK, pid=0, groups=00000000}, msg_iov(1)=[{"@\0\0\0\24\0\2\0\366~\216P}\20\0\0\n\200\200\376\1\0\0\0\24\0\1\0\0\0\0\0"..., 4096}], msg_controllen=0, msg_flags=0}, 0) = 448
recvmsg(5, {msg_name(12)={sa_family=AF_NETLINK, pid=0, groups=00000000}, msg_iov(1)=[{"\24\0\0\0\3\0\2\0\366~\216P}\20\0\0\0\0\0\0\1\0\0\0\24\0\1\0\0\0\0\0"..., 4096}], msg_controllen=0, msg_flags=0}, 0) = 20
>close(5) = 0
--- SIGSEGV (Segmentation fault) @ 0 (0) ---
+++ killed by SIGSEGV (core dumped) +++
Errore di segmentazione (core dump creato)
和dmsg是:
[ 2650.115445] ardrone_navigat[4026]: segfault at 0 ip 080a99c3 sp bf91c1d0 error 4 in ardrone_navigation[8048000+29b000]
[ 2960.022708] ardrone_navigat[4206]: segfault at 0 ip 080a99c3 sp bfcdeec0 error 4 in ardrone_navigation[8048000+29b000]
[ 3588.294821] ardrone_navigat[4236]: segfault at 0 ip 080a99c3 sp bfedf3b0 error 4 in ardrone_navigation[8048000+29b000]
只有在我不称之为“才能完成”时才会填写
感谢 的Davide
答案 0 :(得分:7)
如果您想要核心转储文件,即使将核心转储发送到apport,也要确保您的RLIMIT_CORE设置(通常使用ulimit -c设置)大于0(并且您可能希望它足够大以至于赢得了'截断你的核心转储)。 apport似乎尊重此设置,并在当前工作目录中生成核心文件,如果它大于0。
(我只在Ubuntu 12.04下进行了测试。)