CORE DUMPS: How to Generate/Enable ?

CORE DUMPS: How to Generate/Enable ?

Post by Tony Wetmor » Thu, 29 Aug 1996 04:00:00



Hi, I hope this newsgroup is appropriate enough for a
hopefully simple Linux development question.

I am using Linux as a development platform at work but
for some reason, Linux does NOT generate a coredump
when a program crashes.

It would be nice to say, "Well, that's because no
programs are ever crashing."  Unfortunately, that is
not the case.  :)

Is there something I need to do in the kernel, or
compiler (gcc) to enable coredumps or something?

In my understanding the abort() function should always
generate a coredump, yet no core file is created by the
following program:

   #include <stdlib.h>

   int main( int argc, char * argv[] )
   {
      abort();
      return 0;
   }

When that program is compiled and run on HP/UX version
9.05, it DOES generate a coredump.  So, theoretically
that program "works."

Unless the core files are being very cleverly hidden
someplace on my system and I simply cannot find them,
of course.  :)

I'm running Linux version 1.2.13 (outdated, I'm sure!)
and using gcc version 2.7.0 on this machine.

Thanks for your help!

--
 +====================+==============================+

 |     Programmer     +------------------------------+
 | Kesmai Corporation | Opinions are mine, ALL mine! |
 +====================+==============================+

 
 
 

CORE DUMPS: How to Generate/Enable ?

Post by G Sumner Haye » Thu, 29 Aug 1996 04:00:00



> I am using Linux as a development platform at work but
> for some reason, Linux does NOT generate a coredump
> when a program crashes.

Your shell has limited coredump size to zero.  I believe that
Slackware does this by default.  

If you're using tcsh, use the following command:

limit coredumpsize 0

If you're using bash or zsh, use this:

ulimit -c 0

You will probably want to put the appropriate command in your .tcshrc,
.profile, or .zshrc to get it to happen automatically at login.

Hope this helps,

  Sumner Hayes


 
 
 

CORE DUMPS: How to Generate/Enable ?

Post by Markus Gutschk » Fri, 30 Aug 1996 04:00:00




> > I am using Linux as a development platform at work but for some
> > reason, Linux does NOT generate a coredump when a program crashes.

> If you're using tcsh, use the following command:

> limit coredumpsize 0

> If you're using bash or zsh, use this:

> ulimit -c 0

> You will probably want to put the appropriate command in your .tcshrc,
> .profile, or .zshrc to get it to happen automatically at login.

Of course, the "0" should be replaced with "unlimited" in all of the
above examples. Besides, if you want to enable coredumps system-wide,
you can put these commands into /etc/profile. As Linux usually uses
bash as /bin/sh, you would have to add "ulimit -c unlimited".

Markus

 
 
 

CORE DUMPS: How to Generate/Enable ?

Post by Tony Wetmor » Sat, 31 Aug 1996 04:00:00




Quote:> Of course, the "0" should be replaced with "unlimited" in all of the
> above examples. Besides, if you want to enable coredumps system-wide,
> you can put these commands into /etc/profile. As Linux usually uses
> bash as /bin/sh, you would have to add "ulimit -c unlimited".

Ahhhhh, thank you.  I had tried using the "ulimit -c unlimited"
command manually, and it didn't appear to work.  Putting the
command into /etc/profile seems to have done the trick, however.

--
 +====================+==============================+

 |     Programmer     +------------------------------+
 | Kesmai Corporation | Opinions are mine, ALL mine! |
 +====================+==============================+

 
 
 

CORE DUMPS: How to Generate/Enable ?

Post by Or » Sat, 31 Aug 1996 04:00:00




>Hi, I hope this newsgroup is appropriate enough for a
>hopefully simple Linux development question.

>I am using Linux as a development platform at work but
>for some reason, Linux does NOT generate a coredump
>when a program crashes.

   $ ulimit -c unlimited

                 ____

                  \/

 
 
 

1. dump core or not dump core

Howdy,

Some of my programs dump core, others don't. I tried
it on RedHat 6.1 and Mandrake 7.0 with kernels 2.2.14
and 2.2.15. I tried tcsh and bash with coredumpsize
set to 1GB. It seems to be application specific.

Is there any other criteria when suppressing apart from
the type of signal and the size limitation?
The application that doesn't dump core contains signal
handlers for some signals, but not for SEGV or ABRT.

Ruppert

 -----------------------------------------------------------------

 Dept of Elec. & Comp. Engr.    http://alpha.ece.ucsb.edu/~ruppert
 University of California       Phone: (805) 893-7788
 Santa Barbara, CA 93106        Fax:   (805) 893-3262
 -----------------------------------------------------------------

2. tunelp and Kernel 2.2.5

3. core dumps core dumps everywhere...

4. Dialup & ADSL for load balancing and backup

5. diald generates memory errors and core dumps

6. Lucent NIC with Linksys WAP11

7. How to generate core dump of application

8. Help using DHCPCD on Eth0 from RH5.0, please!

9. abort() doesn't generate a core dump?

10. gcc-2.95.2 generates code which core dumps (when dynamic linking)

11. How to enable core dumps from root on Linux

12. Enabling core dumps in child processes

13. Enabling core dumps for setuid programs