BlockySurvival / issue-tracker

A non-code repo for tracking issues w/ the Blocky Survival minetest server
12 stars 0 forks source link

Unknown mod uses set_attach/set_detach a lot #114

Open SmallJoker opened 5 years ago

SmallJoker commented 5 years ago

A mod tries to attach or detach objects without parents way too often. Wasted traffic and server execution time.

Added 42106 - was: 42106
   update(): id=42106, attach_id=0, obj=0
 setAttachment() id=42106, parent=0, name=Krock
 setAttachment() id=42106, parent=0, name=Krock
 setAttachment() id=42106, parent=0, name=Krock
 setAttachment() id=42106, parent=0, name=Krock
 setAttachment() id=42106, parent=0, name=Krock
 setAttachment() id=42106, parent=0, name=Krock
 setAttachment() id=42106, parent=0, name=Krock
 setAttachment() id=42106, parent=0, name=Krock
 setAttachment() id=42106, parent=0, name=Krock
 setAttachment() id=42106, parent=0, name=Krock
 setAttachment() id=42106, parent=0, name=Krock
 setAttachment() id=42106, parent=0, name=Krock
 setAttachment() id=42106, parent=0, name=Krock
 setAttachment() id=42106, parent=0, name=Krock
 setAttachment() id=42106, parent=0, name=Krock
 setAttachment() id=42106, parent=0, name=Krock
 setAttachment() id=42106, parent=0, name=Krock
 setAttachment() id=42106, parent=0, name=Krock
 setAttachment() id=42106, parent=0, name=Krock
 setAttachment() id=42106, parent=0, name=Krock
 setAttachment() id=42106, parent=0, name=Krock
 setAttachment() id=42106, parent=0, name=Krock
 setAttachment() id=42106, parent=0, name=Krock
 setAttachment() id=42106, parent=0, name=Krock
 setAttachment() id=42106, parent=0, name=Krock
 setAttachment() id=42106, parent=0, name=Krock
 setAttachment() id=42106, parent=0, name=Krock
 setAttachment() id=42106, parent=0, name=Krock
 setAttachment() id=42106, parent=0, name=Krock
 setAttachment() id=42106, parent=0, name=Krock
 setAttachment() id=42106, parent=0, name=Krock
 setAttachment() id=42106, parent=0, name=Krock
 setAttachment() id=42106, parent=0, name=Krock
 setAttachment() id=42106, parent=0, name=Krock
 setAttachment() id=42106, parent=0, name=Krock
 setAttachment() id=42106, parent=0, name=Krock
 setAttachment() id=42106, parent=0, name=Krock
 setAttachment() id=42106, parent=0, name=Krock
 setAttachment() id=42106, parent=0, name=Krock
 setAttachment() id=42106, parent=0, name=Krock
 setAttachment() id=42106, parent=0, name=Krock
initData() id=49283, name=
 setAttachment() id=49283, parent=0, name=
   update(): id=49283, attach_id=0, obj=0
Added 49283 - was: 49283
   update(): id=42106, attach_id=49283, obj=139826166872192
     matrix: 139826217630256 parent: 139826217438336
   update(): id=49283, attach_id=0, obj=0
found 42106
 setAttachment() id=42106, parent=0, name=Krock
   update(): id=42106, attach_id=0, obj=0
 setAttachment() id=49283, parent=0, name=
   update(): id=49283, attach_id=0, obj=0
 setAttachment() id=49283, parent=0, name=
   update(): id=49283, attach_id=0, obj=0
 setAttachment() id=42106, parent=0, name=Krock
   update(): id=42106, attach_id=0, obj=0
 setAttachment() id=42106, parent=0, name=Krock
   update(): id=42106, attach_id=0, obj=0
 setAttachment() id=47646, parent=0, name=
   update(): id=47646, attach_id=0, obj=0
 setAttachment() id=47374, parent=0, name=
   update(): id=47374, attach_id=0, obj=0
 setAttachment() id=47395, parent=0, name=
   update(): id=47395, attach_id=0, obj=0
 setAttachment() id=47396, parent=0, name=
fluxionary commented 5 years ago

Fascinating. How are you seeing this? Increased verbosity of client-side log?

fluxionary commented 5 years ago

Mods which use set_attach:

(plus boats and carts from minetest_game)

SmallJoker commented 5 years ago

I gathered this information by adding some text output to the client's attachment handler. The mods seem to be OK. They only call the functions on player interactions. One possibility would also be that there are many regular objects that are loaded and unloaded (client-side). The attachment data is sent for them, even if they aren't attached. But the weird thing here is that "initData" and "Added" occur less often than the attachment information (which should be 1:1 if that were the case).

fluxionary commented 4 years ago

Note to self: take another look at this, it might be important. The game is written well enough that it should be easy to add some extra logging in the attachment handler.