ID:1482882
 
Resolved
Linux threading crashed some games on startup.
BYOND Version:504
Operating System:Linux
Web Browser:
Applies to:Dream Daemon
Status: Resolved (504.1229)

This issue has been resolved.
Descriptive Problem Summary:
The game (Eternia in specific) crashes on startup when trying to begin the DreamDaemon process.

Numbered Steps to Reproduce Problem:
1) Update to the latest BYOND version.
2) Host a server

Expected Results:
Should run fine.

Actual Results:
Mon Jan 27 22:44:40 2014
World opened on network port 1213.
Welcome BYOND! (5.0 Beta Version 504.1228)
*** glibc detected *** DreamDaemon: realloc(): invalid next size: 0x08658ee8 ***
======= Backtrace: =========
/lib/i386-linux-gnu/i686/cmov/libc.so.6(+0x70f01)[0xf6e7ff01]
/lib/i386-linux-gnu/i686/cmov/libc.so.6(+0x7660d)[0xf6e8560d]
/lib/i386-linux-gnu/i686/cmov/libc.so.6(realloc+0xdd)[0xf6e858ed]
DreamDaemon[0x804b7fe]
/usr/local/lib/libbyond.so(+0x23cf4c)[0xf74fcf4c]
/usr/local/lib/libbyond.so(+0x1e044c)[0xf74a044c]
/usr/local/lib/libbyond.so(+0x1e62ed)[0xf74a62ed]
/usr/local/lib/libbyond.so(+0x1e7d60)[0xf74a7d60]
DreamDaemon[0x804c71c]
/lib/i386-linux-gnu/i686/cmov/libpthread.so.0(+0x5c39)[0xf6df6c39]
/lib/i386-linux-gnu/i686/cmov/libc.so.6(clone+0x5e)[0xf6ee478e]
======= Memory map: ========
08048000-08050000 r-xp 00000000 ca:02 261704 /usr/local/byond/bin/DreamDaemon
08050000-08051000 rw-p 00007000 ca:02 261704 /usr/local/byond/bin/DreamDaemon
08658000-0a0bb000 rw-p 00000000 00:00 0 [heap]
f4e00000-f4e21000 rw-p 00000000 00:00 0
f4e21000-f4f00000 ---p 00000000 00:00 0
f4fe8000-f4fe9000 ---p 00000000 00:00 0
f4fe9000-f57e9000 rw-p 00000000 00:00 0
f57e9000-f57ea000 ---p 00000000 00:00 0
f57ea000-f5fea000 rw-p 00000000 00:00 0
f5fea000-f5ffa000 r-xp 00000000 ca:02 23993 /lib/i386-linux-gnu/i686/cmov/libresolv-2.13.so
f5ffa000-f5ffb000 r--p 00010000 ca:02 23993 /lib/i386-linux-gnu/i686/cmov/libresolv-2.13.so
f5ffb000-f5ffc000 rw-p 00011000 ca:02 23993 /lib/i386-linux-gnu/i686/cmov/libresolv-2.13.so
f5ffc000-f5ffe000 rw-p 00000000 00:00 0
f5ffe000-f6008000 r-xp 00000000 ca:02 23408 /lib/i386-linux-gnu/i686/cmov/libnss_files-2.13.so
f6008000-f6009000 r--p 00009000 ca:02 23408 /lib/i386-linux-gnu/i686/cmov/libnss_files-2.13.so
f6009000-f600a000 rw-p 0000a000 ca:02 23408 /lib/i386-linux-gnu/i686/cmov/libnss_files-2.13.so
f6012000-f65ed000 rw-p 00000000 00:00 0
f65ed000-f65ee000 ---p 00000000 00:00 0
f65ee000-f6df1000 rw-p 00000000 00:00 0
f6df1000-f6e06000 r-xp 00000000 ca:02 23266 /lib/i386-linux-gnu/i686/cmov/libpthread-2.13.so
f6e06000-f6e07000 r--p 00014000 ca:02 23266 /lib/i386-linux-gnu/i686/cmov/libpthread-2.13.so
f6e07000-f6e08000 rw-p 00015000 ca:02 23266 /lib/i386-linux-gnu/i686/cmov/libpthread-2.13.so
f6e08000-f6e0a000 rw-p 00000000 00:00 0
f6e0a000-f6e0c000 r-xp 00000000 ca:02 23290 /lib/i386-linux-gnu/i686/cmov/libdl-2.13.so
f6e0c000-f6e0d000 r--p 00001000 ca:02 23290 /lib/i386-linux-gnu/i686/cmov/libdl-2.13.so
f6e0d000-f6e0e000 rw-p 00002000 ca:02 23290 /lib/i386-linux-gnu/i686/cmov/libdl-2.13.so
f6e0e000-f6e0f000 rw-p 00000000 00:00 0
f6e0f000-f6f6b000 r-xp 00000000 ca:02 23982 /lib/i386-linux-gnu/i686/cmov/libc-2.13.so
f6f6b000-f6f6c000 ---p 0015c000 ca:02 23982 /lib/i386-linux-gnu/i686/cmov/libc-2.13.so
f6f6c000-f6f6e000 r--p 0015c000 ca:02 23982 /lib/i386-linux-gnu/i686/cmov/libc-2.13.so
f6f6e000-f6f6f000 rw-p 0015e000 ca:02 23982 /lib/i386-linux-gnu/i686/cmov/libc-2.13.so
f6f6f000-f6f72000 rw-p 00000000 00:00 0
f6f72000-f6f8e000 r-xp 00000000 ca:02 22353 /lib/i386-linux-gnu/libgcc_s.so.1
f6f8e000-f6f8f000 rw-p 0001b000 ca:02 22353 /lib/i386-linux-gnu/libgcc_s.so.1
f6f8f000-f6fb3000 r-xp 00000000 ca:02 23705 /lib/i386-linux-gnu/i686/cmov/libm-2.13.so
f6fb3000-f6fb4000 r--p 00023000 ca:02 23705 /lib/i386-linux-gnu/i686/cmov/libm-2.13.so
f6fb4000-f6fb5000 rw-p 00024000 ca:02 23705 /lib/i386-linux-gnu/i686/cmov/libm-2.13.so
f6fb5000-f7095000 r-xp 00000000 ca:02 22703 /usr/lib/i386-linux-gnu/libstdc++.so.6.0.17
f7095000-f7099000 r--p 000e0000 ca:02 22703 /usr/lib/i386-linux-gnu/libstdc++.so.6.0.17
f7099000-f709a000 rw-p 000e4000 ca:02 22703 /usr/lib/i386-linux-gnu/libstdc++.so.6.0.17
f709a000-f70a1000 rw-p 00000000 00:00 0
f70a1000-f70a8000 r-xp 00000000 ca:02 23409 /lib/i386-linux-gnu/i686/cmov/librt-2.13.so
f70a8000-f70a9000 r--p 00006000 ca:02 23409 /lib/i386-linux-gnu/i686/cmov/librt-2.13.so
f70a9000-f70aa000 rw-p 00007000 ca:02 23409 /lib/i386-linux-gnu/i686/cmov/librt-2.13.so
f70aa000-f70ab000 rw-p 00000000 00:00 0
f70ab000-f72bf000 r-xp 00000000 ca:02 261701 /usr/local/byond/bin/libext.so
f72bf000-f72c0000 rw-p 00213000 ca:02 261701 /usr/local/byond/bin/libext.so
f72c0000-f7758000 r-xp 00000000 ca:02 261702 /usr/local/byond/bin/libbyond.so
f7758000-f775a000 rw-p 00497000 ca:02 261702 /usr/local/byond/bin/libbyond.so
f775a000-f7774000 rw-p 00000000 00:00 0
f7774000-f7775000 rw-p 00000000 00:00 0
f7775000-f7779000 r-xp 00000000 ca:02 24021 /lib/i386-linux-gnu/i686/cmov/libnss_dns-2.13.so
f7779000-f777a000 r--p 00004000 ca:02 24021 /lib/i386-linux-gnu/i686/cmov/libnss_dns-2.13.so
f777a000-f777b000 rw-p 00005000 ca:02 24021 /lib/i386-linux-gnu/i686/cmov/libnss_dns-2.13.so
f777b000-f777e000 rw-p 00000000 00:00 0
f777e000-f777f000 r-xp 00000000 00:00 0 [vdso]
f777f000-f779b000 r-xp 00000000 ca:02 22635 /lib/i386-linux-gnu/ld-2.13.so
f779b000-f779c000 r--p 0001b000 ca:02 22635 /lib/i386-linux-gnu/ld-2.13.so
f779c000-f779d000 rw-p 0001c000 ca:02 22635 /lib/i386-linux-gnu/ld-2.13.so
ffca6000-ffcc7000 rw-p 00000000 00:00 0 [stack]


