Service reports: Unlag spawn. Reduce signposts ... #5234

Open
opened 2023-09-03 12:51:09 +00:00 by yourland-report · 27 comments

Service reports a bug:

Unlag spawn. Reduce signposts and itemframes everywhere. Ask plotowners to move chests, signposts and itemframes out. Move Voice lirbary elsewhere. Move lost and found elsewhere. More to come

Player position:

{
	x = 2001.9580078125,
	y = 37.749000549316,
	z = 1158.9870605469
}

Player look:

{
	x = 0.68352484703064,
	y = -0.72992372512817,
	z = 0.0022666454315186
}

Player information:

{
	major = 5,
	lang_code = "de",
	protocol_version = 42,
	minor = 7,
	formspec_version = 6,
	min_rtt = 0.01799999922514,
	avg_rtt = 0.018999999389052,
	min_jitter = 0,
	max_jitter = 0.3289999961853,
	avg_jitter = 0.0030000004917383,
	connection_uptime = 47306,
	serialization_version = 29,
	patch = 0,
	max_rtt = 0.34900000691414,
	state = "Active",
	version_string = "5.7.0",
	ip_version = 6
}

Player meta:

{
	fields = {
		yl_audio_state = "off",
		ui_waypoints = "{\"data\":[{\"active\":false,\"name\":\"Waypoint 1\",\"world_pos\":{\"x\":2002.0,\"y\":8.0,\"z\":1154.0}}],\"selected\":1.0}",
		["arena_lib_editor.players_number"] = "0",
		["petz:werewolf_vignette_id"] = "19",
		["petz:old_override_table"] = "return {[\"speed\"] = 1, [\"sneak_glitch\"] = false, [\"sneak\"] = true, [\"jump\"] = 1, [\"gravity\"] = 1, [\"new_move\"] = true}",
		arenalib_infobox_arenaID = "0",
		szutil_watch = "return {}",
		["arena_lib_editor.spawner_ID"] = "0",
		["petz:werewolf_clan_idx"] = "2",
		["signslib:pos"] = "(-2194,4,-371)",
		bitten = "0",
		yl_commons_player_created = "1610342909",
		yl_commons_player_joined = "1693698254",
		yl_church = "return {[\"last_death\"] = {[\"z\"] = -2009, [\"x\"] = -983, [\"y\"] = 19}, [\"last_death_portal\"] = 1672529932, [\"last_heal\"] = 1676219630}",
		hud_state = "on",
		["stamina:level"] = "0",
		["ocean_build.ocean_built"] = "4",
		["3d_armor_inventory"] = "return {\"\", \"\", \"\", \"\", \"\", \"\"}",
		["stamina:exhaustion"] = "77",
		lagometer = "1",
		repellant = "0",
		yl_commons_thankyou = "29",
		played_time = "69933147",
		digged_nodes = "21426",
		punch_count = "1844",
		died = "119",
		inflicted_damage = "1056288",
		xp = "0",
		["petz:werewolf"] = "0",
		["unified_inventory:bags"] = "return {\"unified_inventory:bag_large\", \"unified_inventory:bag_large\", \"unified_inventory:bag_large\", \"unified_inventory:bag_large\"}",
		["petz:lycanthropy"] = "0",
		["arena_lib_editor.team_ID"] = "0",
		["ocean_build.last_warning"] = "1.68193e+09",
		["stamina:poisoned"] = "no",
		crafted = "142",
		["ethereal:fly_timer"] = "-99",
		placed_nodes = "22859"
	}
}

Log identifier


[MOD] yl_report log identifier = 7FYOocBRRmHfWIEjHrgtb4famvnL62Au

Profiler save:

profile-20230903T125109.json_prettyEE

Status:

# Server: version: 5.7.0-yl-thx-tmm | game: Minetest Game | uptime: 3d 15h 15min 51s | max lag: 0.502s | clients (23/52): ALCOHOL3, AliasAlreadyTaken, Azelf, Boot, daydream, Ernle1, formations52, Glacierville, Heron, jpas, Karu, Laps, LucyUnicorn_Queen, MicaelStarfire, MineWorlds, Murmel, nazthelizard122, Service, Shismu, Skunk, Sysmatic, Transformers, zardos

