fedora 25 coredump not being generated

classic Classic list List threaded Threaded
10 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

fedora 25 coredump not being generated

jayshankar nair
Hi,

I have written a snippet of code to generate core dump.

a.c
#include <stdio.h>
main()
{
char **c;
c=10;


}

gcc a.c -o a -g

Run:./a

In fedora 25 after segmentation fault, core dump  file is not being created

I have also set the core file to unlimit with the command ulimit -c unlimited.

Thanks,
Jayshankar

Thanks,
Jayshankar

_______________________________________________
users mailing list -- [hidden email]
To unsubscribe send an email to [hidden email]
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: fedora 25 coredump not being generated

Samuel Sieb
On 06/07/2017 10:03 PM, jayshankar nair wrote:
> In fedora 25 after segmentation fault, *core dump  file is not being
> created*.

Check the logs, the core dump might be getting captured elsewhere.
Normally abrt intercepts them.  There is a way to reset where the kernel
sends them, look at /proc/sys/kernel/core_pattern.
_______________________________________________
users mailing list -- [hidden email]
To unsubscribe send an email to [hidden email]
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: fedora 25 coredump not being generated

jayshankar nair
Hi,

The core_pattern contents in /proc/sys/kernel is as below
|/usr/libexec/abrt-hook-ccpp %s %c %p %u %g %t %P %I.

How to reset the core pattern and generate core dump. I didn't get you. Please show examples.

Thanks,
Jayshankar


On Thursday, June 8, 2017 11:21 AM, Samuel Sieb <[hidden email]> wrote:


On 06/07/2017 10:03 PM, jayshankar nair wrote:

> In fedora 25 after segmentation fault, *core dump  file is not being
> created*.


Check the logs, the core dump might be getting captured elsewhere.
Normally abrt intercepts them.  There is a way to reset where the kernel
sends them, look at /proc/sys/kernel/core_pattern.
_______________________________________________
users mailing list -- [hidden email]
To unsubscribe send an email to [hidden email]




_______________________________________________
users mailing list -- [hidden email]
To unsubscribe send an email to [hidden email]
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: fedora 25 coredump not being generated

Samuel Sieb
On 06/07/2017 11:45 PM, jayshankar nair wrote:
> The core_pattern contents in /proc/sys/kernel is as below
> |/usr/libexec/abrt-hook-ccpp %s %c %p %u %g %t %P %I.

Right, so abrt will be grabbing them.  Check in your logs to see if it's
putting them somewhere.

> How to reset the core pattern and generate core dump. I didn't get you.
> Please show examples.

You can write a new pattern to that "file".  Do a Google search on that
filename, there are lots of pages.  You can also do "man core" for details.
_______________________________________________
users mailing list -- [hidden email]
To unsubscribe send an email to [hidden email]
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: fedora 25 coredump not being generated

Matthew Miller-2
In reply to this post by jayshankar nair
On Thu, Jun 08, 2017 at 05:03:22AM +0000, jayshankar nair wrote:
> In fedora 25 after segmentation fault, core dump  file is not being created. 
> I have also set the core file to unlimit with the command ulimit -c unlimited.

Check out this feature coming in F26:
https://fedoraproject.org/wiki/Changes/coredumpctl

This lets you use coredumpctl, which is really nifty.


--
Matthew Miller
<[hidden email]>
Fedora Project Leader
_______________________________________________
users mailing list -- [hidden email]
To unsubscribe send an email to [hidden email]
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: fedora 25 coredump not being generated

Tom Horsley-5
In reply to this post by Samuel Sieb
I've worked out a technique for getting core files
back to "normal"

First I dnf erase everything with "abrt" in the name (or
at least everything I can erase which doesn't try to take
the whole system with it).

You'd think that would be enough, but no!
That leaves systemd stealing the core files now.

So the next step is to

echo "kernel.core_pattern = core" >> /etc/sysctl.conf

After a reboot core files are back to traditional
operation.

