• Welcome to Simple Machines Community Forum. Please login or sign up.
October 27, 2021, 03:59:22 PM

News:

Wondering if this will always be free?  See why free is better.


Core dumps being created

Started by greyknight17, May 26, 2008, 05:56:04 PM

Previous topic - Next topic

greyknight17

I tried to resolve this issue myself but couldn't figure out what's wrong. It looks like SMF keeps recreating core files (35MB+) every day. I have to constantly delete them daily. I tried a fresh SMF upload and it still doesn't help.

Using SMF 2.0 beta 3.1 default theme. No mods installed. I tried changing the permissions around as well so all standard files are writable.

Thanks.

Douglas

I'd recommend you take a peek at http://en.wikipedia.org/wiki/Core_dump and then look at Apache or PHP as the potential culprits.
Doug Hazard
* Full Stack (Web) Developer for The Catholic Diocese of Richmond
(20+ Diocesan sites, 130+ Church sites & 24 School sites)
* Sports Photographer and Media Personality
* CFB Historian
* Tech Admin for one 1M+ post, one 2M+ post and one 10M+ post sites (last two are powered by multiple servers)
* WordPress Developer (Junkie)

青山 素子

SMF doesn't make those, it's one of the other apps (probably PHP) doing it while running a script in that directory. Core dumps usually indicate something very wrong with the application. How big is a dump? I might be able to look at it with gdb and see if I can pick out what is causing it.
Motoko-chan
Director, Simple Machines

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


SleePy

I had this for the longest while as well for my 1.1 forum.

I updated to Apache 2.2.8 and PHP 5.2.6 and it went away. I was using before that Apache 2.2.6 and PHP 5.2.5
Jeremy D — Site Team / SMF Developer
Support the SMF Support team!
Profiles:GitHub
Join us on IRC Libera.chat/#smf

greyknight17

Was wondering if it could be a coincidence. It started to happen around the time I updated to the latest SMF and I thought it could be related ;)

I have the following for my webhost:

Apache version   1.3.41 (Unix)
PHP version   5.2.5

Will ask them if they could upgrade as I see the Apache version is definitely older than the one you listed there Sleepy.

Motoko-chan: The dumps vary. Something I have a lot that are 0 bytes and ranging from 3MB to 30MB+. I get a handful of these (about 7 or so) each day. I will contact the host first and see if they can do anything on their end for this.

Thanks guys.

青山 素子

Quote from: greyknight17 on May 29, 2008, 12:01:28 PM
Was wondering if it could be a coincidence. It started to happen around the time I updated to the latest SMF and I thought it could be related ;)

It's possible that the new code has exposed a problem with PHP or Apache. It isn't an uncommon thing for that to happen. (The best example I can think of right now is when a more efficient piece of software gets installed and exposes an underlying race condition because the code now runs faster.)
Motoko-chan
Director, Simple Machines

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


greyknight17

Yep. Sounds like a very good possibility that it's the case, especially with the very outdated version they have. Still haven't gotten a response back from them yet, but will followup shortly.

Thanks :)

argimiro

June 06, 2008, 04:52:29 AM #7 Last Edit: June 06, 2008, 08:11:26 AM by argimiro
files named core.(5 digits[0-9]) - all roughly 7mb in size - first 4 bytes always 7f 45 4c 46 (?ELF)

Is that correct?

I'm getting tens of these created in the forum root directory on 2.0 beta 3.1 - but not on a 1.1.5 installation on the same server

If these files are the same issue talked about in this thread I will ask my host about it too

okay here's their reply;

Quote
The core files in your SMF forum are the corpses of programs (compiled and linked binary executables) that have upped and died. Unix-family operating systems (such as Linux) save these core files when a program dies. They contain information about the state of the machine and the program, including a snapshot of the execution stack at the moment of death. A programmer familiar with the program (and having the source code to it) can play pathologist and examine the entrails to see what was the cause of death. For anyone else, core files are useless and just take up space. For a system such as SMF, it's most likely that PHP itself died, and a systems programmer might be interested in looking at the core file to see what PHP choked on.

Apart from deleting the files they had no other suggestion. We're on PHP Version 4.4.8

The innards of the corpses don't mean anything to me unfortunately. I've kept them all the same.

青山 素子

If you aren't going to use a debugger to investigate the cause of the crash, delete the files. They are worthless otherwise.

In general, you should not get core dumps. However, they do occasionally happen when there is a null pointer or similar error that indicates a problem in how the program was built (or one of the supporting libraries). An experienced systems manager will often go through these files to see if they can determine the cause of the issue (at least what caused it) so they can check their server configuration or with the provider of the program at fault.
Motoko-chan
Director, Simple Machines

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


argimiro

June 06, 2008, 07:56:30 PM #9 Last Edit: June 07, 2008, 08:29:14 PM by argimiro
I've discovered I can make it core dump at will.

