Davidea
Davidea

Reputation: 31

core dump , apport , no crash report

i'm using ubuntu 12.04 , and i've an application that when i run , exit with :

./ardrone_navigation 
Setting locale to en_GB.UTF-8
Errore di segmentazione (core dump creato)

the problem is the same if i run it like normal user or root

, but i cant' find the core dump ..... , i've checked

cat /proc/sys/kernel/core_pattern
|/usr/share/apport/apport %p %s %c

but

apport-cli 
Nessuna segnalazione di crash pendente. Provare --help per maggiori informazioni.
(no crash pending) 

then i try with

strace ./ardrone_navigation

and now , i've a lot of output to the consolle, and if i run again apport-cli , it have a report but for strace program ....

why? what i need to know? (i'm new to this problem)

the strace last line are

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)

and the dmsg is :

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

filled only when i don't call it trought strace

thanks davide

Upvotes: 3

Views: 6639

Answers (1)

cjs
cjs

Reputation: 27191

If you want a core dump file, even when core dumps are being sent to apport, ensure that your RLIMIT_CORE setting (often set with ulimit -c) is larger than 0 (and you probably want it large enough that it won't truncate your core dump). apport appears to respect this setting and generate a core file in the current working directory if it's larger than 0.

(I've tested this under Ubuntu 12.04 only.)

Upvotes: 8

Related Questions