We had the same issue with 498+

http://www.byond.com/forum/?post=1264881

Which went on for months, this issue seems to be the same in terms of it crashing all the time.

501.1217 has the issue, below

DreamDaemon [0x8048000, 0x0], [0x8048000, 0x804ab18] libbyond.so 0x393240, 0x3937d9 [0xb77c2000, 0xb77c240c], [0xb77c2000, 0xb77c240c] libbyond.so 0x393240, 0x3937d9 libbyond.so 0x384420, 0x3845ac libbyond.so 0x384d80, 0x384dd2 libbyond.so 0x2e0040, 0x2e012d libbyond.so 0x244590, 0x244790 libbyond.so 0x246330, 0x246653 libbyond.so 0x24b5b0, 0x24ba00 libbyond.so 0x256210, 0x25655a libbyond.so [0xb7277000, 0x0], 0x2bdd26 libbyond.so [0xb7277000, 0x0], 0x2a5909 libbyond.so [0xb7277000, 0x0], 0x2b509c libbyond.so 0x2b64d0, 0x2b65d5 libbyond.so [0xb7277000, 0x0], 0x27c2d4 libbyond.so 0x34c4d0, 0x34c66c libbyond.so 0x31bde0, 0x31bfe9 DreamDaemon [0x8048000, 0x0], [0x8048000, 0x804a5ac] libc.so.6 0x193e0, 0x194d3 (__libc_start_main) DreamDaemon [0x8048000, 0x0], [0x8048000, 0x8049ff1]

Also reported on 500.1214.

500.1209 seems to work ok (as I haven't had any complaints), in the 4 series 499.1197 was the best (only a few reported crashes).

Apart from that I can go through my support tickets and look for more reportings of the crashes, each one has a log file which looks pretty similar to the error above.
In response to A.T.H.K
WANO's last logs showed consistent failures in image() when it was being fed an /icon datum--or its internal icon var. It's not clear why that was happening, but the failure is so consistently within the image() proc it can't be a coincidence. Doohl made some changes, but it appears I missed one of the spots in the code that does this and he either hasn't had a chance to retest yet or hasn't gotten back to me since then. I also recommended to him that he put in some debugging code to give him a heads-up if any other parts of the code were doing this.
If it helps I've paged you a link to a core file.
ATHK, I did a trace and found your crash was somewhere in our PNG reading routine, but I couldn't find out more yet; it's a difficult routine to analyze. If the game allows for image uploads, It might help to disable that. It's possible though that the problem wasn't so much in the PNG read as in something else causing memory corruption. It's very hard to say yet.

I did discover an issue in 500+ regarding animate(), which caused some memory leakage and some resulting weird crashes. Specifically in one project I saw consistent crashes in a routine that sets the length of a list, even though the actual cause was a memory leak. While this only impacts projects using animate(), I thought I'd mention it here as it's relevant to Eternia at least. I feel confident the issue with the mystery corruption of the string table was taken care of late in the 499 series when we changed the way we compile Linux builds, and the issue being seen now could well be different. I'm not even certain your crash and Eternia's are the same issue.

For any games using animate(), I would recommend a retry on 502.1219, which fixes the list leak.
Thank you!
We've updated to the latest build are all still experiencing crashing. We've also reprogrammed all the suggestions that Lummox provided. Still crashing daily.

Ready for further instruction.
Backtrace for BYOND 502.1219 on Linux:
Generated at Mon Dec 9 05:09:54 2013

DreamDaemon [0x8048000, 0x0], [0x8048000, 0x804ac08]
libbyond.so 0x2ea4e0, 0x2ea509
[0xb778c000, 0xb778c600], [0xb778c000, 0xb778c600]
libbyond.so 0x2ea4e0, 0x2ea509
libbyond.so 0x24cfa0, 0x24d2ca
libbyond.so 0x25ec80, 0x25ecae
libbyond.so 0x25ee00, 0x25eee4
libbyond.so [0xb7240000, 0x0], 0x284868
libbyond.so [0xb7240000, 0x0], 0x2bf650
libbyond.so [0xb7240000, 0x0], 0x2a6cac
libbyond.so 0x2b6860, 0x2b697e
libbyond.so 0x2bde90, 0x2bdf43
libbyond.so [0xb7240000, 0x0], 0x2be918
libbyond.so [0xb7240000, 0x0], 0x2a7d6c
libbyond.so 0x2b6860, 0x2b697e
libbyond.so 0x2bde90, 0x2bdf43
libbyond.so [0xb7240000, 0x0], 0x2beb15
libbyond.so [0xb7240000, 0x0], 0x2a7d6c
libbyond.so 0x2b6860, 0x2b697e
libbyond.so 0x2bde90, 0x2bdf43
libbyond.so 0x2bf7b0, 0x2bf87b
libbyond.so 0x24f230, 0x24f620
libbyond.so [0xb7240000, 0x0], 0x2941f3
libbyond.so 0x298f80, 0x29927a
libbyond.so [0xb7240000, 0x0], 0x29a10a
libbyond.so [0xb7240000, 0x0], 0x2a6180
libbyond.so 0x2b6860, 0x2b697e
libbyond.so 0x2bde90, 0x2bdf43
libbyond.so [0xb7240000, 0x0], 0x2beb15
libbyond.so [0xb7240000, 0x0], 0x2a7d6c
libbyond.so 0x2b6860, 0x2b697e
libbyond.so 0x2bde90, 0x2bdf43
libbyond.so [0xb7240000, 0x0], 0x2be918
libbyond.so [0xb7240000, 0x0], 0x2a7d6c
libbyond.so 0x2b6860, 0x2b697e
libbyond.so [0xb7240000, 0x0], 0x2c0bba
libbyond.so [0xb7240000, 0x0], 0x2a5975
libbyond.so 0x2b6860, 0x2b697e
libbyond.so 0x2bde90, 0x2bdf43
libbyond.so 0x2bf7b0, 0x2bf87b
libbyond.so [0xb7240000, 0x0], 0x2b888e
libbyond.so [0xb7240000, 0x0], 0x2c0c7d
libbyond.so [0xb7240000, 0x0], 0x2a5975
libbyond.so 0x2b6860, 0x2b697e
libbyond.so 0x2bde90, 0x2bdf43
libbyond.so 0x2bf7b0, 0x2bf87b
libbyond.so 0x263d30, 0x263f03
libbyond.so [0xb7240000, 0x0], 0x26ba0e
libbyond.so [0xb7240000, 0x0], 0x279ae0
libbyond.so 0x27b530, 0x27b5b0
Thanks for the update. I ran a trace and confirmed the crash is still happening inside image(). Most specifically, it's happening in a routine trying to access an internal object used by the /icon datum. However in your code this is always failing inside of an image() call.

If you have made all the appropriate changes, then in theory image() shouldn't be called with /icon datums anymore at all, but clearly this is not the case, which means one of us missed one. Per what I mentioned to you and Doohl, the way we can verify this for sure is to use a macro before each image() call where the first arg isn't a constant (that is, null or a single-quoted icon file). I strongly recommend this:
#define IMAGECHECK(i) if(i && !isfile(i)) {world.log << "Icon datum in image()"; i = fcopy_rsc(i)}

Stick that somewhere in a file with the rest of your defines. The call to IMAGECHECK() should be put before each call using image() where the first argument is a var, like so:
IMAGECHECK(hood_icon)
var/image/hood_image = image(hood_icon)

By doing this we can narrow down exactly which part of the code is having an issue. The fact that this crashes so regularly in the same spot means something it's doing beforehand is causing the crash, and that's what I need to find.
Your IMAGECHECK() should probably also output the file and line too, shouldn't it?
In response to Nadrew
Ah yes, so it should. So [__FILE__]:[__LINE__] should be thrown into the log part of the macro there.
Apologies for the slow response. The error catching has been implemented and we'll update you whenever a crash next occurs.
Here are the results of your IMAGECHECK():

Icon datum in image() - code/spells/class/special/illusion.dm:176
Mon Dec 16 04:43:01 2013
Icon datum in image() - code/spells/class/special/illusion.dm:176
Icon datum in image() - code/spells/class/special/illusion.dm:176
Icon datum in image() - code/spells/class/special/illusion.dm:176
Icon datum in image() - code/player/combat.dm:117
Icon datum in image() - code/spells/class/special/illusion.dm:176
Mon Dec 16 06:27:43 2013
Icon datum in image() - code/spells/class/special/illusion.dm:176
Icon datum in image() - code/spells/class/special/illusion.dm:176
Mon Dec 16 09:34:55 2013
Icon datum in image() - code/spells/class/special/illusion.dm:176
Mon Dec 16 12:19:29 2013
Icon datum in image() - code/spells/class/special/illusion.dm:176
Mon Dec 16 14:26:28 2013
BYOND Error: failed to certify Arc Du Amitie
Mon Dec 16 15:46:34 2013
Icon datum in image() - code/spells/class/special/illusion.dm:176
Icon datum in image() - code/spells/class/special/illusion.dm:176
Icon datum in image() - code/spells/class/special/illusion.dm:176
Mon Dec 16 17:46:23 2013
Icon datum in image() - code/spells/class/special/illusion.dm:176


And here are the files:

illusion.dm:176
            for(var/Over in m.overlays)
IMAGECHECK(Over)
var/image/I = image(Over, layer = Over:layer)
I.icon+= rgb(0,0,0,50)
addoverlays += I


combat.dm:117
                for(var/Over in P.overlays)
IMAGECHECK(Over)
P.client.images+=image(Over, P, Over:layer)


Everything within a player's overlays is an /image type. If it's not, it should cause a runtime error, which it doesn't.
The items in the overlays and underlays lists are not /image types; they're Appearances. An Appearance is a special internal type used by DM to keep track of all the visual aspects of an icon. Anything that gets added to overlays or underlays is converted to an Appearance.

I think those outputs are red herrings. My IMAGECHECK() macro is relatively simple and I hadn't designed it to check for Appearance types. The problem is only happening when the icon argument is a datum or the datum's internal object. Wherever that's happening, the code just before it is probably what's triggering the bug. Since you're looping through the overlays list, the objects you're using are already Appearances, so their icons are actual cache files and not datums; therefore I'm confident these are not the approximate locations of the bug.

If you change Over to Over:icon as the first argument in image() and also as the argument in IMAGECHECK(), these cases will go away. That only applies here though, not in all your other image() calls.
I'm not completely sure about this, but I used to have this crashing, too. My previous lead dev Jey123456 posted the issue.

HOWEVER. After reinstalling our server, and downloading a new copy of the code we use, I haven't crashed in over 2 weeks.

I really don't think these crashes are related to BYOND, any more. Rather, you should look through your code, or, if you want to go resource intensive, log every proc call made, it's sure to get you to the one that seems to be last when the crash occurs.
In response to Lummox JR
Lummox JR wrote:
Wherever that's happening, the code just before it is probably what's triggering the bug.

Are you saying you want us to post this code? We're not too sure what to make of your reply / what you want us to do next.

   var/tmpoverlays = new/list()
tmpoverlays += m.overlays
var/tmpunderlays = new/list()
tmpunderlays += m.underlays

var/addoverlays = new/list()
In response to Writing A New One
No, what I mean is the spots in the code you found are not actually the places this issue is happening. My IMAGECHECK() macro is just catching them because it's not really smart enough to look for an Appearance; it just assumes anything that flunks the isfile() test is a datum or the internal object.

If you change your code so you pass Over:icon to image() instead of Over, you should get the same functionality but this won't trip up IMAGECHECK(). Obviously that only applies to these specific places where you're passing an overlay/underlay. My thinking is that once you take care of those false positives, assuming no others crop up, you should eventually find where the issue is occurring and we can go from there.
I will call image() with Over:image, but this will just remove all instances of IMAGECHECK() catching an error. There's nowhere else so far where the error's occurred, and it's been crashing daily or bi-daily on average still.
In response to Doohl
Doohl wrote:
I will call image() with Over:image, but this will just remove all instances of IMAGECHECK() catching an error. There's nowhere else so far where the error's occurred, and it's been crashing daily or bi-daily on average still.

That'd be Over:icon, actually. An Appearance has no image var.

Assuming you didn't miss any spot where an IMAGECHECK() should go, your results would suggest that 1) it's crashing before the file output to world.log is properly saved, and 2) it's crashing the very first time the routine is called.

