News:

Bored?  Looking to kill some time?  Want to chat with other SMF users?  Join us in IRC chat or Discord

Main Menu

core.**** files

Started by ciaran, October 19, 2005, 08:34:35 AM

Previous topic - Next topic

ciaran

Just doing an ftp backup of my current SMF install and i see two core.**** files at 4mb in size, what is the purpose of them?

Thanks








Ben_S

core files are created when a process goes wrong, eg a segfault. It's basically just the server dumping the contents of ram for diagnostic purposes. You can safely delete them.
Liverpool FC Forum with 14 million+ posts.

Celtland

Is there a way to prevent core files from being created - or an easy way to "debug" them to find out why they're being generated?  For a reason we have not yet identified, they have been showing up in the main SMF forum directory on our server in the last few days/weeks.  Each one is ~20-25MB large and without us knowing about them until yesterday, they completely filled up our server space.  I tried opening one up and besides some intelligible stuff, it mostly looks like when you open up a pic file with text program.  Any help is greatly appreciated.
Is maith an scáthán súil carad.

A friends eye is a good mirror.

青山 素子

You need to use a tool like gdb on the server to see what happened, and even then you need to be experienced in examining core dumps.
Motoko-chan
Director, Simple Machines

Note: Unless otherwise stated, my posts are not representative of any official position or opinion of Simple Machines.


Celtland

Thanks for your help.  I have no experience with core files or gdbserver at all.  We'll have our host look into it more if the problem persists.  Thanks again.
Is maith an scáthán súil carad.

A friends eye is a good mirror.

Paraiba

I've been getting this a lot over the last couple of weeks. It dumps core.nnnnn files in the avatars directory for some reason. Yesterday there were 16 in there and each one was over 105Mb! I deleted them all to stop my host screaming about upgrading my web space allowance and today two more had appeared.
Every morning is the dawn of a new error

青山 素子

I would suggest asking your host why apache/php keeps dropping core files. That really should not happen in normal use and indicates there is a problem with the software. (And no, 90% of the time webpages should not be triggering that, the software is a bit more robust than that.)
Motoko-chan
Director, Simple Machines

Note: Unless otherwise stated, my posts are not representative of any official position or opinion of Simple Machines.


Paraiba

 :D I did. But my host is in the US and I seem to keep getting the office cleaner. Here's the reply

QuoteCore files not problem, you just can delete

and my reply.....

QuoteCore files yes problem. Account keep running out of space and you sending nasty email are!
Every morning is the dawn of a new error

Oldiesmann


Paraiba

I think I may have a handle on the problem. Not 100% sure just yet so I'll keep an eye on it and report back.

I've had these core files appearing before, though nowhere near as big as the recent ones that kept turning up in my SMF Avatar directory, therefore it's not specific to SMF. No files have appeared over the last few days so I think it's one of 3 things and anyone with the same problem can try any one or all of them......

I deleted the directories in Avatars where the files were appearing - Actors and Musicians.
I notified my host so it's possible they've fixed something.

The third one I think is the most likely culprit. My FTP client. It went through a hiatus where it kept crashing, locking up, files vanishing etc. I did an upload of OSCommerce (never again) which is huge and that crashed out several times so it may account for the large core files. I've changed FTP clients and so far, touch wood, all seems OK.
Every morning is the dawn of a new error

青山 素子

Unless you are running the client on the server, that won't cause core files to appear (unless the ftp server is being affected, and it dumps core - but that shouldn't be happening normally).
Motoko-chan
Director, Simple Machines

Note: Unless otherwise stated, my posts are not representative of any official position or opinion of Simple Machines.


Paraiba

Hmmm well I'll keep an eye on it and see if I can figure it out.

I've had no SMF crashes or lock ups
Every morning is the dawn of a new error

joshuayip

Does anyone have any solution to this, I have just deleted 1 GB of core files which is causing my account to jam up spaces. I recall asking this long time ago. Anyway, any pointers on php or apache setting? The forum is setup by fantastico. Is there any reason why core files is picking only the actor and musician directory to generate core.**** ?

