dan200 / ComputerCraft

Programmable Computers for Minecraft
Other
964 stars 199 forks source link

PeripheralAPI$PeripheralWrapper.queueEvent causing the server to hang forever #608

Open AngryCarrot789 opened 3 years ago

AngryCarrot789 commented 3 years ago

its a rare occasion (happens every few months), but sometimes the server simply stops responding. i made a plugin which prints out the server thread's stacktrace if the server thread stops responding for a few seconds, and this is what it was spitting out for over an hour:

image

im not sure if this is because the world is corrupting, but the only fix i found is to trial and error remove the last modified region files before the server restarted, until it restarts successfully, then i can just put those region files back one by one until i find the region that somehow hangs the server and then delete it. but that region probably contains someone's base so they wont be very happy

even after finding the region file, and loading it onto my other test server, it works perfectly fine on there. i pretty much have no clue whats causing this :( ive also tried messing around with the method profilers to pinpoint the exact tile entity location (TileEntityCable, from the stacktrace) that's causing it, but the server side apparently doesn't have that :(

i should say... this is a 1.6.4 server (tekkit main), using computercraft version 1.58, so maybe the issue has been fixed in later versions

edit: i think this might be caused by m_attached being checked but maybe thats being syncronized by the server thread so it just deadlocks

AngryCarrot789 commented 2 years ago

heres some more info about the server thread: image

and VisualVM gave a deadlock warning too

vico93 commented 2 years ago

I don't think this mod is still supported... Only its forks, like CC:Tweaked or CC:Restitched (for Fabric), but none of them are for so early versions (like 1.6.4).

Kan18 commented 2 years ago

possibly related to https://github.com/SquidDev-CC/CCTweaks/issues/116