Closed storm37000 closed 2 years ago
I have been having weird errors/freezes that seem to only happen if the map has been changed off of the default one. Here is a log example.
Player <STEAM_0:0:0> used tool creator on The Map
ConVarRef room_type doesn't point to an existing ConVar
Executing dedicated server config file server.cfg
[ERROR] gamemodes/sandbox/entities/weapons/gmod_tool/stools/weld.lua:239: Tried to use a NULL physics object!
1. RotateAroundAxis - [C]:-1
2. Think - gamemodes/sandbox/entities/weapons/gmod_tool/stools/weld.lua:239
3. unknown - gamemodes/sandbox/entities/weapons/gmod_tool/shared.lua:187
[ERROR] gamemodes/sandbox/entities/weapons/gmod_tool/stools/weld.lua:239: Tried to use a NULL physics object!
1. RotateAroundAxis - [C]:-1
2. Think - gamemodes/sandbox/entities/weapons/gmod_tool/stools/weld.lua:239
3. unknown - gamemodes/sandbox/entities/weapons/gmod_tool/shared.lua:187
[ERROR] gamemodes/sandbox/entities/weapons/gmod_tool/stools/weld.lua:239: Tried to use a NULL physics object!
1. RotateAroundAxis - [C]:-1
2. Think - gamemodes/sandbox/entities/weapons/gmod_tool/stools/weld.lua:239
3. unknown - gamemodes/sandbox/entities/weapons/gmod_tool/shared.lua:187
[ERROR] gamemodes/sandbox/entities/weapons/gmod_tool/stools/weld.lua:239: Tried to use a NULL physics object!
1. RotateAroundAxis - [C]:-1
2. Think - gamemodes/sandbox/entities/weapons/gmod_tool/stools/weld.lua:239
3. unknown - gamemodes/sandbox/entities/weapons/gmod_tool/shared.lua:187
Server is behind! (1)
[ERROR] gamemodes/sandbox/entities/weapons/gmod_tool/stools/weld.lua:239: Tried to use a NULL physics object!
1. RotateAroundAxis - [C]:-1
2. Think - gamemodes/sandbox/entities/weapons/gmod_tool/stools/weld.lua:239
3. unknown - gamemodes/sandbox/entities/weapons/gmod_tool/shared.lua:187
[ERROR] gamemodes/sandbox/entities/weapons/gmod_tool/stools/weld.lua:239: Tried to use a NULL physics object!
1. RotateAroundAxis - [C]:-1
2. Think - gamemodes/sandbox/entities/weapons/gmod_tool/stools/weld.lua:239
3. unknown - gamemodes/sandbox/entities/weapons/gmod_tool/shared.lua:187
[ERROR] gamemodes/sandbox/entities/weapons/gmod_tool/stools/weld.lua:239: Tried to use a NULL physics object!
1. RotateAroundAxis - [C]:-1
2. Think - gamemodes/sandbox/entities/weapons/gmod_tool/stools/weld.lua:239
3. unknown - gamemodes/sandbox/entities/weapons/gmod_tool/shared.lua:187
Server is behind! (2)
Server is behind! (3)
...
The weird part that is leading me onto this conclusion is
ConVarRef room_type doesn't point to an existing ConVar
Executing dedicated server config file server.cfg
which is a console message that only prints when the server first starts up.
I would assume Lua would still be in a valid state whenever __gc
is called, otherwise it would be impossible to clean up native resources held by Lua objects. Then again, Garry butchered the require
function so any assumptions from Lua are probably moot. I do this clean up because of another module I have, unrequire
, that allows unloading native modules. This unrequire
also tries to remove the global table possibly created by the module, so it shouldn't be needed to remove the global table by the original module. It should be fine to do this change.
I'm getting a similar issue as well, 80% of the time the server will crash on map restart/change.
Trying to create entities too early! (base_point) /entrypoint.sh: line 15: 12 Segmentation fault (core dumped) ${MODIFIED_STARTUP} PTDL_CONTAINER_ERR: There was an error while attempting to run the start command. [Dino Panel] Server marked as OFF
@jellyton69
I was using an old version, so I've gone ahead and updated, I'll report back all my info if the problem persists on the new version.
@jellyton69 can you try this build please?
I've run a bunch of tests, seems like the issue persists, but might be less common.
(This might just be a coincidence, but it seems that the longer the server has been on a map, the smaller chance of a crash, the shorted the time, the more common the crash.
Just to confirm, when you say "the issue persists", you're talking about map restarts/changes, right?
Also, I'd appreciate if you could tell me how you're testing, I'm unable to reproduce any crashes by spamming changelevel and map commands, with or without a real player.
Just to confirm, when you say "the issue persists", you're talking about map restarts/changes, right?
The issue being server crash on attempted restart/change.
Also, I'd appreciate if you could tell me how you're testing, I'm unable to reproduce any crashes by spamming changelevel and map commands, with or without a real player.
I'm just running a simple map/maprestart command from the admin mod SAM. It's possible the issue could stem from another addon or module, or the server itself, which has major issues with steam auth currently.
A stacktrace of the crash would help, do you know how to run srcds with gdb?
I'm not familiar, but I'll look into it.
At the expense of the server crash when changing the map, it's true, there is such a problem at the moment with this module.
It could have also been MySQLoo as they recently released an update that they say fixed a possible stack corruption.
I did something like this in my dll module once, it caused weird issues when the map was changed, random crashes/freezes that would re print old lines again into the console. It would print the last serverside lua error again or print some other server startup text that should never print again right as it crashed/froze. The weird issue stopped when I stopped nilling my table, map changes everything is reloaded anyways and it shouldnt be needed.
https://github.com/danielga/gmsv_serversecure/blob/381a7851092e297965544e517fd0c18c621036b5/source/main.cpp#L49