ID:2531003
 
Resolved
Regression: file handle recycling didn't work out as planned, but problems didn't show up in simple tests. Will revisit in a future release.
BYOND Version:513.1504
Operating System:Linux
Web Browser:Chrome 77.0.3865.90
Applies to:Dream Daemon
Status: Resolved (513.1505)

This issue has been resolved.
Descriptive Problem Summary:
Dream Daemon crashes after a few moments.

Numbered Steps to Reproduce Problem:
#!/bin/bash
source tools/byond/bin/byondsetup
cp repo/z_build_opts.dm repo/_std/__build.dm
/usr/bin/time --quiet -f '* BUILD TIME: %E *' DreamMaker repo/goonstation.dme
es=$?
cd repo
git checkout _std/__build.dm
cd ..
exit $es

#!/bin/bash
source tools/byond/bin/byondsetup
DreamDaemon repo/goonstation.dmb -trusted -invisible -threads on -verbose -ports 6969


Expected Results:
Server runs.

Actual Results:
Server crashes a few moments after startup with "Crashing due to illegal operation".

Does the problem occur:
- After updating to 513.1504. OS: Ubuntu 18.04.


When does the problem NOT occur?
- Problem occurs always.

Did the problem NOT occur in any earlier versions? If so, what was the last version that worked?

- Problem did not happen in 513.1501.


Workarounds:
- Unknown.


Trace:
Fri Dec 20 10:07:34 2019
World opened on network port 6969.
Welcome BYOND! (5.0 Beta Version 513.1504)
[652562] Preload (DEBUG) Map preload running.
...
[652760] World/Init (DEBUG) Setting up process scheduler...
[652812] World/Init (DEBUG) Initializing worldgen...
[652814] World/Init (DEBUG) Now in pre-game state.
[652814] World/Init (DEBUG) Init() complete - Lagcheck enabled


BUG: Crashing due to an illegal operation!

Backtrace for BYOND 513.1504 on Linux:
Generated at Fri Dec 20 10:08:10 2019

DreamDaemon [0x8048000, 0x0], [0x8048000, 0x804bd94]
libc.so.6 0x1377b0, 0x1377f6 (fclose)
linux-gate.so.1 [0xf7fa5000, 0xf7fa5960], [0xf7fa5000, 0xf7fa5960]
libc.so.6 0x1377b0, 0x1377f6 (fclose)
libc.so.6 0x657d0, 0x659bb (fclose)
libbyond.so [0xf799c000, 0x0], 0x22d2df
libbyond.so [0xf799c000, 0x0], 0x22d826
libbyond.so [0xf799c000, 0x0], 0x282706
libbyond.so 0x3c3430, 0x3c354a
libbyond.so 0x3800c0, 0x3802c2
DreamDaemon [0x8048000, 0x0], [0x8048000, 0x804afc4]
libc.so.6 0x18d90, 0x18e81 (__libc_start_main)
DreamDaemon [0x8048000, 0x0], [0x8048000, 0x804a801]

Recent proc calls:
/proc/event_wormhole_buildturflist
/datum/controller/processScheduler/proc/runQueuedProcesses
/datum/controller/processScheduler/proc/queueProcesses
/datum/controller/process/proc/getPreviousStatus
/datum/controller/process/proc/getStatus
/datum/controller/process/proc/getElapsedTime
/datum/controller/process/proc/update
/datum/controller/process/proc/getPreviousStatus
/datum/controller/process/proc/getStatus
/datum/controller/process/proc/getElapsedTime
/datum/controller/process/proc/update
/datum/controller/processScheduler/proc/checkRunningProcesses
/datum/controller/processScheduler/proc/process
/proc/process_keystates
/proc/start_input_loop
/world/proc/updateCameraVisibility

Gah, frell. Looks like the file handle change I made had an issue. Gonna have to revert it after all.
Lummox JR resolved issue with message:
Regression: file handle recycling didn't work out as planned, but problems didn't show up in simple tests. Will revisit in a future release.