Mantis Bug Tracker

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0007858opensim[REGION] Scripting Enginepublic2016-03-23 11:122019-02-06 11:30
ReporterTotal Sorbet 
Assigned ToDiva 
PrioritynormalSeveritymajorReproducibilityalways
StatusclosedResolutionfixed 
PlatformOpensimOSLinuxOS VersionDebian Stretch
Product Versionmaster (dev code) 
Target VersionFixed in Versionmaster (dev code) 
Summary0007858: llDie() leaves prim in region
DescriptionllDie() fails to remove primitive from region
Steps To Reproduce1) create object and place this script inside it:

  default
      {
      on_rez(integer p)
          {
          llSay(0,(string)p);
          if(p!=0){llSleep(0.3);llDie();}
          }
      }

2) create 2nd object with this script inside it:

  default
      {
      touch_start(integer n)
          {
          integer i=1;
          while(i<100)
              {
              llRezObject("sphere",llGetPos()+0,0,1>,ZERO_VECTOR,ZERO_ROTATION,i);
              ++i;
              }
          llSay(0,"done");
          }
      }

3) place object created in step 1) inside object step 2) contents

4) click the object.. eventually it will leave a prim behind

Additional InformationNo problem on 0.8.3 but occasional naughty behaviour on 0.9
TagsNo tags attached.
Git Revision or version number
Run Mode Grid (Multiple Regions per Sim)
Physics EngineOther
EnvironmentMono / Linux64
Mono VersionOther
Viewersingularity
Attached Files

- Relationships

-  Notes
(0030110)
Total Sorbet (reporter)
2016-03-23 11:20

bug is still reproducible if script 1) above is just:

  default
      {
      on_rez(integer p)
          {
          llDie();
          }
      }
(0030111)
melanie (administrator)
2016-03-23 12:34

Don't use llDie in on_rez or in state_entry of the default clause. Object creation is asynchronous and you're triggering a race condition where the system tries to delete the prim before it actually exists.
Use a timer instead:

llSetTimerInterval(0.5);

timer { llDie(); }
(0030112)
Total Sorbet (reporter)
2016-03-23 14:43

Yes it would seem script was dependant on 0.8.3 timing subtleties.

Thanks for the explanation Melanie your solution works like a charm.

I would close this mantis if only i knew how ;)
(0030118)
Total Sorbet (reporter)
2016-03-25 03:20

Unfortunately after further testing this is still presenting same problem. Using Melanies method the sim still fails to delete object even in cases where llSetTimerEvent(30.0) is being used.
(0030122)
JeffKelley (reporter)
2016-03-28 02:39

I could repro the issue under e8b4602/Linux + ubODE. When trying to edit the objects left, they have no name and "Loading contents...". They disappear after a relog. When two avatars perform the same experiment, they do not see the same prims. Avatar B may see prims left by an experiment performed by avatar A when avatar A don't see them.

Melanie's method was used.
(0030178)
Mandarinka Tasty (reporter)
2016-04-11 18:49

Hi Total :)

Have You written Your script in the first object, that it is rezzed by second one
in following way:

default
{
    on_rez(integer p)
    {
        llSay(0,(string)p);
        if(p != 0)
        {
            llSetTimerEvent(1);
        }
    }
    timer()
    {
        llSetTimerEvent(0);
        llDie();
    }
}

Certainly, I would also care about variable: MinTimerInterval in Your opensim configuration.

Regards
(0030181)
Total Sorbet (reporter)
2016-04-12 13:11

Hi Mandarinka,

Yes that's the method im using to test.

I was feeling optimistic so today i downloaded OSgrid OpenSimulator 0.9.0.dev.ed9d4fe - [zip] [31.8mb] 04-05-2016 and ran tests again.. thousands and thousands of times and all was well.

..However if you test in a sim (same sw/config) thats under load (scripts/npcs/avatars ie game sim Outbreak) the symptoms appear again pretty quickly and consistently. Its exactly as Jeff describes above.

