Jump to content

Turn off core dumps


ffi
 Share

Recommended Posts

If you're finding large core dumps then you have a larger problem aside from turning them on/off, you have some programs that are crashing, apparently without your knowledge, and you should look into that issue as well.

 

As for core dumbs, you can use the ulimit command to limit the size of the dumps:

ulimit -c 0

might work for you. To completely disable core dumping (don't do this if you actually what to figure out why they're being created) you have to edit nux/sched.h. Refer to the definition of INIT_TASK, and also check out linux/resource.h. You'll have to recompile your kernel, I imagine, after such edits. Good luck :)

Link to comment
Share on other sites

I had found the ulimit thing already but it was already set to 0, appearently it is only for programs started from bash.

 

 

I dont really understand the second part with INIT_TASK and stuff.

 

To completely disable core dumping (don't do this if you actually what to figure out why they're being created)

 

The cores are more of a nuisance than a program crashing once in a while....

Link to comment
Share on other sites

The cores are more of a nuisance than a program crashing once in a while....

But it's the program crashing that's creating the core dumps, so the program is the actual problem.

 

I can't explain anymore than I did above. I've never tried to turn off core dumps. All I can say is that I assume you go into /usr/src/linux and look for the specified file(s), and then edit said file(s) - looking specifically for the INIT_TASK variable. The information provided was the result of the standard google search for "disable core dumps".

Link to comment
Share on other sites

But it's the program crashing that's creating the core dumps, so the program is the actual problem.

 

I understand, I don't mind a program crashing once in a while but I do mind them making those cores.....

 

I can't explain anymore than I did above. I've never tried to turn off core dumps. All I can say is that I assume you go into /usr/src/linux and look for the specified file(s), and then edit said file(s) - looking specifically for the INIT_TASK variable. The information provided was the result of the standard google search for "disable core dumps".

 

I don't really want to compile a kernel, god knows how I could mess that up :lol2: I googled some more, some article said to look in /etc/security/limits.conf to turn core dumps off. I hope it works and it wont mess up too much...

Edited by ffi
Link to comment
Share on other sites

The following entry disables core dumps for all users. The PAM-security framework enforces this:

 

*			   hard	core			0

 

You could also replace * by a specific user or a group. I have been running with this for a at least a year without ill effect -- main reason is taht I wouldn't know what to do with a core dump (know the principles; but the last time I worked with debuggers was on a VAX under VMS when the company was still called DEC).

 

I do agree to the statement that just deleting core-dumps (or not allowing them) is sort of a band-aid approach -- the underlying problems/causes are not addressed.

Link to comment
Share on other sites

  • 3 months later...

Maybe, but thanks for the help. I'm not really new to Linux or Programming, but core dumps for anyone except the programmer himself are just a nuisance. I'm playing Planeshift and everytime the program is Quit (even the normal way) I lose 500MB to a core dump. That makes 14 GB a month *G*... And everything crashed when the partition was ful.

 

By the way: NO other distro I know of has active core dumps as a default. If you google for "core dump", you'll find xx pages that show how to ENable them, if you are a programmer and need them.

 

But Tyme's answers aren't really helpful. You can't expect 99.9% of all Linux users (The ones who don't want to analyze ram dumps) to change header files and recompile the kernel.

 

Bye.

PeterPanic

Link to comment
Share on other sites

I couldnt agree more with Tyme. Core dumps are are a sign that some of your applications or your kernel has serious problems and NOT ALL show first up as crashes.

It's a bit like saying that your car is regularly over heating and you get fed up with having to wait every time till it cools down before you can start it again instead of trying to find the problem. Or worse you decide to disconnect the temperature cutout safety feature.

Every time I have started to see core dumps the first thing I did was to download the very latest up updates and if there were none available then I usually deleted the most recent updates one at a time going back to an earlier update.

In EVERY case of core dumps, using one or the other methods got rid of the core dumps.

Every time I experienced core dumps it was after either new packages or updates were installed.

 

So Peter I cannot support you on this one.

 

FFII you have a problem so please don't try to bypass it.

 

Cheers. John.

Link to comment
Share on other sites

Hi!

 

Core dumps are are a sign that some of your applications or your kernel has serious problems

Hmmm... In my case I only have them with xine, when playing corrupted/unsupported videos (from Mandriva 10.0 to 2007.0) and with PlaneShift (nice 3d game, no chance to change versions, but you usually don't mind if games with 0.x.x versions have such glitches)

So - No "serious problems" and nothing with the kernel.

Of course, if that would be a cooker station or a server, you'd be totally right, but many Linux PCs are desktop workstations or multimedia/gaming things, so people aren't so much interested in analyzing slight glitches. Of course, awareness is important, but I don't want to spend my whole life with analyzing and correcting bugs in programs I didn't write :-)

 

Every time I have started to see core dumps the first thing I did was to download the very latest up updates and if there were none available then I usually deleted the most recent updates one at a time going back to an earlier update.

Well, as above. I never had any core dumps with anything else. I'm using relatively stable versions (no cooker), I use the standard kernel. The only problem I had were -in fact - the core dumps. Of course, if hey had 10kB with text description of what happened, not a CD full of data for every time a program ends (in case of PlaneShift), they would be helpful, but the way they are, I just write cronjobs or change the scripts of the programs to automatically delete them and I never see them at all. If I don't delete them, they crash my applications or my plans when the partitions fill up. (Happened to me after starting PlaneShift for a week, everything crashed, as the core dumps took 13 of the 14 GB of the Partition, the "real" content was the other 1 GB...)

 

In EVERY case of core dumps, using one or the other methods got rid of the core dumps.

Every time I experienced core dumps it was after either new packages or updates were installed.

Well, different experiences. I don't doubt what you say, as I really appreciate your postings and almost admire your knowledge, but as I said: Not for mein this case. And obviously not for SuSE, Debian and many other Distributions, as most websites I found talk about: "How to temporarily ENable core dumps IF you are a programmer and want them"... I don't know many people that can analyze core dumps and I'm glad I found this thread here (in my "home" forum) which helped me getting rid of them.

 

FFII you have a problem so please don't try to bypass it.

Well, perhaps it's as few a problem as mine with PS and xine...

 

Ciao,

 

PeterPanic

Link to comment
Share on other sites

I don't doubt what you say, as I really appreciate your postings and almost admire your knowledge...

 

I think Tyme and John gave solid advice. I DO admire their knowledge and ask it quite frequently (although this doesn't pertain to the current discussion).

 

Regardless of how you classify the severity of the core dump, it is still there and you do have a problem that requires fixing. Sorry your favorite game is the cause. I've never examined core dumps (nope, not even once). However, maybe it's worthwhile to look into the problem.

Link to comment
Share on other sites

I don't doubt what you say, as I really appreciate your postings and almost admire your knowledge...

 

I think Tyme and John gave solid advice. I DO admire their knowledge and ask it quite frequently (although this doesn't pertain to the current discussion).

 

Regardless of how you classify the severity of the core dump, it is still there and you do have a problem that requires fixing. Sorry your favorite game is the cause. I've never examined core dumps (nope, not even once). However, maybe it's worthwhile to look into the problem.

 

Yeah but sometimes you just gotta be pragmatic....

One of my progs regualrly core dumps 500MB files too and its a commercial app.

What are my options...?

Change the kernel (might not fix anything)

Stop using an application I paid $160 for (seems like cuting of my nose to spite my face)

Start the thing from a bash script that deleted the core dump after ....

 

Of course, I'd love the devs to fix the damned application but its closed source so nothing I can do...

I'm not exactly happy about it but I think I just gotta be pragmatic...

 

I even have a pretty good idea what's causing it ... because basically some of the libs are statically linked and the problem only occurs with certain versions of lib's installed (on a clean Deb SID it doesn't core dump) but after installing krita and various other stuff it does...

 

From my way of thinking I can start messing about with library versions and I'll probably end up in a whole chain of stuff... or I could deinstall a load of stuff I use and the libs ... but why bother.. I know which app it is and I want to use it because .. well firstly I paid for it and secondly there's nothing opensource that can do the same job as well.

 

Right now everything is working I just have to band-aid the core dumps...

Link to comment
Share on other sites

Heh...yeah the whole paying money definitely presents a dilemma. I'm not advocating ditching the app. I'm also not advocating getting rid of the core dumps. I'm saying just make sure you know what's causing the problem and that there aren't any repercussions from the application failures.

 

Sorry for anything that came off wrong. I'm a "better safe than sorry" kinda guy.

 

Jon

Link to comment
Share on other sites

Hi Gowater. In your case you have established the cause, tried to solve it and now just accept it. Sensible and rational.

 

What we are saying is to not dismiss the problem, try to solve it and if unsolvable then do as you did, sensibly live with it.

 

I get the impression that this has not been done and that is a shame.

 

Chheers. John.

Link to comment
Share on other sites

Hi Gowater. In your case you have established the cause, tried to solve it and now just accept it. Sensible and rational.

 

What we are saying is to not dismiss the problem, try to solve it and if unsolvable then do as you did, sensibly live with it.

 

I get the impression that this has not been done and that is a shame.

 

Chheers. John.

Hi, and John would you guess it its a photo app :D

 

Anyway, I think I know the cause..... but boy did I spend and perhaps waste a lot a time on it....

LOL but in the end closed source its hard to say.... and its one of those apps will always be closed source because of the nature of the algorithms...

 

The hard thing is (IMHO) that certain apps will always be distributed like this with static linked libs just because of the nature of linux. Either they support a single distro and set of libs which is more like a snapshot for something like Debian since its always rollin-rollin or they end up in support hell.

 

theres some other SW I use on linux as well called LightZone which is FREE but not FREE for linux.. the win and mac versions cost money... but they allow the linux version to be packaged and distributed.

The reason I mention this one is because its a java app... and the linux version (I don't know about the others) uses OS decoders for the raw image files (dcraw) so its a bit of a mix n match...

They used to distribute it with and without java... and bearing in mind the linux version is unsupported (officially though they do allow users to post on thier forum) they decided it was just too much hassle distributing the app withiout the bundeled jre.

 

The other app (bibble) I presume distributes the static linked libs for the same reason... but the problem of course is its using to a large extent the same libs as are already present (libtiffxx and libjpgxxxx) etc. etc. so I think... but don't know (and this took a lot of blind experimintation from a almost completely minimal install) that its a version conflict between the libs ...however it stil shouldn't core dump ..GRR ...

 

Problem for me is I put on a different hat when I'm processing photo's.... much as I like messing about under the hood not when I'm just trying to get something done....

This is one reason I don't really have any linux games.... Im not adverse to playing... its just somethings I can't be bothered (anymore) to mess about with just to get working... It must be old age :D I remember spending hours in Dos x.x getting doom to run.... LOL

 

Anyway... I also try not to mess with kernels and stuff... its not I can't its just experience tells me once you do that you have an equal chance of causing another prob... but more importantly (for me) is each time you then upgrade a kernel you have to repeat the whole process... and this already involves work like recompiling nvidia drivers and any other non built-in ones etc.

 

I do agree that its best to solve or at least know what's causing the prob.... its just sometimes its a law of diminishing returns... if you spend a day trying then the chance of finding it after that (for me) starts to go down since its something hidden progressively deeper.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

×
×
  • Create New...