Simple Machines Community Forum

SMF Support => SMF 1.1.x Support => Topic started by: ciaran on October 19, 2005, 08:34:35 AM

Title: core.**** files
Post by: ciaran on October 19, 2005, 08:34:35 AM
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







Title: Re: core.**** files
Post by: Ben_S on October 19, 2005, 08:40:30 AM
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.
Title: Re: core.**** files
Post by: Celtland on August 21, 2006, 09:11:50 PM
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.
Title: Re: core.**** files
Post by: 青山 素子 on August 22, 2006, 12:22:59 AM
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.
Title: Re: core.**** files
Post by: Celtland on August 22, 2006, 02:33:43 AM
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.
Title: Re: core.**** files
Post by: Paraiba on November 02, 2006, 07:33:51 AM
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.
Title: Re: core.**** files
Post by: 青山 素子 on November 02, 2006, 09:32:35 AM
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.)
Title: Re: core.**** files
Post by: Paraiba on November 02, 2006, 12:13:34 PM
 :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!
Title: Re: core.**** files
Post by: Oldiesmann on November 02, 2006, 12:25:13 PM
Nice :)
Title: Re: core.**** files
Post by: Paraiba on November 04, 2006, 12:18:55 PM
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.
Title: Re: core.**** files
Post by: 青山 素子 on November 04, 2006, 03:48:41 PM
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).
Title: Re: core.**** files
Post by: Paraiba on November 04, 2006, 06:28:54 PM
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
Title: Re: core.**** files
Post by: joshuayip on October 08, 2007, 12:20:54 AM
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.**** ?
Title: Re: core.**** files
Post by: 青山 素子 on October 08, 2007, 01:03:20 AM
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.
Title: Re: core.**** files
Post by: 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!
Title: Re: core.**** files
Post by: queks on October 26, 2007, 11:29:28 AM
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.....
Title: Re: core.**** files
Post by: IchBin™ on October 26, 2007, 11:35:19 AM
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.
Title: Re: core.**** files
Post by: queks on October 26, 2007, 11:39:11 AM
roger that. thks.
Title: Re: core.**** files
Post by: ictus on April 04, 2009, 08:55:13 AM
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?
Title: Re: core.**** files
Post by: 青山 素子 on April 04, 2009, 11:53:01 AM
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.
Title: Re: core.**** files
Post by: ictus on April 05, 2009, 03:26:06 AM
thanks for the tip, it pointed me in the right direction

I'm using cpanel with cron jobs, and don't know enough to risk fiddling, so I checked with a froend and came up with this:

find /home/my account/public_html/smfsubfolder -name "core.*" -exec rm -f {} \;

my smf is in a subfolder, so I put in the full path and it works great....