When does the problem NOT occur?
Never. The problem is consistent.

Very sorry, we actually didn't properly check in the fix for this last time. We'll have a new build out shortly.
Lummox JR resolved issue with message:
Linux threading crashed some games on startup.
I appreciate the assistance, you two :) I'll try it again soon and report the results, good or bad.
Seems like this is continuing to crash, but except now it's not throwing out any error logs. On the bright side it's not crashing on server startup, it seems to crash a bit later. A bit being maybe like 10 minutes afterward.

Starting server with threads on.
Fri Jan 31 22:08:06 2014
World opened on network port 1213.
Welcome BYOND! (5.0 Beta Version 504.1230)


That's the last log entry.
The fact that it doesn't say the server initialization finished means it's never completing startup for some reason. I'm not sure I can explain this, because it doesn't happen in my test setup. Using the Eternia code I have, I'm able to start up a server without incident.

I think at a minimum I'm going to need the latest copy of Eternia's source so I can re-compile and do a test on the newer source myself, as my test environment used older source. If you can zip that up somewhere and provide me a link in a private message I can try that.

Failure to startup is something that SilkWizard is also reporting in NEStalgia on just one system, so this is obviously a high priority to fix.

Is there a general rundown you can give me on what kinds of housekeeping the world does at startup? Anything like external connections, etc.?
Sent the latest source code.
I'm getting the failure to start up too, in a project. It only occurs in Dream Daemon, never in Dream Seeker (when running it from Dream Maker).
In response to Topkasa
The failure to startup is really a separate issue and we should probably continue on a new thread. However I'd have to know more about your project, and have access to source I can compile.