Server load is at 30% peak and there's bags of bandwidth so im not sure how this relates.

Regards
(0030185)
Mandarinka Tasty (reporter)
2016-04-12 16:52
edited on: 2016-04-12 17:26

Hello Total :)

So it looks, that it can be hard to classify this problem ( or maybe not a problem ) as an issue referring to script engine.

Using simple words, server ( under certain conditions - big load ) experiences problems with such situations, like You have mentioned.

Due to asynchronicity, when server is busy, all seems to be very delayed and

then such problems appear and exist.

I remind situations even from our big brother SL, when owner of the region

has inivted around 80 people to the party and starts to blame LL company for

incredibly massive lag,bad peformance, weak workof scripts, that are not able to
 
react on almost anything.

And company answers him/her: that reseident can only blame himself/herself for

such situation = creating too big load on the server.

Certainly, Your situation is kind of different, though it can be understood, in this way too.

Maybe You need to try to play with certain variables existing in [XEngine] section of Your OpenSim.ini.

But changing them, even if it really gives You noticeable improvements

can cause other issues, maybe not at once but later, and they can be really

hard to detect.

So please be careful:)

Other advice: try to consider other way of scripting, that could detect properly moment ( especially under stress situation for the region ),
to make prim die.

That can be hard to create at once, but it is worth to do :)

What else I may say: I've noticed that at the beginning You were trying to use llSleep.

I absolutely, and that i base on my own experiments and experiences, recommned to not use llSleep at all, especialy in configurations based on official releases of opensim ( osgrid too ).

Unless You really deeply and much dig in the code and make your own advanced compilation drastically different than official ones.

Opensim really can't work with llsleep. Even , if after restart, it seems to work, then next, after certain, not big time, it stimply stops to work in aspect of scripts.

I made, in the past, nice scenario using NPCs, that were using osNpcSay,

to make scenario looks real,i needed to use more osNpcSay and certainly,to avoid chat spam, i set breaks based on llSleep, and

next day i came to the region and all scripts, did not want to respond to me at all.

I did not know what to do, i restarted, well, again all was well till certain moment.

So i was digging in opensim/ni and at forums and i found warnings: do not use

llsleep.

It was 2 years ago, and i stopped to use llSleep at all and i also strongly advise it to my residents: avoid llSleep, always use timer_event

I realise that it can be harder to achieve, because it requires more intelligent scripting, especially dealing with timer_event and using different tricks

to teach timer to work. But it is really great school of scripting

I have learned a lot )

Good Luck and Regards :)

(0030186)
Total Sorbet (reporter)
2016-04-13 06:55

Thanks Mandarinka!

To clarify:

Using method llSleep() or method llSetTimerEvent() does not produce this bug on simulator 0.8.3 - llDie() works as expected.

Using method llSleep() or method llSetTimerEvent() DOES produce this bug on simulator 0.9.x - llDie() fails to remove objects (exactly as Jeff describes)
(0030244)
danbanner (manager)
2016-04-30 03:08

If the objects disappear after a relog it seems llDie must actually be working but the viewer is not getting correct scene updates.
(0030445)
Diva (administrator)
2016-06-11 09:04

Can someone please paste here an updated script that shows the problem. It seems the original script has some problems identified by Melanie, but I cannot recreate the new problematic script from the conversation.
(0030446)
Diva (administrator)
2016-06-11 09:40

[09:38] <cia-opensim> opensim: diva * r1468ee9179f7 OpenSim/Region/Framework/Scenes (Scene.cs):
[09:38] <cia-opensim> Mantis 0007858. This is s shot in the dark, because I cannot reproduce the problem. Removed what seemed to be redundant kill object calls that weren't there in 0.8.2 -- kill object is already being called in DeleteGroupFromScene.

Please test and report back.
(0030447)
Total Sorbet (reporter)
2016-06-11 10:04

Hi Diva,

Steps to repro:

1) rez box and place following script inside it.

  default
  {
      touch_start(integer n)
      {
      integer i=1;
          while(i<100)
          {
          llRezObject("sphere",llGetPos()+<0,0,1>,ZERO_VECTOR,ZERO_ROTATION,i);
          ++i;
          }
      llSay(0,"done");
      }
  }

2) rez a sphere. name it sphere and place following script inside it.

  default
  {
      on_rez(integer p)
      {
      llSay(0,(string)p);
      if(p != 0){llSetTimerEvent(1);}
      }
      timer()
      {
      llSetTimerEvent(0);
      llDie();
      }
  }

3) place sphere made at step 2) inside object contents of box made in step 1)

4) click box to start test. it may take several runs for bug to show itself but eventually it will leave a sphere behind.
(0030449)
Total Sorbet (reporter)
2016-06-11 10:47

Built git OpenSim 0.9.0.0 Dev 1468ee9 and tested using above method.

Sorry to say it seems worse. More often than not its leaving a prim behind :(
(0030450)
Diva (administrator)
2016-06-11 11:21

OK. I noticed that the avination code removed a lock that was there in kill objects, with a big red warning from Justin not to remove it. I'll add it back later today.
(0030455)
melanie (administrator)
2016-06-11 13:41
edited on: 2016-06-12 05:39

That lock is harmful. Please don't put it back, find another way to get the same effect. It causes deadlocks when mixing temprez, die at edge and scripted llDie as you would in a combat sim. Locking is not the solution there.

(0030462)
Diva (administrator)
2016-06-12 12:24

[12:24] <cia-opensim> opensim: diva * r42a9afdc43cc OpenSim/Region (3 files in 2 dirs):
[12:24] <cia-opensim> Mantis 0007858: DeleteSceneObject done slightly differently. ProcessEntities now checks whether the objects have been deleted and, if so, sends an extra kill object packet, in order to compensate for potential race conditions encountered by the first one.
[12:24] <cia-opensim> Note: I still cannot reproduce this problem, but I was able to emulate it by adding an artificial delay on ProcessEntities, which did, indeed, result in objects not being deleted. This fix fixed my emulated scenario.
(0030463)
Total Sorbet (reporter)
2016-06-12 13:55

Built from git and tested extensively under low load and heavy load conditions. Over 20,000 of rezzes and derezzes and not a single failure to remove prim. Fantastic!

Many Thanks
(0030466)
Diva (administrator)
2016-06-12 14:08

As per reported
(0030467)
Diva (administrator)
2016-06-12 14:30

Still some issues with child agents
(0030468)
Diva (administrator)
2016-06-12 14:30

[14:29] <cia-opensim> opensim: diva * rd0c65d15dc02 OpenSim/Region/Framework/Scenes (SceneObjectGroup.cs):
[14:29] <cia-opensim> Still mantis 0007858: send kill object / update to child agents too
(0030469)
JeffKelley (reporter)
2016-06-12 14:46

No more objects left in child agents's view since d0c65d1.

Total Sorbet, can you double check ?
(0030497)
Total Sorbet (reporter)
2016-06-13 09:54

I have tested child agent scenario and can say from the child agents perspective there is a 100% failure every time to remove prims from view.

From root agents perspective its all been a 100% success.

Happy to test again when required
(0030498)
Diva (administrator)
2016-06-13 09:56

did you update?
(0030499)
Total Sorbet (reporter)
2016-06-13 09:58

updating now... will test and report back
(0030500)
Total Sorbet (reporter)
2016-06-13 10:42

Great news!

20k of rez/derez now produces expected results for me on both root and child agents.

Tested further under deliberately high cpu/network load and was without single failure.

It would seem someone has been working their magic ;)

Thank you.
(0030505)
Diva (administrator)
2016-06-13 13:56

This time, it's really fixed
(0031034)
Total Sorbet (reporter)
2016-08-18 14:41

