mailarchive of the ptxdist mailing list
 help / color / mirror / Atom feed
* [ptxdist] core dump
@ 2015-03-17 14:54 Morand, Guy
  0 siblings, 0 replies; 2+ messages in thread
From: Morand, Guy @ 2015-03-17 14:54 UTC (permalink / raw)
  To: ptxdist

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

^ permalink raw reply	[flat|nested] 2+ messages in thread
* [ptxdist] core dump
@ 2015-03-17 11:55 Morand, Guy
  0 siblings, 0 replies; 2+ messages in thread
From: Morand, Guy @ 2015-03-17 11:55 UTC (permalink / raw)
  To: ptxdist

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

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2015-03-17 14:54 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-03-17 14:54 [ptxdist] core dump Morand, Guy
  -- strict thread matches above, loose matches on Subject: below --
2015-03-17 11:55 Morand, Guy

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox