mailarchive of the ptxdist mailing list
 help / color / mirror / Atom feed
From: "Morand, Guy" <Guy.Morand@comet.ch>
To: "ptxdist@pengutronix.de" <ptxdist@pengutronix.de>
Subject: [ptxdist] core dump
Date: Tue, 17 Mar 2015 14:54:17 +0000	[thread overview]
Message-ID: <68AC191B3EB2874F99C36CD9CA3A6D42192F33@cgpmbx01.comet.ch> (raw)

Ok I found the problem ...

There was a configuration missing inside the kernel:
CONFIG_ELF_CORE
General setup  --->
  -*- Configure standard kernel features (expert users)  --->
    [*]   Enable ELF core dumps

Now it's working as expected, sorry for all the noise!

Kind regards,

Guy Morand
-----Ursprüngliche Nachricht-----
Von: Morand, Guy 
Gesendet: Dienstag, 17. März 2015 12:55
An: 'ptxdist@pengutronix.de'
Betreff: core dump

Hello ptxdist developers,

My application is crashing and I cannot get the core dump. To narrow down the problem, I wrote a simple program:
int main(int argc, char* argv[])
{
  int *a = 0;
  *a = 0;
  return 0;
}

Then I make sure that the core dump is generated correctly:
# ulimit -c unlimited
# echo /tmp/%e.%p.core > /proc/sys/kernel/core_pattern # ulimit -c unlimited # cat /proc/sys/kernel/core_pattern /tmp/%e.%p.core

Run my test buggy software:
# ./test
Segmentation fault

And no core dump is generated:
# ls /tmp/

I was expecting to have an indication about the core dump being generated on segmentation fault, as it happens on my host system, I have this error message: 
Segmentation fault (core dumped)

Core dump is activated in the kernel:
$ cat .config | grep COREDUMP
CONFIG_COREDUMP=y

I have no setui, setgid bit set for my application:
# ls -l 
-rwxr-xr-x    1 xuser    1000         10481 Mar 17 11:25 test

Moreover, I'm pretty sure there is enough space in temp to generate the core
dump:
# df -h
Filesystem                Size      Used Available Use% Mounted on
192.168.3.10:/home/admin/bsp/platform-ifc/root
                         25.3G     21.1G      2.9G  88% /
devtmpfs                 61.1M         0     61.1M   0% /dev
tmpfs                    61.1M         0     61.1M   0% /dev/shm
tmpfs                    61.1M    124.0K     61.0M   0% /run
tmpfs                    61.1M         0     61.1M   0% /sys/fs/cgroup
none                     61.1M         0     61.1M   0% /var/tmp
none                     61.1M         0     61.1M   0% /var/lock
tmpfs                    61.1M    124.0K     61.0M   0% /var/run
none                     61.1M    632.0K     60.5M   1% /var/log
none                     61.1M      4.0K     61.1M   0% /tmp
/dev/sda1                 7.5G      1.3M      7.5G   0% /mnt/usbstick

What am I missing?

Kind regards,

Guy

-- 
ptxdist mailing list
ptxdist@pengutronix.de

             reply	other threads:[~2015-03-17 14:54 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-03-17 14:54 Morand, Guy [this message]
  -- strict thread matches above, loose matches on Subject: below --
2015-03-17 11:55 Morand, Guy

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=68AC191B3EB2874F99C36CD9CA3A6D42192F33@cgpmbx01.comet.ch \
    --to=guy.morand@comet.ch \
    --cc=ptxdist@pengutronix.de \
    /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