Teleport command:

/teleport xyz 2002 38 1159

Compass command:

/give_compass Construction 7FYOocBRRmHfWIEjHrgtb4famvnL62Au D2691E 2002 38 1159
Service reports a bug: > Unlag spawn. Reduce signposts and itemframes everywhere. Ask plotowners to move chests, signposts and itemframes out. Move Voice lirbary elsewhere. Move lost and found elsewhere. More to come Player position: ``` { x = 2001.9580078125, y = 37.749000549316, z = 1158.9870605469 } ``` Player look: ``` { x = 0.68352484703064, y = -0.72992372512817, z = 0.0022666454315186 } ``` Player information: ``` { major = 5, lang_code = "de", protocol_version = 42, minor = 7, formspec_version = 6, min_rtt = 0.01799999922514, avg_rtt = 0.018999999389052, min_jitter = 0, max_jitter = 0.3289999961853, avg_jitter = 0.0030000004917383, connection_uptime = 47306, serialization_version = 29, patch = 0, max_rtt = 0.34900000691414, state = "Active", version_string = "5.7.0", ip_version = 6 } ``` Player meta: ``` { fields = { yl_audio_state = "off", ui_waypoints = "{\"data\":[{\"active\":false,\"name\":\"Waypoint 1\",\"world_pos\":{\"x\":2002.0,\"y\":8.0,\"z\":1154.0}}],\"selected\":1.0}", ["arena_lib_editor.players_number"] = "0", ["petz:werewolf_vignette_id"] = "19", ["petz:old_override_table"] = "return {[\"speed\"] = 1, [\"sneak_glitch\"] = false, [\"sneak\"] = true, [\"jump\"] = 1, [\"gravity\"] = 1, [\"new_move\"] = true}", arenalib_infobox_arenaID = "0", szutil_watch = "return {}", ["arena_lib_editor.spawner_ID"] = "0", ["petz:werewolf_clan_idx"] = "2", ["signslib:pos"] = "(-2194,4,-371)", bitten = "0", yl_commons_player_created = "1610342909", yl_commons_player_joined = "1693698254", yl_church = "return {[\"last_death\"] = {[\"z\"] = -2009, [\"x\"] = -983, [\"y\"] = 19}, [\"last_death_portal\"] = 1672529932, [\"last_heal\"] = 1676219630}", hud_state = "on", ["stamina:level"] = "0", ["ocean_build.ocean_built"] = "4", ["3d_armor_inventory"] = "return {\"\", \"\", \"\", \"\", \"\", \"\"}", ["stamina:exhaustion"] = "77", lagometer = "1", repellant = "0", yl_commons_thankyou = "29", played_time = "69933147", digged_nodes = "21426", punch_count = "1844", died = "119", inflicted_damage = "1056288", xp = "0", ["petz:werewolf"] = "0", ["unified_inventory:bags"] = "return {\"unified_inventory:bag_large\", \"unified_inventory:bag_large\", \"unified_inventory:bag_large\", \"unified_inventory:bag_large\"}", ["petz:lycanthropy"] = "0", ["arena_lib_editor.team_ID"] = "0", ["ocean_build.last_warning"] = "1.68193e+09", ["stamina:poisoned"] = "no", crafted = "142", ["ethereal:fly_timer"] = "-99", placed_nodes = "22859" } } ``` Log identifier ``` [MOD] yl_report log identifier = 7FYOocBRRmHfWIEjHrgtb4famvnL62Au ``` Profiler save: ``` profile-20230903T125109.json_prettyEE ``` Status: ``` # Server: version: 5.7.0-yl-thx-tmm | game: Minetest Game | uptime: 3d 15h 15min 51s | max lag: 0.502s | clients (23/52): ALCOHOL3, AliasAlreadyTaken, Azelf, Boot, daydream, Ernle1, formations52, Glacierville, Heron, jpas, Karu, Laps, LucyUnicorn_Queen, MicaelStarfire, MineWorlds, Murmel, nazthelizard122, Service, Shismu, Skunk, Sysmatic, Transformers, zardos ``` Teleport command: ``` /teleport xyz 2002 38 1159 ``` Compass command: ``` /give_compass Construction 7FYOocBRRmHfWIEjHrgtb4famvnL62Au D2691E 2002 38 1159 ```
AliasAlreadyTaken was assigned by yourland-report 2023-09-03 12:51:09 +00:00