P.S. I know there is a /etc/sysctl.d/ directory,
but nothing I put in there ever seemed to make
core files work, so I fell back to /etc/sysctl.conf
_______________________________________________
users mailing list -- [hidden email]
To unsubscribe send an email to [hidden email]
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: fedora 25 coredump not being generated

jayshankar nair
In reply to this post by jayshankar nair
Hi,
 The problem of core dump not being generated still persists. What should i do to generate a core file.

Thanks,
Jayshankar



On Thursday, June 8, 2017 12:15 PM, jayshankar nair <[hidden email]> wrote:


Hi,

The core_pattern contents in /proc/sys/kernel is as below
|/usr/libexec/abrt-hook-ccpp %s %c %p %u %g %t %P %I.

How to reset the core pattern and generate core dump. I didn't get you. Please show examples.

Thanks,
Jayshankar


On Thursday, June 8, 2017 11:21 AM, Samuel Sieb <[hidden email]> wrote:


On 06/07/2017 10:03 PM, jayshankar nair wrote:

> In fedora 25 after segmentation fault, *core dump  file is not being
> created*.


Check the logs, the core dump might be getting captured elsewhere.
Normally abrt intercepts them.  There is a way to reset where the kernel
sends them, look at /proc/sys/kernel/core_pattern.
_______________________________________________
users mailing list -- [hidden email]
To unsubscribe send an email to [hidden email]






_______________________________________________
users mailing list -- [hidden email]
To unsubscribe send an email to [hidden email]
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: fedora 25 coredump not being generated

Samuel Sieb
On 06/10/2017 10:30 PM, jayshankar nair wrote:
>   The problem of core dump not being generated still persists. What
> should i do to generate a core file.

Did you check out "man core"?  Did you look in journalctl to see if abrt
was putting them somewhere?  Did you search about
"/proc/sys/kernel/core_pattern"?
_______________________________________________
users mailing list -- [hidden email]
To unsubscribe send an email to [hidden email]
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: fedora 25 coredump not being generated

Tom Horsley-5
On Mon, 12 Jun 2017 15:02:50 -0700
Samuel Sieb wrote:

> Did you check out "man core"?  Did you look in journalctl to see if abrt
> was putting them somewhere?  Did you search about
> "/proc/sys/kernel/core_pattern"?

I don't know if or when they fixed it, but at some point
systemd also squashed core files in /etc/systemd/system.conf
by changing DefaultLimitCORE. They made it impossible
for a user to run "ulimit -c unlimited". I had to set:

DefaultLimitCORE=0:infinity

to make it possible to change my ulimit in a user session.

My complete set of changes I now make to my system to restore
traditional core file behavior is:

systemctl list-unit-files | fgrep abrt

Then do a

systemctl mask whatever.service

for all the "whatever"s that fgrep found

edit /etc/sysctl.conf add as last line
kernel.core_pattern = core

edit /etc/systemd/system.conf and set
DefaultLimitCORE=0:infinity

reboot system and you should now get "normal" core files.
_______________________________________________
users mailing list -- [hidden email]
To unsubscribe send an email to [hidden email]
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: fedora 25 coredump not being generated

Tom Horsley-5
On Mon, 12 Jun 2017 18:29:07 -0400
Tom Horsley wrote:

> I don't know if or when they fixed it, but at some point
> systemd also squashed core files in /etc/systemd/system.conf
> by changing DefaultLimitCORE. They made it impossible
> for a user to run "ulimit -c unlimited".

Actually I remembered that backward. The systemd change
made every single program that failed leave core files
everywhere (an equally bad change as totally preventing them).
I just read through the bugzilla again:

https://bugzilla.redhat.com/show_bug.cgi?id=1309172

The setting of:

DefaultLimitCORE=0:infinity

made them be off by default, but allowed me to turn them on
via ulimit when I actually wanted a core file.
_______________________________________________
users mailing list -- [hidden email]
To unsubscribe send an email to [hidden email]
Loading...