I'm using the Amber11final theme which doesn't look as if it natively supports 2.0 beta 3.1 - I originally installed the theme on 1.1.5, then ran the large upgrade package. That gave me a /forums/Themes/amber11final/ directory with all the language variables updated, which I subsequently saved and re-zipped for use on fresh installs of 2.0 beta 3.1

That wasn't quite sufficient though - it was giving '500 Internal Server plus a 404' errors on all topic display pages. After picking through the theme I isolated a tract of code down near the bottom of Display.template.php:


foreach ($category['boards'] as $board)
echo '
<option value="?board=',
                        $board['id'],
                        '.0"',
                        $board['is_current'] ? ' selected="selected"' : '',
                        '> ' . str_repeat('==', $board['child_level']) . '=> ' . $board['name'] . '</option>';


This code seems to have something to do with displaying a 'Jump To..' dropdown at the bottom of topic display pages.

I found that if I commented out that code, the theme ran on 2.0 almost perfectly - just a few variables not showing up here and there.

I then discovered that it was that small tract of code that was causing the core dumps - if I re-enable it, the 500 Internal Server & 404 errors come back, and so do the core dumps - one is generated per page load. If I comment out that code, the core dumps stop and the theme returns to near-normal operation.

If I try replacing the code with


foreach ($category['boards'] as $elephant97)
        {
        echo "core dump<br>";
        }


I get the 500/404's & the core dumps too, so I guess it's the foreach ($category['boards'] bit that's somehow responsible..? Maybe it's the same for everyone or maybe this is just the specific cause on my combination of theme / host

I had no problem with


foreach ($category['randomnonexistentindex'] as $cardboardbox)
        {
        echo "core dump<br>";
        }


though so it's as if there's something going on with the 'boards' index of $category. least in my case.

OP is using SMF 2.0 beta 3.1 default theme though so.. guess it's a different cause there

greyknight17

Motoko-chan, still interested in taking a look? My host isn't budging on the Apache & PHP upgrade. Planning on switching soon, but want to confirm that it's not something else causing the problem.

Thanks.

青山 素子

I don't mind. Hopefully I could be of some help. I'm not all that experienced in the dark arts of poking through core dumps, but I can hopefully find the part that broke. I'll create an FTP account for you as soon as I can and PM the details.
Motoko-chan
Director, Simple Machines

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


Captain Kaos

I find same thing on my server , i have 3 forums
Only in SMF 1.1.5 versions   not in the latest SMF 2.0 Beta 3.1 Public
do i see the core.  files
Captain Kaos
© 2009 Kaos.Inc
Powered by Mac OSX
-----------------------------------
"There are no stupid Questions"
Only stupid people that don't ask them !!!!

青山 素子

I suppose I can do one more examination if you want. I'm not sure I have time beyond that at the moment.
Motoko-chan
Director, Simple Machines

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


青山 素子

Okay, I don't have the same layout on my box, so I can't adequately trace the fault.

Greyknight, it is PHP crashing, but I can't see the stack since my libraries are at different versions. Do you have shell access?
Motoko-chan
Director, Simple Machines

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


greyknight17

Thanks Motoko-chan. The host actually upgraded PHP to 5.2.6....must be recently after my complaint.

PMed you back with cPanel login info. It does have SSH access listed there.

Captain Kaos

Hey guys all i did to fix the issues was go back to php v4.***
Never had it happen again
either some thing in PHPv5 that conflicts with SMF v1.***
did not happen on the latest beta on same servers

Host rolled every one on his server to V4 and fixed all other SMF forums on there too. I aint no programmer but this cant be that hard to work out ? Is it

http://www.simplemachines.org/community/index.php?topic=223829.msg1580747#msg1580747
Captain Kaos
© 2009 Kaos.Inc
Powered by Mac OSX
-----------------------------------
"There are no stupid Questions"
Only stupid people that don't ask them !!!!

青山 素子

Quote from: Captain Kaos on June 19, 2008, 10:20:31 PM
either some thing in PHPv5 that conflicts with SMF v1.***

It has to be some configuration issue. I've been running the 1.1 series including 1.1.5 under PHP5 (5.2.5 at the moment) for some time and no issues here.


Quote from: Captain Kaos on June 19, 2008, 10:20:31 PM
Host rolled every one on his server to V4 and fixed all other SMF forums on there too. I aint no programmer but this cant be that hard to work out ? Is it

Depends. If it can be reproduced, the cause can be determined. If not, it will be very difficult. I haven't had any issues, so I can't begin to try and replicate.
Motoko-chan
Director, Simple Machines

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


Captain Kaos

Wish you guys luck , But yes you right unless one of you that know
code can have it happen, You guys are stuck  would be good if some
of the others that had it went back to a different version to see
if that helped,very lucky down under here , we have good Hosts that
will work with you. Thanks guys
Captain Kaos
© 2009 Kaos.Inc
Powered by Mac OSX
-----------------------------------
"There are no stupid Questions"
Only stupid people that don't ask them !!!!

青山 素子

If the host will work with you, have them do backtraces using the core dumps so that it can be determined where the fault happened.
Motoko-chan
Director, Simple Machines

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


Advertisement: