Mantis Bug Tracker

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0008638opensim[REGION] OpenSim Corepublic2020-01-05 09:162020-01-14 02:41
Reporteraiaustin 
Assigned ToUbitUmarov 
PrioritynormalSeverityminorReproducibilityalways
StatusclosedResolutionfixed 
PlatformPCOSWindowsOS Version10
Product Versionmaster (dev code) 
Target Versionmaster (dev code)Fixed in Version 
Summary0008638: On region shutdown, NPC is removed as root agent but then restated as a child agent in the shutting down region
DescriptionOn shutdown of a region (OSGGrid RuthAndRoth region on latest dev master OSGrid code 18-Dec-2019) I see the NPCs (two of them) being removed as root agents

[SCENE]: Removing root agent Ruth2 Resident 8446aebe-43ef-4f5b-953f-4dda3a96694d from RuthAndRoth
16:55:38 - [Scene]: The avatar has left the building

but then immediately they are logged as

[SCENE]: Adding new child scene presence Ruth2 Resident af8ae56a-5d46-4ce4-b02b-9da0acfcf901 to scene RuthAndRoth at pos <129.9895, 116.2932, 23.60664>
[SCENE PRESENCE]: Completing movement of Ruth2 Resident into region RuthAndRoth in position <129.9895, 116.2932, 23.60664>

I am not sure if this is new behaviour or if its been present for a while.

I tried deleting the Saved Script State folder, but that makes no difference.
TagsNo tags attached.
Git Revision or version number0.9.1.1 dev master 18-Dec-2019
Run Mode Grid (Multiple Regions per Sim)
Physics EngineBulletSim
Script EngineXEngine
Environment.NET / Windows64
Mono VersionNone
ViewerN/A
Attached Filestxt file icon NPC-Create-and-Sit.txt [^] (3,401 bytes) 2020-01-05 09:55 [Show Content]

- Relationships

-  Notes
(0036030)
danbanner (manager)
2020-01-05 09:20
edited on: 2020-01-05 09:21

Is this your script creating a new npc before the sim actually restarts? (I notice the uuid changed)

(0036031)
aiaustin (developer)
2020-01-05 09:55
edited on: 2020-01-05 10:25

Dan, do you mean that the script may somehow try to recreate the NPC before the shutdown manages to complete? That is possible as it has a timer (10 seconds) to recreate the NPC should it be removed. But if it gets in too fast would that not make a root agent?

Script attached as NPC-Create-and-Sit.txt

I can easily change the timer to a couple of minutes if that is the issue.

(0036032)
danbanner (manager)
2020-01-05 09:58
edited on: 2020-01-05 09:59

root is set after completing movement iirc...

but if the sim is restarting who cares ;)

(0036033)
Cnayl Rainbow (reporter)
2020-01-05 11:00

I've seen this happen in 0.9.0.1 also - never gave it much thought as it doesn't seem to affect the region shutdown.
(0036034)
BillBlight (developer)
2020-01-05 11:23

All Agents become child agents before they are upgraded to root agents, so it does just sound like it is just retrying too fast ..
(0036035)
UbitUmarov (administrator)
2020-01-05 18:29
edited on: 2020-01-05 18:41

Yes, that is just a bad script idea. Or a legacy one
The script should only create the NPC at region start, or user request, Not using a timer.

" restated as a child agent " is just misreading the npc creation process from the log files.

The badly syncronized multitask nature of opensim does the rest.

But on this case, this can be considered just ugly "noise" during the shutdown process

(0036036)
tampa (reporter)
2020-01-05 18:59

I have seen regions grind to a halt and even some "bad apples" causing problems for an entire grid given the spam on robust.

Creating npcs or other heavy objects on a timer without considering edge cases.

Raycast has the same effect, so do physics, treat them like kids, don't leave them unattended for too long or it will bite you, not to mention monitor your machinery to alert you of runaways.

Ideally when shutdown is issued script events should stop, but as that needs to fire some additional calls so scripts "know" of a region shutdown can't block them all either. Could block the npc module, but then you'd get script errors instead or worse. I don't think you can solve this without creating other "issues" and as Ubit said, this is just noise. If it does not lock up shutdown the most it could do is cause some funky business next time you load the region finding some remains of the npcs... what a creepy thought :S
(0036037)
aiaustin (developer)
2020-01-06 00:15

Lets call this the “Zombie NPC Problem” :-)

- Issue History
Date Modified Username Field Change
2020-01-05 09:16 aiaustin New Issue
2020-01-05 09:16 aiaustin Summary On region shutdown, NPC is removed and the restated as a child agent in the shurttigdown region => On region shutdown, NPC is removed as root agent but then restated as a child agent in the shutting down region
2020-01-05 09:20 danbanner Note Added: 0036030
2020-01-05 09:21 danbanner Note Edited: 0036030 View Revisions
2020-01-05 09:39 aiaustin Description Updated View Revisions
2020-01-05 09:55 aiaustin Note Added: 0036031
2020-01-05 09:55 aiaustin File Added: NPC-Create-and-Sit.txt
2020-01-05 09:58 danbanner Note Added: 0036032
2020-01-05 09:59 danbanner Note Edited: 0036032 View Revisions
2020-01-05 10:25 aiaustin Note Edited: 0036031 View Revisions
2020-01-05 11:00 Cnayl Rainbow Note Added: 0036033
2020-01-05 11:23 BillBlight Note Added: 0036034
2020-01-05 18:29 UbitUmarov Note Added: 0036035
2020-01-05 18:39 UbitUmarov Note Edited: 0036035 View Revisions
2020-01-05 18:41 UbitUmarov Note Edited: 0036035 View Revisions
2020-01-05 18:59 tampa Note Added: 0036036
2020-01-06 00:15 aiaustin Note Added: 0036037
2020-01-14 02:41 UbitUmarov Status new => closed
2020-01-14 02:41 UbitUmarov Assigned To => UbitUmarov
2020-01-14 02:41 UbitUmarov Resolution open => fixed


Copyright © 2000 - 2012 MantisBT Group
Powered by Mantis Bugtracker