Investigate whosit's solution of caching signposts

Investigate whosit's solution of caching signposts

I like this idea

I like this idea
AliasAlreadyTaken added the
1. kind/enhancement
2. prio/elevated
labels 2023-09-03 22:45:36 +00:00
Member

one thing i've wanted to try for a long time is to despawn the entities for small signs (not banners) if there's no player within, say, 8 nodes of the sign (they're usually illegible from any farther away). it'd be tricky to create a cheap mechanism to get them to spawn in properly though. probably a once-a-second globalstep which calls minetest.find_node_near for each player.

one thing i've wanted to try for a long time is to despawn the entities for small signs (not banners) if there's no player within, say, 8 nodes of the sign (they're usually illegible from any farther away). it'd be tricky to create a cheap mechanism to get them to spawn in properly though. probably a once-a-second globalstep which calls `minetest.find_node_near` for each player.

All we can do (as players) to reduce fps lag in Haven is to lower the view range.
Minetest 5.8.0 has a new feature which allows the Server to set players view range.
Maybe one could write a mod that (if the player enables that feature) will automatically reduce the view range on /spawn and reset it when the player leaves Haven.

It would at least improve my gaming experience if I won't have to do it manually every time I come to Haven.

All we can do (as players) to reduce fps lag in Haven is to lower the view range. Minetest 5.8.0 has a new feature which allows the Server to set players view range. Maybe one could write a mod that (if the player enables that feature) will automatically reduce the view range on /spawn and reset it when the player leaves Haven. It would at least improve my gaming experience if I won't have to do it manually every time I come to Haven.
Member

Sure, automaticly reducing view range in Haven to 20 - and when leaving it back to 400 - would help me. Typing /spawn with a view range of 400 is an extremly bad idea.

Sadly even view range 20 is too much.

We need to get those packages down to something manageable. Everyone is suffering from it. Even if the computer is fast enough and the line likewise fast it's still a huge waste of ressources.

Sure, automaticly reducing view range in Haven to 20 - and when leaving it back to 400 - would help me. Typing /spawn with a view range of 400 is an extremly bad idea. Sadly even view range 20 is too much. We need to get those packages down to something manageable. Everyone is suffering from it. Even if the computer is fast enough and the line likewise fast it's still a huge waste of ressources.
Member

i VERY MUCH think that we should move the post office to somewhere much farther from /spawn, and we should also declare and enforce an entity limit on all the plots in haven. my haven shops are important, but i also very much try to limit them because of client-side rendering issues that make playing the game unpleasnt.

moving the post-office shouldn't be too hard to do. when doing the last move, i made sure to keep the process extensible. i support keeping the current post-office's design, but moving it somewhere less harmful to brand new players with low-power CPUs.

i *VERY MUCH* think that we should move the post office to somewhere much farther from /spawn, and we should also declare and *enforce* an entity limit on all the plots in haven. my haven shops are important, but i also very much try to limit them because of client-side rendering issues that make playing the game unpleasnt. moving the post-office shouldn't be too hard to do. when doing the last move, i made sure to keep the process extensible. i support keeping the current post-office's design, but moving it somewhere less harmful to brand new players with low-power CPUs.
Member

I support moving post office away, but it's current placement is very convenient... Maybe we can have Virgillio's brother near spawn that will teleport you to the post office at least?

I support moving post office away, but it's current placement is very convenient... Maybe we can have Virgillio's brother near spawn that will teleport you to the post office at least?
Member

Things certainly got worse with the post office. It got better at the old place near the harbour when the post office was removed there. It got way worse on the way from spawn to airship at the new place. That path used to have way less loading problems and was less laggy.

But the post office is not the only issue. Walking from spawn to the sailship - is no fun. At the time I managed to get through that lag hell smaller Voice attacks are over.

If Alias might get comftable with at least some more teleport options - like one to the post office - that might help a lot of players a lot. But we also need some teleport to a chest storage so that all that chest content doesn't have to be transferred all the time.

NPC as traders might be able to replace some smart shops. They can offer a lot of deals in one go. Admittedly their inventory is a bit small. But they can restock from chests and also put things into chests.

The entity limit per plot might be a very good idea.

Things certainly got worse with the post office. It got better at the old place near the harbour when the post office was removed there. It got way worse on the way from spawn to airship at the new place. That path used to have way less loading problems and was less laggy. But the post office is not the only issue. Walking from spawn to the sailship - is no fun. At the time I managed to get through that lag hell smaller Voice attacks are over. If Alias might get comftable with at least *some* more teleport options - like one to the post office - that might help a lot of players a lot. But we also need some teleport to a chest storage so that all that chest content doesn't have to be transferred all the time. NPC as traders might be able to replace some smart shops. They can offer a lot of deals in one go. Admittedly their inventory is a bit small. But they can restock from chests and also put things into chests. The entity limit per plot might be a very good idea.
Member

Because they are hard to search for, linking this issue here "Client lag (mostly in Haven plot area)": #5005
Basically FPS drops issue, which is partially caused by signs too.

Because they are hard to search for, linking this issue here "Client lag (mostly in Haven plot area)": https://gitea.your-land.de/your-land/bugtracker/issues/5005 Basically FPS drops issue, which is partially caused by signs too.
Member

flux's ideas on how to reduce lag spikes:
#2416 (comment)

node_entity_queue is used only for smartshops still, could try it for signs too...

flux's ideas on how to reduce lag spikes: https://gitea.your-land.de/your-land/bugtracker/issues/2416#issuecomment-23623 `node_entity_queue` is used only for smartshops still, could try it for signs too...
Member

node_entity_queue is used only for smartshops still, could try it for signs too...

node_entity_queue is more of a way of avoiding server-side lag when generating a bunch of entities. we need a way to make the entities just not exist if players are standing more than e.g. 8 nodes away from them, and if they're not visible.

> node_entity_queue is used only for smartshops still, could try it for signs too... node_entity_queue is more of a way of avoiding server-side lag when generating a bunch of entities. we need a way to make the entities just not exist if players are standing more than e.g. 8 nodes away from them, and if they're not visible.
Member

Another related issue:
your-land/administration#152

Seems like at some point enchanting tables and item frames were creating new entities without deleting old ones? (my plot had maybe a couple of item frames and a single enchanting table, but flux found hundred entities for each?)
Is this still a thing?

Another related issue: https://gitea.your-land.de/your-land/administration/issues/152 Seems like at some point enchanting tables and item frames were creating new entities without deleting old ones? (my plot had maybe a couple of item frames and a single enchanting table, but flux found hundred entities for each?) Is this still a thing?

Probably no - maybe old entities are not cleaned up. Do /count_entities and guess whether there may be really 200 enchantment tables loaded right now.

That's how we can check entities are not all on the same place. Maybe could be added to debuggery or yl_commons:

local chatcommand_cmd = "logpos"

local function logpos(name, entity_name)

    local path = minetest.get_worldpath() .. DIR_DELIM .. "entpos.txt"
    local line_delim = "\n"

    if entity_name ~= "" and not minetest.registered_entities[entity_name] then
        return false, "unknown entity"
    end

    local count = 0
    local content = {"number;objectid;name;x;y;z" .. line_delim}

    if entity_name ~= "" then
        for oid, entity in pairs(minetest.luaentities) do
            if entity.name == entity_name then
                local pos = vector.round(entity.object:get_pos())
                count = count + 1
                local ret = count ..";" .. oid ..";" .. entity.name .. ";".. pos.x..";".. pos.y..";".. pos.z
                table.insert(content, ret)
            end
        end
    else
        for oid, entity in pairs(minetest.luaentities) do
            local pos = vector.round(entity.object:get_pos())
            count = count + 1
            local ret = count ..";" .. oid ..";" .. entity.name .. ";".. pos.x..";".. pos.y..";".. pos.z
            table.insert(content, ret)
        end
    end

    local s_content = table.concat(content,line_delim)

    minetest.safe_file_write(path, s_content)

    return true, "Done:".. count
end

local chatcommand_definition = {
    params = "<entity_name>",
    privs = {server = true},
    func = logpos
}

minetest.register_chatcommand(chatcommand_cmd, chatcommand_definition)
Probably no - maybe old entities are not cleaned up. Do /count_entities and guess whether there may be really 200 enchantment tables loaded right now. That's how we can check entities are not all on the same place. Maybe could be added to debuggery or yl_commons: ```lua local chatcommand_cmd = "logpos" local function logpos(name, entity_name) local path = minetest.get_worldpath() .. DIR_DELIM .. "entpos.txt" local line_delim = "\n" if entity_name ~= "" and not minetest.registered_entities[entity_name] then return false, "unknown entity" end local count = 0 local content = {"number;objectid;name;x;y;z" .. line_delim} if entity_name ~= "" then for oid, entity in pairs(minetest.luaentities) do if entity.name == entity_name then local pos = vector.round(entity.object:get_pos()) count = count + 1 local ret = count ..";" .. oid ..";" .. entity.name .. ";".. pos.x..";".. pos.y..";".. pos.z table.insert(content, ret) end end else for oid, entity in pairs(minetest.luaentities) do local pos = vector.round(entity.object:get_pos()) count = count + 1 local ret = count ..";" .. oid ..";" .. entity.name .. ";".. pos.x..";".. pos.y..";".. pos.z table.insert(content, ret) end end local s_content = table.concat(content,line_delim) minetest.safe_file_write(path, s_content) return true, "Done:".. count end local chatcommand_definition = { params = "<entity_name>", privs = {server = true}, func = logpos } minetest.register_chatcommand(chatcommand_cmd, chatcommand_definition) ```
Member

After checking visually some plots, town tall and tutorials with my find_entities command, I didn't find any duplicate entities.
Good to know that those fixes mentioned in that admin issue seem to actually work :p

After checking visually some plots, town tall and tutorials with my `find_entities` command, I didn't find any duplicate entities. Good to know that those fixes mentioned in that admin issue seem to actually work :p
Member

Seems like at some point enchanting tables and item frames were creating new entities without deleting old ones? (my plot had maybe a couple of item frames and a single enchanting table, but flux found hundred entities for each?)
Is this still a thing?
Good to know that those fixes mentioned in that admin issue seem to actually work :p

yeah i fixed those. see #2234 and #2235.

i did notice that the total count of itemframe entities on the server is often huge, but i haven't found any duplicates. i think some players just use them to label their storage areas.

image
image

> Seems like at some point enchanting tables and item frames were creating new entities without deleting old ones? (my plot had maybe a couple of item frames and a single enchanting table, but flux found hundred entities for each?) Is this still a thing? > Good to know that those fixes mentioned in that admin issue seem to actually work :p yeah i fixed those. see #2234 and #2235. i did notice that the total count of itemframe entities on the server is often huge, but i haven't found any duplicates. i think some players just use them to label their storage areas. ![image](/attachments/8684a848-f9b8-45d7-9640-b73092c0de19) ![image](/attachments/77ec70f4-b391-4133-8d65-223a280e58c5)
Member

What values of FPS are we talking about?
I seldom reduce range at spawn below 200 and have between 10 (on very bad days) to 25 (on very good days) FPS directly at spawn, getting better values when running towards public farm or harbor.

What values of FPS are we talking about? I seldom reduce range at spawn below 200 and have between 10 (on very bad days) to 25 (on very good days) FPS directly at spawn, getting better values when running towards public farm or harbor.
Member

What values of FPS are we talking about?

it's not just FPS "lag" - all of the entities loading causes a noticeable hiccup that can make the entire game freeze for a second or more. for players with low-powered hardware, it can be way worse than that.

> What values of FPS are we talking about? it's not just FPS "lag" - all of the entities loading causes a noticeable hiccup that can make the entire game freeze for a second or more. for players with low-powered hardware, it can be way worse than that.

Today (uptime 5d 4h) we had a maximum of 22 k entities on the server, 18k of which were itemframes. I used the updated logpos script to print them to a file. Many of them were duplicate positions:

44 of them led to an itemframe in Ernesto's plot. This itemframe hadn't been touched forever.

2075;23;1172

Do we not clean up itemframe entities for some reason, but only generate new?

Turns out a row of itemframes at Ravise's had 7 entities of each itemframe in one mapblock, but only 3 in another. Itemframes without item do not create an entity.

Today (uptime 5d 4h) we had a maximum of 22 k entities on the server, 18k of which were itemframes. I used the updated logpos script to print them to a file. Many of them were duplicate positions: 44 of them led to an itemframe in Ernesto's plot. This itemframe hadn't been touched forever. 2075;23;1172 Do we not clean up itemframe entities for some reason, but only generate new? Turns out a row of itemframes at Ravise's had 7 entities of each itemframe in one mapblock, but only 3 in another. Itemframes without item do not create an entity.

Updated logpos:


local chatcommand_cmd = "logpos"

local function logpos(name, entity_name)

    local path = minetest.get_worldpath() .. DIR_DELIM .. "entpos_" .. os.time(os.date("!*t")) .. ".txt"
    local line_delim = "\n"

    if entity_name ~= "" and not minetest.registered_entities[entity_name] then
        return false, "unknown entity"
    end

    local count = 0
    local content = {"number;objectid;name;x;y;z" .. line_delim}

    if entity_name ~= "" then
        for oid, entity in pairs(minetest.luaentities) do
            if entity.name == entity_name and entity.object then
                local ppos = entity.object:get_pos() or vector.new(0,0,0)
                local pos = vector.round(ppos)
                count = count + 1
                local ret = count ..";" .. oid ..";" .. entity.name .. ";".. pos.x..";".. pos.y..";".. pos.z
                table.insert(content, ret)
            end
        end
    else
        for oid, entity in pairs(minetest.luaentities) do
            if entity.object then
                local ppos = entity.object:get_pos() or vector.new(0,0,0)
                local pos = vector.round(ppos)
                count = count + 1
                local ret = count ..";" .. oid ..";" .. entity.name .. ";".. pos.x..";".. pos.y..";".. pos.z
                table.insert(content, ret)
            end
        end
    end

    local s_content = table.concat(content,line_delim)

    minetest.safe_file_write(path, s_content)

    return true, "Done:".. count
end

local chatcommand_definition = {
    params = "<entity_name>",
    privs = {server = true},
    func = logpos
}

minetest.register_chatcommand(chatcommand_cmd, chatcommand_definition)
Updated logpos: ```lua local chatcommand_cmd = "logpos" local function logpos(name, entity_name) local path = minetest.get_worldpath() .. DIR_DELIM .. "entpos_" .. os.time(os.date("!*t")) .. ".txt" local line_delim = "\n" if entity_name ~= "" and not minetest.registered_entities[entity_name] then return false, "unknown entity" end local count = 0 local content = {"number;objectid;name;x;y;z" .. line_delim} if entity_name ~= "" then for oid, entity in pairs(minetest.luaentities) do if entity.name == entity_name and entity.object then local ppos = entity.object:get_pos() or vector.new(0,0,0) local pos = vector.round(ppos) count = count + 1 local ret = count ..";" .. oid ..";" .. entity.name .. ";".. pos.x..";".. pos.y..";".. pos.z table.insert(content, ret) end end else for oid, entity in pairs(minetest.luaentities) do if entity.object then local ppos = entity.object:get_pos() or vector.new(0,0,0) local pos = vector.round(ppos) count = count + 1 local ret = count ..";" .. oid ..";" .. entity.name .. ";".. pos.x..";".. pos.y..";".. pos.z table.insert(content, ret) end end end local s_content = table.concat(content,line_delim) minetest.safe_file_write(path, s_content) return true, "Done:".. count end local chatcommand_definition = { params = "<entity_name>", privs = {server = true}, func = logpos } minetest.register_chatcommand(chatcommand_cmd, chatcommand_definition) ```

I can reproduce the issue on the testserver. The bad news is, the entities persist and accumulate over server restarts.

Repro:

  1. Add the /logpos command via snippets
  2. Hang an itemframe
  3. Run /logpos
    => There is no entity at this position: OK
  4. Add an item to the itemframe
  5. Run /logpos
    => There is one entity at this position: OK
  6. Move out of range, so that the mapblock that has the itemframe gets unloaded
  7. Wait until the itemframe is unlaoded, it takes server_unload_unused_data_timeout. On YL, that is 900 seconds = 15 minutes
  8. Run /logpos
    => The entity is unloaded, there are no entities at this position: OK
  9. Go back to the itemframe
  10. Run /logpos
    => There are now two itemframe entities at this position: NOK
  11. Restart server
  12. Run /logpos
    => There are still two itemframe entities at this position: NOK
I can reproduce the issue on the testserver. The bad news is, the entities persist and accumulate over server restarts. Repro: 1. Add the /logpos command via snippets 2. Hang an itemframe 3. Run /logpos => There is no entity at this position: OK 4. Add an item to the itemframe 5. Run /logpos => There is one entity at this position: OK 6. Move out of range, so that the mapblock that has the itemframe gets unloaded 7. Wait until the itemframe is unlaoded, it takes `server_unload_unused_data_timeout`. On YL, that is 900 seconds = 15 minutes 8. Run /logpos => The entity is unloaded, there are no entities at this position: OK 9. Go back to the itemframe 10. Run /logpos => There are now two itemframe entities at this position: NOK 11. Restart server 12. Run /logpos => There are still two itemframe entities at this position: NOK
Member

so a regression of #2235.

too bad tenplus1 deleted the old repos, i can't see what the fix was.

so a regression of #2235. too bad tenplus1 deleted the old repos, i can't see what the fix was.
Member

this was the original fix: ee24a223c9

this is what tenplus1 committed: 156c229ce4

the LBM, at least, seems to still exist, though the entities now static_save...

this was the original fix: https://notabug.org/fluxionary/itemframes/commit/ee24a223c95aa85020c99a752898b92e2e9edea2 this is what tenplus1 committed: https://codeberg.org/tenplus1/itemframes/commit/156c229ce41bbf778750ae30f381cbd8c963369b the LBM, at least, seems to still exist, though the entities now static_save...
Member

the LBM never actually culled duplicated entities, we relied on the fact that they didn't static_save.

the LBM never actually culled duplicated entities, we relied on the fact that they didn't static_save.
Member

static_save = false was removed in the latest commit for no obvious reason 8f39564306

`static_save = false` was removed in the latest commit for no obvious reason https://codeberg.org/tenplus1/itemframes/commit/8f39564306e041996815e40281070a0ebf0576e3
Member

and that commit happened after i said we'd fixed the proliferation of itemframe entities, so it was true at that time...

and that commit happened *after* i said we'd fixed the proliferation of itemframe entities, so it was true at that time...
Member

created a new issue for tracking an upstream PR to itemframes: #6638

created a new issue for tracking an upstream PR to itemframes: #6638
Member

i wrote a snippet so we can periodically cull the itemframe entities until upstream gets fixed and live

-- de-dupes itemframe entities. see https://gitea.your-land.de/your-land/bugtracker/issues/5234

local found_by_spos = {}
local count = 0
local removed = 0

for _, e in pairs(minetest.luaentities) do
 if e.name == "itemframes:item" then
  local pos = e.object:get_pos()
  if pos then
   local spos = minetest.pos_to_string(pos:round())
   if found_by_spos[spos] then
    e.object:remove()
    removed = removed + 1
   else
    found_by_spos[spos] = true
    count = count + 1
   end
  end
 end
end

print(string.format("%s unique itemframe locations, %s entities removed", count, removed))

image

i wrote a snippet so we can periodically cull the itemframe entities until upstream gets fixed and live ```lua -- de-dupes itemframe entities. see https://gitea.your-land.de/your-land/bugtracker/issues/5234 local found_by_spos = {} local count = 0 local removed = 0 for _, e in pairs(minetest.luaentities) do if e.name == "itemframes:item" then local pos = e.object:get_pos() if pos then local spos = minetest.pos_to_string(pos:round()) if found_by_spos[spos] then e.object:remove() removed = removed + 1 else found_by_spos[spos] = true count = count + 1 end end end end print(string.format("%s unique itemframe locations, %s entities removed", count, removed)) ``` ![image](/attachments/58b37159-e4e1-4818-8d2c-1667aaf531ff)
5.2 KiB
Sign in to join this conversation.
No Milestone
No project
No Assignees
8 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: your-land/bugtracker#5234
No description provided.