I tried several tests on Eternia today, and what looked initially like progress came up flat. I definitely need something that will reproduce this regularly. Are you having this issue on a Windows system, and if so, with which project? Is this something you can get to me to test?
Mine is a "single-player" game meant to run in Dream Seeker. When run in Dream Daemon, it always fails to start the first time, but if I stop and restart the world, it will initialize correctly. It's the same project that's actually exhibiting the sound bug I've reported, too. If it would help, I can certainly send you the full source (as opposed to the stripped-down version in that thread)
In response to Topkasa
Yes, the full source would be quite helpful. Your issue sounds identical to Silk's, and I haven't made headway on that.
Alright, I'll send it to you tonight (~5-6 hours from now)
In response to Topkasa
Sounds good. I should be able to check it out after dinner then.
I'm having the same problem with Alternate Worlds, being unable to start it in single player on Seeker or on multiplayer in Daemon. The initial start of the server never seems to finish.
In response to Mask of Illusion
As I mentioned, failure to start really needs to be a new thread. It's clearly not a crash or the same issue as the bug which was already fixed here. If you have source I can compile, I'll be happy to take a look and see if I can reproduce this issue. (I haven't had any luck so far.) I'd also like you to try adding some debugging output to world.log at the beginning and end of world/New(), and at various stages along the way in that proc, to see if you can narrow down where the startup fails.