This issue is back :( Noticed on master 17th august.
(0031035)
Total Sorbet (reporter)
2016-08-20 04:25

Updated from master 20th August and tested from both root and child perspective.
Found to be working 100%. I am unable to create condition under which lldie() is not removing prim.
(0034505)
BillBlight (developer)
2019-02-06 11:30

Marked as Resolved but never closed, can be reopened if needed.

- Issue History
Date Modified Username Field Change
2016-03-23 11:12 Total Sorbet New Issue
2016-03-23 11:20 Total Sorbet Note Added: 0030110
2016-03-23 12:34 melanie Note Added: 0030111
2016-03-23 14:43 Total Sorbet Note Added: 0030112
2016-03-23 14:47 Total Sorbet Status new => resolved
2016-03-24 14:44 Total Sorbet Status resolved => closed
2016-03-24 14:44 Total Sorbet Resolution open => reopened
2016-03-24 14:45 Total Sorbet Resolution reopened => open
2016-03-24 14:45 Total Sorbet Resolution open => fixed
2016-03-24 14:45 Total Sorbet Fixed in Version => master (dev code)
2016-03-25 03:16 danbanner Status closed => feedback
2016-03-25 03:16 danbanner Resolution fixed => reopened
2016-03-25 03:20 Total Sorbet Note Added: 0030118
2016-03-25 03:20 Total Sorbet Status feedback => new
2016-03-28 02:39 JeffKelley Note Added: 0030122
2016-04-11 18:49 Mandarinka Tasty Note Added: 0030178
2016-04-12 13:11 Total Sorbet Note Added: 0030181
2016-04-12 16:52 Mandarinka Tasty Note Added: 0030185
2016-04-12 17:26 Mandarinka Tasty Note Edited: 0030185 View Revisions
2016-04-13 06:55 Total Sorbet Note Added: 0030186
2016-04-30 03:08 danbanner Note Added: 0030244
2016-06-11 09:04 Diva Note Added: 0030445
2016-06-11 09:40 Diva Note Added: 0030446
2016-06-11 10:04 Total Sorbet Note Added: 0030447
2016-06-11 10:47 Total Sorbet Note Added: 0030449
2016-06-11 11:21 Diva Note Added: 0030450
2016-06-11 13:41 melanie Note Added: 0030455
2016-06-12 05:39 aiaustin Note Edited: 0030455 View Revisions
2016-06-12 12:24 Diva Note Added: 0030462
2016-06-12 13:55 Total Sorbet Note Added: 0030463
2016-06-12 14:08 Diva Note Added: 0030466
2016-06-12 14:08 Diva Status new => resolved
2016-06-12 14:08 Diva Resolution reopened => fixed
2016-06-12 14:08 Diva Assigned To => Diva
2016-06-12 14:30 Diva Note Added: 0030467
2016-06-12 14:30 Diva Status resolved => assigned
2016-06-12 14:30 Diva Note Added: 0030468
2016-06-12 14:46 JeffKelley Note Added: 0030469
2016-06-13 09:54 Total Sorbet Note Added: 0030497
2016-06-13 09:56 Diva Note Added: 0030498
2016-06-13 09:58 Total Sorbet Note Added: 0030499
2016-06-13 10:42 Total Sorbet Note Added: 0030500
2016-06-13 13:56 Diva Note Added: 0030505
2016-06-13 13:56 Diva Status assigned => resolved
2016-08-18 14:41 Total Sorbet Note Added: 0031034
2016-08-18 14:41 Total Sorbet Status resolved => confirmed
2016-08-20 04:25 Total Sorbet Note Added: 0031035
2016-08-20 04:25 Total Sorbet Status confirmed => resolved
2019-02-06 11:30 BillBlight Note Added: 0034505
2019-02-06 11:30 BillBlight Status resolved => closed


Copyright © 2000 - 2012 MantisBT Group
Powered by Mantis Bugtracker