青山 素子

Core files will be placed in the current directory that the crashing program is in.

There isn't really any configuration to help stop that. Core files only occur when a program crashes, and that means the program has either been built incorrectly, or has a major bug in its code. The only real solution is to check for an update in the server program, or build a newer version.
Motoko-chan
Director, Simple Machines

Note: Unless otherwise stated, my posts are not representative of any official position or opinion of Simple Machines.


MrPhil

You will need a tool like gdb (or what flavor of Unix/Linux/BSD/AIX/whatever offers) and which program (executable) that died. Then you can look at the core file and do a traceback on the stack and see where the program was and what error killed it. You really need the program source too, to do anything useful. Needless to say, this is heavy systems programming stuff, something that your hosting service should be taking care of (unless it's your own software that's failing).

If your hosting service can't be bothered (you're not on Lunarpages, are you?), or it's your program installation and you have no idea what to do, at least you can get rid of the core files on a regular basis. Do you have the ability to set up "cron jobs"? cPanel should let you. You can set one up to daily seek out and destroy all core.* files, so at least you won't run out of file space. The cron command would be something like


37 01 * * * find /home/myaccount/public_html -name "core.*" -exec ls -la {} \;


That just lists the files (at 1:37 am) that it will delete when you change the command as follows


37 01 * * * find /home/myaccount/public_html -name "core.*" -exec rm -f {} \;


Season to taste for time of day, starting point in the directory tree, and file name template. Run the first version a few times to make sure it will only get rid of the core files and nothing else. If it emails the command results to you and you get tired of that, add >/dev/null 2>&1 to the end of the command to suppress emails. Good luck, and be very careful -- there's nothing worse than a file erase command running amok!

queks

i also experience a lot of hugh core file coming up. Taken up half a gig. of my space. Is there any ways to suppress the generation of core file? It is being a hugh problem. I expect hosting company screaming at me very soon. Need to clear every few days. Please come up with something.......anything.....

IchBin™

The hosting company are the ones who need to fix the problem as it is the software on their server that is doing this. Please contact your host and tell them to fix the problem.
IchBin™        TinyPortal

queks


ictus

Quote from: MrPhil on October 08, 2007, 01:38:04 PM
You will need a tool like gdb (or what flavor of Unix/Linux/BSD/AIX/whatever offers) and which program (executable) that died. Then you can look at the core file and do a traceback on the stack and see where the program was and what error killed it. You really need the program source too, to do anything useful. Needless to say, this is heavy systems programming stuff, something that your hosting service should be taking care of (unless it's your own software that's failing).

If your hosting service can't be bothered (you're not on Lunarpages, are you?), or it's your program installation and you have no idea what to do, at least you can get rid of the core files on a regular basis. Do you have the ability to set up "cron jobs"? cPanel should let you. You can set one up to daily seek out and destroy all core.* files, so at least you won't run out of file space. The cron command would be something like


37 01 * * * find /home/myaccount/public_html -name "core.*" -exec ls -la {} \;


That just lists the files (at 1:37 am) that it will delete when you change the command as follows


37 01 * * * find /home/myaccount/public_html -name "core.*" -exec rm -f {} \;


Season to taste for time of day, starting point in the directory tree, and file name template. Run the first version a few times to make sure it will only get rid of the core files and nothing else. If it emails the command results to you and you get tired of that, add >/dev/null 2>&1 to the end of the command to suppress emails. Good luck, and be very careful -- there's nothing worse than a file erase command running amok!

I tried this, but got this error:

/bin/sh: 37: command not found

any thoughts?

青山 素子

Quote from: ictus on April 04, 2009, 08:55:13 AM
I tried this, but got this error:

/bin/sh: 37: command not found

any thoughts?

That isn't a command, that's a line to add to a crontab. You'll also need to edit some of the other parts to fit your needs and path.
Motoko-chan
Director, Simple Machines

Note: Unless otherwise stated, my posts are not representative of any official position or opinion of Simple Machines.


Advertisement: