diff options
author | Mattes D <github@xoft.cz> | 2017-01-18 09:02:56 +0100 |
---|---|---|
committer | Mattes D <github@xoft.cz> | 2017-01-18 09:02:56 +0100 |
commit | 49e05d8cfe09713f7b911de6a88f0f93e0cc8a57 (patch) | |
tree | cb0ff77e5f1ee3c3141aa8a1c7ff3274574fdecf /Server/Plugins/Debuggers/Debuggers.lua | |
parent | DeadlockDetect: Provide more information for debugging. (diff) | |
download | cuberite-49e05d8cfe09713f7b911de6a88f0f93e0cc8a57.tar cuberite-49e05d8cfe09713f7b911de6a88f0f93e0cc8a57.tar.gz cuberite-49e05d8cfe09713f7b911de6a88f0f93e0cc8a57.tar.bz2 cuberite-49e05d8cfe09713f7b911de6a88f0f93e0cc8a57.tar.lz cuberite-49e05d8cfe09713f7b911de6a88f0f93e0cc8a57.tar.xz cuberite-49e05d8cfe09713f7b911de6a88f0f93e0cc8a57.tar.zst cuberite-49e05d8cfe09713f7b911de6a88f0f93e0cc8a57.zip |
Diffstat (limited to '')
-rw-r--r-- | Server/Plugins/Debuggers/Debuggers.lua | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/Server/Plugins/Debuggers/Debuggers.lua b/Server/Plugins/Debuggers/Debuggers.lua index 28b7e254d..c433148ca 100644 --- a/Server/Plugins/Debuggers/Debuggers.lua +++ b/Server/Plugins/Debuggers/Debuggers.lua @@ -2420,6 +2420,34 @@ end +function HandleConsoleDeadlock(a_Split) + -- If given a parameter, assume it's a world name and simulate a deadlock in the world's tick thread + if (a_Split[2]) then + local world = cRoot:Get():GetWorld(a_Split[2]) + if (world) then + world:ScheduleTask(0, + function() + -- Make a live-lock: + while (true) do + end + end + ) + return true, "Deadlock in world tick thread for world " .. a_Split[2] .. " has been scheduled." + end + LOG("Not a world name: " .. a_Split[2] .. "; simulating a deadlock in the command execution thread instead.") + else + LOG("Simulating a deadlock in the command execution thread.") + end + + -- Make a live-lock in the command execution thread: + while(true) do + end +end + + + + + function HandleConsoleDownload(a_Split) -- Check params: local url = a_Split[2] |