This being on Linux, I would suggest possibly losing the -logself option and world.log, and instead of logging to a file, sending all output to a file via the Linux command line with > instead. Theoretically, I think that the regular output buffer would auto-flush and you'd get proper output then that could catch the missing image check.

Another option, which is rather radical, is to make IMAGECHECK() print out an error and then return from the proc without ever creating the image, if it catches a datum being used. Since I'm convinced the code before this point is what's causing the crash, I have doubts this will truly prevent a crash from happening, but I suspect you'll be more likely to get usable output that can track down the culprit routine.
Please try this in the latest 503.1222. When it crashes, it should provide some new info about the DM procs in use. Also, you may want to try disabling the map-threads if that turns out to be causing new crashes.

You can compile your game in pre-500 versions if you want to ensure that old clients can login.
Backtrace for BYOND 503.1222 on Linux:
Generated at Thu Dec 26 19:05:30 2013

DreamDaemon [0x8048000, 0x0], [0x8048000, 0x804ac34]
libbyond.so 0x2ebdc0, 0x2ebde9
[0xf77c0000, 0xf77c0410], [0xf77c0000, 0xf77c0410]
libbyond.so 0x2ebdc0, 0x2ebde9
libbyond.so 0x24d880, 0x24dbaa
libbyond.so 0x25f560, 0x25f58e
libbyond.so 0x25f6e0, 0x25f7c4
libbyond.so [0xf726d000, 0x0], 0x285208
libbyond.so [0xf726d000, 0x0], 0x2c0ed0
libbyond.so [0xf726d000, 0x0], 0x2a767c
libbyond.so 0x2b7230, 0x2b734e
libbyond.so 0x2bf710, 0x2bf7c3
libbyond.so [0xf726d000, 0x0], 0x2c0198
libbyond.so [0xf726d000, 0x0], 0x2a873c
libbyond.so 0x2b7230, 0x2b734e
libbyond.so 0x2bf710, 0x2bf7c3
libbyond.so [0xf726d000, 0x0], 0x2c0395
libbyond.so [0xf726d000, 0x0], 0x2a873c
libbyond.so 0x2b7230, 0x2b734e
libbyond.so 0x2bf710, 0x2bf7c3
libbyond.so 0x2c1030, 0x2c10fb
libbyond.so 0x24fb10, 0x24ff00
libbyond.so [0xf726d000, 0x0], 0x294bb3
libbyond.so 0x299940, 0x299c3a
libbyond.so [0xf726d000, 0x0], 0x29aaca
libbyond.so [0xf726d000, 0x0], 0x2a6b50
libbyond.so 0x2b7230, 0x2b734e
libbyond.so 0x2bf710, 0x2bf7c3
libbyond.so [0xf726d000, 0x0], 0x2c0395
libbyond.so [0xf726d000, 0x0], 0x2a873c
libbyond.so 0x2b7230, 0x2b734e
libbyond.so 0x2bf710, 0x2bf7c3
libbyond.so [0xf726d000, 0x0], 0x2c0198
libbyond.so [0xf726d000, 0x0], 0x2a873c
libbyond.so 0x2b7230, 0x2b734e
libbyond.so [0xf726d000, 0x0], 0x2c243a
libbyond.so [0xf726d000, 0x0], 0x2a6345
libbyond.so 0x2b7230, 0x2b734e
libbyond.so 0x2bf710, 0x2bf7c3
libbyond.so 0x2c1030, 0x2c10fb
libbyond.so [0xf726d000, 0x0], 0x2b9476
libbyond.so [0xf726d000, 0x0], 0x2c24fd
libbyond.so [0xf726d000, 0x0], 0x2a6345
libbyond.so 0x2b7230, 0x2b734e
libbyond.so 0x2bf710, 0x2bf7c3
libbyond.so 0x2c1030, 0x2c10fb
libbyond.so 0x264610, 0x2647e3
libbyond.so [0xf726d000, 0x0], 0x26c2ee
libbyond.so [0xf726d000, 0x0], 0x27a3f0
libbyond.so 0x27be40, 0x27bec0

