pandorabox-io / pandorabox.io

Pandorabox infrastructure code
https://pandorabox.io
31 stars 4 forks source link

Node detectors became unreliable #223

Closed int-ua closed 5 years ago

int-ua commented 5 years ago

After the last Mesecons update Node detectors continue sending signal even after the block no longer matches. Demo at -2481,48,3733

thomasrudin commented 5 years ago

This has been introduced with https://github.com/pandorabox-io/mesecons/commit/932c210aa853b0024adf285346f57582602e4f42

The mesecons only execute for a fixed time per globalstep. If they execute for more than the given time, the Server::Receive() function in the engine does not get called enough and no-one can interact with the server anymore. Funny thing: the lag is unaffected by this :smile:

The function in question: https://github.com/minetest/minetest/blob/master/src/server.cpp#L996

Called here from within the globalstep: https://github.com/minetest/minetest/blob/master/src/server.cpp#L102

I think either someone started abusing the circuits heavily or the amount of players is just too much for the mod.

Maybe some kind of prioritizing or even penalization would be in order. This would work best with a per-mapblock introduced mesecon limit....

On the other hand, maybe it is just a tuning-issue...

Here the issue visualized:

https://pandorabox.io/grafana/d/ifuy9KSZz/minetest-engine?orgId=1&from=1563383623609&to=1563387270093&fullscreen&panelId=16

And on the mesecons part:

https://monitoring.minetest.land/d/LjYzPumWz/mesecons?orgId=1&from=1563383623609&to=1563387270093

Everything below 50 miliseconds per second spent in the Server::Receive() function will result in delayed interaction.

thomasrudin commented 5 years ago

Should be fixed with https://github.com/thomasrudin-mt/minetest/commit/51b299618bd2f183c38bfb45f3bf7454d05a0cb9