Recent proc calls:
/obj/hud/spell_tree/proc/SetInfo

/obj/hud/spell_tree/proc/SetInfo

/obj/hud/spell_tree/proc/SetInfo

/obj/hud/spell_tree/proc/SetInfo

/obj/hud/spell_tree/proc/SetInfo

/obj/hud/spell_tree/proc/SetInfo

/obj/hud/spell_tree/proc/SetInfo
/mob/player/proc/CheckSpellButtons
/mob/player/proc/CheckQuestDelays
/mob/player/proc/CheckQuestImages


Thu Dec 26 19:07:41 2013
World opened on network port 1213.
Welcome BYOND! (5.0 Beta Version 503.1222)
The BYOND hub reports that port 1213 is reachable.
BUG: Crashing due to an illegal operation!

Backtrace for BYOND 503.1222 on Linux:
Generated at Thu Dec 26 19:12:16 2013

DreamDaemon [0x8048000, 0x0], [0x8048000, 0x804ac34]
libbyond.so 0x2ebdc0, 0x2ebde9
[0xf773a000, 0xf773a410], [0xf773a000, 0xf773a410]
libbyond.so 0x2ebdc0, 0x2ebde9
libbyond.so 0x24d880, 0x24dbaa
libbyond.so 0x25f560, 0x25f58e
libbyond.so 0x25f6e0, 0x25f7c4
libbyond.so [0xf71e7000, 0x0], 0x285208
libbyond.so [0xf71e7000, 0x0], 0x2c0ed0
libbyond.so [0xf71e7000, 0x0], 0x2a767c
libbyond.so 0x2b7230, 0x2b734e
libbyond.so 0x2bf710, 0x2bf7c3
libbyond.so [0xf71e7000, 0x0], 0x2c0198
libbyond.so [0xf71e7000, 0x0], 0x2a873c
libbyond.so 0x2b7230, 0x2b734e
libbyond.so 0x2bf710, 0x2bf7c3
libbyond.so [0xf71e7000, 0x0], 0x2c0395
libbyond.so [0xf71e7000, 0x0], 0x2a873c
libbyond.so 0x2b7230, 0x2b734e
libbyond.so 0x2bf710, 0x2bf7c3
libbyond.so 0x2c1030, 0x2c10fb
libbyond.so 0x24fb10, 0x24ff00
libbyond.so [0xf71e7000, 0x0], 0x294bb3
libbyond.so 0x299940, 0x299c3a
libbyond.so [0xf71e7000, 0x0], 0x29aaca
libbyond.so [0xf71e7000, 0x0], 0x2a6b50
libbyond.so 0x2b7230, 0x2b734e
libbyond.so 0x2bf710, 0x2bf7c3
libbyond.so [0xf71e7000, 0x0], 0x2c0395
libbyond.so [0xf71e7000, 0x0], 0x2a873c
libbyond.so 0x2b7230, 0x2b734e
libbyond.so 0x2bf710, 0x2bf7c3
libbyond.so [0xf71e7000, 0x0], 0x2c0198
libbyond.so [0xf71e7000, 0x0], 0x2a873c
libbyond.so 0x2b7230, 0x2b734e
libbyond.so [0xf71e7000, 0x0], 0x2c243a
libbyond.so [0xf71e7000, 0x0], 0x2a6345
libbyond.so 0x2b7230, 0x2b734e
libbyond.so 0x2bf710, 0x2bf7c3
libbyond.so 0x2c1030, 0x2c10fb
libbyond.so [0xf71e7000, 0x0], 0x2b9476
libbyond.so [0xf71e7000, 0x0], 0x2c24fd
libbyond.so [0xf71e7000, 0x0], 0x2a6345
libbyond.so 0x2b7230, 0x2b734e
libbyond.so 0x2bf710, 0x2bf7c3
libbyond.so 0x2c1030, 0x2c10fb
libbyond.so 0x264610, 0x2647e3
libbyond.so [0xf71e7000, 0x0], 0x26c2ee
libbyond.so [0xf71e7000, 0x0], 0x27a3f0
libbyond.so 0x27be40, 0x27bec0

Recent proc calls:
/obj/hud/spell_tree/proc/SetInfo
/mob/player/proc/CheckSpellButtons
/mob/player/proc/CheckQuestDelays
/mob/player/proc/CheckQuestImages
/SoundManager/proc/SoundFade
/SoundManager/proc/NewSound
/sound/New
/SoundTrigger/proc/PlayFile
/Region/proc/LoadSound
/Region/Entered
/turf/Enter
/turf/Enter
/mob/player/Move
/proc/getWarp
/mob/player/proc/SpawnLoc
/mob/player/proc/chatlog


Thu Dec 26 19:14:44 2013
World opened on network port 1213.
Welcome BYOND! (5.0 Beta Version 503.1222)
The BYOND hub reports that port 1213 is reachable.
BUG: Crashing due to an illegal operation!

Backtrace for BYOND 503.1222 on Linux:
Generated at Fri Dec 27 02:07:45 2013

DreamDaemon [0x8048000, 0x0], [0x8048000, 0x804ac34]
libbyond.so 0x2ebdc0, 0x2ebde9
[0xf779d000, 0xf779d410], [0xf779d000, 0xf779d410]
libbyond.so 0x2ebdc0, 0x2ebde9
libbyond.so 0x24d880, 0x24dbaa
libbyond.so 0x25f560, 0x25f58e
libbyond.so 0x25f6e0, 0x25f7c4
libbyond.so [0xf724a000, 0x0], 0x285208
libbyond.so [0xf724a000, 0x0], 0x2c0ed0
libbyond.so [0xf724a000, 0x0], 0x2a767c
libbyond.so 0x2b7230, 0x2b734e
libbyond.so 0x2bf710, 0x2bf7c3
libbyond.so [0xf724a000, 0x0], 0x2c0198
libbyond.so [0xf724a000, 0x0], 0x2a873c
libbyond.so 0x2b7230, 0x2b734e
libbyond.so 0x2bf710, 0x2bf7c3
libbyond.so [0xf724a000, 0x0], 0x2c0395
libbyond.so [0xf724a000, 0x0], 0x2a873c
libbyond.so 0x2b7230, 0x2b734e
libbyond.so 0x2bf710, 0x2bf7c3
libbyond.so 0x2c1030, 0x2c10fb
libbyond.so 0x24fb10, 0x24ff00
libbyond.so [0xf724a000, 0x0], 0x294bb3
libbyond.so 0x299940, 0x299c3a
libbyond.so [0xf724a000, 0x0], 0x29aaca
libbyond.so [0xf724a000, 0x0], 0x2a6b50
libbyond.so 0x2b7230, 0x2b734e
libbyond.so 0x2bf710, 0x2bf7c3
libbyond.so [0xf724a000, 0x0], 0x2c0395
libbyond.so [0xf724a000, 0x0], 0x2a873c
libbyond.so 0x2b7230, 0x2b734e
libbyond.so 0x2bf710, 0x2bf7c3
libbyond.so [0xf724a000, 0x0], 0x2c0198
libbyond.so [0xf724a000, 0x0], 0x2a873c
libbyond.so 0x2b7230, 0x2b734e
libbyond.so [0xf724a000, 0x0], 0x2c243a
libbyond.so [0xf724a000, 0x0], 0x2a6345
libbyond.so 0x2b7230, 0x2b734e
libbyond.so 0x2bf710, 0x2bf7c3
libbyond.so 0x2c1030, 0x2c10fb
libbyond.so [0xf724a000, 0x0], 0x2b9476
libbyond.so [0xf724a000, 0x0], 0x2c24fd
libbyond.so [0xf724a000, 0x0], 0x2a6345
libbyond.so 0x2b7230, 0x2b734e
libbyond.so 0x2bf710, 0x2bf7c3
libbyond.so 0x2c1030, 0x2c10fb
libbyond.so 0x264610, 0x2647e3
libbyond.so [0xf724a000, 0x0], 0x26c2ee
libbyond.so [0xf724a000, 0x0], 0x27a3f0
libbyond.so 0x27be40, 0x27bec0

Recent proc calls:
/obj/hud/spell_tree/proc/SetInfo
/mob/player/proc/CheckSpellButtons
/mob/player/proc/CheckQuestDelays
/mob/player/proc/CheckQuestImages
/SoundManager/proc/SoundFade
/SoundManager/proc/NewSound
/sound/New
/SoundTrigger/proc/PlayFile
/Region/proc/LoadSound
/Region/Entered
/turf/Enter
/turf/Enter
/mob/player/Move
/mob/player/proc/chatlog
/obj/item/gear/Write
/obj/item/gear/Write
Page: 1 2 3 4