• All submissions to this site are governed by Second Life Project Contribution Agreement. By submitting patches and other information using this site, you acknowledge that you have read, understood, and agreed to those terms.
Issue Details (XML | Word | Printable)

Key: MISC-686
Type: New Feature New Feature
Status: Open Open
Priority: Major Major
Assignee: Unassigned
Reporter: Deanfred Brandeis
Votes: 29
Watchers: 12
Operations

If you were logged in you would be able to see more operations.
4. Second Life Misc Issues - MISC

Eliminate all script delays.

Created: 14/Sep/07 06:14 PM   Updated: 12/Jul/09 01:34 PM
Component/s: Miscellaneous
Affects Version/s: None
Fix Version/s: None

Environment: NA
Issue Links:
Duplicate
 
Relates
 


 Description  « Hide
Reproduction:
1. Try to create a viable product in LSL
2. Observe that many silly walls are run into

Script delays that are meant to prevent or slow down griefing and spamming do not work. Griefers, spammers, and honest developers alike can work around these problems by using the dispatcher-to-agents technique. Griefers and spammers don't care if they run into walls. They just try again and again and again.

The honest developers and their customers are the ones who really suffer because of these limitations. Developers can work around these delays, but due to the delays, they cannot easily write a robust, reliable application that will always work.

In addition, the use of "multithreading" in scripts causes more overall lag, due to the way that LSL is scheduled, and due to interscript communication overhead. These delays that are designed to lessen lag are actually causing more lag.

Allow honest developers to write robust applications. Don't cripple your technology to fight griefing and spamming.

1. Remove all simple script delays from the LSL runtime.
2. Use throttles similar to HTTPRequest has, if you must, on functions that really need it only.
3. Consider which functions really don't need delay/throttles.

  • but make sure we have a way to detect if we've been throttled

If detection of throttle is impossible then as a less desirable alternative cause the script to block when it is throttled (i.e. dynamic delay) This dynamic delay should only kick in after a threshold, it should be possible to make several zero-delay calls before encountering any with delays.



 All   Comments   Change History      Sort Order: Ascending order - Click to sort in descending order
WarKirby Magojiro added a comment - 15/Sep/07 07:14 AM
I don't think this is feaible. I do think the delays on some things need reconsidering, likt llLoadIRL. I wonder who decded ten seconds was a fair delay.

I think you would be best Campioning the easing of specific restrictions, rather than removing them across the board.


Lex Neva added a comment - 15/Sep/07 09:19 AM
I'd love to see some of the limitations reconsidered or removed. Look at llHTTPRequest(): the limitation system on that function is much more reasonable, allowing a small amount of bursting but capping calls when things get unreasonable.

That said, I'm pretty sure that the grey-goo fence actually works. There was a dark period lasting a few months that happened a few years ago, when grey goo attacks got really "popular". Now, they're pretty rare. Is this because griefers got bored, or because the grey goo fence works?


AnnMarie Otoole added a comment - 21/Oct/07 10:59 PM
OMG. What is grey-goo and how do I find an official position on it? I've just spent 2 weeks trying to find out why my XML project is running sooooo slow and searching brought me here.

The project works OK but my XML packets are taking random times between 15 seconds to over a minute. Don't tell me that this is deliberate and my project is down the drain?

Perhaps some warnings in the Wikis would be polite and save noobs like me a lot of time and expense - hard $US for a web site to handle the project!!!

There must be some solution or are we too much of a minority?


Lee Ponzu added a comment - 22/Oct/07 11:27 AM
Suppose instead of breaking abusive behavior abilities (and thus crippling the environment for honest users) there were better abuse detection and correction mechanisms.

For example, if a script starts rapidly spawning copies, an alarm goes off somewhere in Linden Lab central, and someone investigates. If it is on an estate, the alarm could go to estate managers, as well. If it is on my property, let me know by IM or email.

Better alarms, better detection, and better correction tools would be better than arbitrary restrictions.

It's our world, after all 8-)


Lee Ponzu added a comment - 22/Oct/07 11:32 AM
Changed the title slightly to eflect conversation

Smitty Boyau added a comment - 22/Oct/07 01:04 PM
There has to be a better way.

AnnMarie Otoole added a comment - 25/Oct/07 12:51 AM
Actually, I have to agree that the delays have been effective in combating the griefing abuse.

I also appreciate that while there are many better solutions to the XML-RPC abuse problem than doing the delay lobotomy, there are thousands of higher priority projects ahead of this so the chance of getting a better solution is very long term.

BUT 30 second+ delays are UNREASONABLE and kill legitimate projects along with the griefers. Rather than the original ZERO delay, one or two seconds of delay will still curb the griefing results but allow legitimate uses.

PLEASE - I did not discover this UNDISCLOSED delay until after 3 weeks of scripting and work on this project. It would be a simple task on the next rolling restart to change than delay back to a sane length.

PLEASE


AnnMarie Otoole added a comment - 30/Oct/07 11:15 PM
Changed from NEW FEATURE to BUG.

1. This is an existing function that is failing about 25% of the time, not a new feature.
2. On applications using the XML-RPC functions the delays appear to be random and about 25% of those delays exceed the XML-RPC query time-out so the message fails and no acknowledgment is received from Second Life at the remote site. So even in quite slow, message situations, application data is lost.

Repeating undelivered messages only compounds the communication bandwidth load and increases accumulated delays to many minutes.

Please set the XML-RPC delays back to sane levels of a second or two to deter griefing and restore these XML-RPC functions.


Deanfred Brandeis added a comment - 31/Oct/07 10:02 PM
I'm changing the title of this bug back to its original purpose. If you think there are specific bugs causing particular functionality to fail, please create your own bug report. This report is to request that LL completely remove all script delays.

AnnMarie Otoole added a comment - 31/Oct/07 11:07 PM
No problem Deanfred, but it is not going to happen. The delays are not going away.

Most of the delays are going to be permanent and until more complex policing method is in place, and with priorities the way they are, it could take years. Our only hope if we're stuck with them is to get them reduced to sane levels. This would be a minor edit and has a much better chance of implementation.

The XML-RPC delays running up to a minute and more are outlandish and constitute a bug by causing errors since the Internet XML-RPC response time-out is shorter than some of the script delays.

I was hoping to get better attention by converting it to a bug. I assume that updates have lower priority.


Gigs Taggart added a comment - 03/Nov/07 02:56 AM
The XML-RPC delays are not intentional, there's another bug for them.

AnnMarie Otoole added a comment - 03/Nov/07 08:49 AM
Do you have a reference or link to the bug report? I couldn't find one.

I don't know if that is good news or bad - an intentional delay introduced in response to the "grey goo" would be easy to correct. A bug may have to wait longer to get attention.


Gigs Taggart added a comment - 06/Nov/07 11:28 PM
I'm kinda hijacking this bug. A little. I think it would be better to simply focus on getting rid of simplistic delays. You probably weren't around during the major grid attacks last year. The gray-goo fence is there for a very good reason, and it works.

I think that a system of throttles, similar to what is on HTTPRequest is something that Linden Lab will accept. I doubt your bug, as it was written, would fly.

Please consider this compromise. We need to be realistic and take Linden Lab's needs into account here. We can't just ask for a free-for-all, delays were added for a reason, they are just a very bad solution to the problem.


Gigs Taggart added a comment - 06/Nov/07 11:30 PM
AnnMarie: SVC-29

Domchi Underwood added a comment - 18/Nov/07 01:22 PM
My vote on more intelligent throttling.

Current delays and limitations encourage... actually, require scripters to resort to hacking instead of clean programming. This both makes code more prone to bugs, makes maintenance harder, slows down sims, and results in legacy code which either breaks once the platform gets upgraded, or worse, limits the way in which it does.

In any case, the LSL is currently the only programming language I know about which intentionally limits the functionality to achieve better security. This might work so far, but needs to change. I don't think anybody expects this to change overnight and without a lot of thought, but I sure do hope delays are not here to stay.

In my opinion, the scripts should be considered innocent until proven guilty, and delays should be introduced only after the script does a lot of potentially troublesome actions in a small period of time - but not before.


Lex Neva added a comment - 19/Nov/07 07:52 PM
I think this should be changed from a bug back to a feature request. The system as implemented now is working as designed; it's the design that we want changed. That means this should be a New Feature proposal.

AnnMarie Otoole added a comment - 19/Nov/07 08:32 PM
The system as implemented now is not working. I seriously doubt that it was "designed" to have delays that exceed the XML time-outs and fail completely 30% of the time. I also feel that a bug repair will get it higher priority than a wish list item.

Lex Neva added a comment - 20/Nov/07 10:19 AM
The horrible unreliability of XML-RPC is a completely separate issue from this one. This issue is talking about purposeful delays imposed by the LSL runtime environment after making calls to certain functions like llInstantMessage() [2 seconds], llLoadURL() [10 seconds], etc. More info on all known delays here:

http://lslwiki.net/lslwiki/wakka.php?wakka=ScriptDelay

The problem with XML-RPC is definitely not a purposeful delay. It's just that that system hasn't scaled very well as more and more scripts have started using XML-RPC. There's an issue for that: SVC-29.

So when I say that the system is working as designed, I mean that the enforced short delays listed in my first link above are definitely working as LL intended them to... we just want to change their minds about the need for purposeful script delays.


WarKirby Magojiro added a comment - 21/Nov/07 02:30 AM
Changed back to feature. Ann's request about XML RPC is not a forced delay, but is caused by communication problems, and is unrelated to this.

Leonro Sands added a comment - 06/Mar/08 06:37 PM

The problem is simply the question "how to share the limited server resources between the users".

The current implementation of delays is not safe (users can work around it at the expensive of complex multitasking), not fair (more scripts inside the application give you a bigger share), and not resource-effective (you don't get the performance even if there are unused server resources).

A better solution to protect the server would be to use user-resource counter:
Any action performed by a user or one of his scripts he owns should have a resource measure which is added to his resource counter. The counter relaxes itself towards zero at a certain rate (like 1% per second). When one of his scripts calls a function then it will be checked if the user would overstep his allowed limit, and if this would be the case then the function blocks until the resource counter is relaxed enough to allow this operation (the time can be calculated from the relaxation formula).

Fair share:
Everyone who owns (or rents) a piece of land in a sim gets his share of resources from a "owner resource pool". Every visitor gets a share of a "visitor resource pool"

Performance effective:
Depending on how much the server is stressed, the relaxation time can be adjusted. This is the same as using time dilation. For an optimal use of the resources one would use several counters: a memory resource counter, a CPU time counter, and a bandwidth counter for requests to data servers, and sim-sim communication.


Jahar Aabye added a comment - 12/Jun/08 08:39 PM
Reproduction of this was rather difficult. Try as I might, I could not find any function or action which initiated the silly_wall() event.

Ok, in all seriousness, I think it's worth noting that the Grey Goo fence is the primary defense against griefing, these delays are meant more as a defense against unintentionally bad scripts. Obviously script threading can bypass most of these delays, but the idea is that script threading requires intentional desire to bypass these delays and run these functions in sequence at that faster rate. Adding in delays prevents someone from accidentally including one of these functions in a for or while loop, or somewhere else where it might accidentally be triggered too quickly.

Replacing script delays with throttling might actually be worse, in some respects. Script delays allow scripters to anticipate the timing of certain functions and events. Ironically, for all the talk of policies that favor "honest" scripters over griefers (or my greater fear, incompetent scripters), throttling might actually be worse than script delays. A good scripter will work with the script delays to make a product that works in a consistent and predictable manner. Throttling would create a situation where the scripter knows that his product will work in a certain manner up to a point, but one that is sort of floating (a floating point? ok ok, bad computer joke) and imprecise. Script delays can generally be more reliable that throttles, which should only be used when absolutely necessary (sound throttling, for instance, is something absolutely necessary, but even then we've seen what happened with the first attempt at its implementation recently).

Finally, "multithreading" with scripts should not cause a significant amount of excess lag if it is done correctly. The communication between scripts needs to be efficient and correctly parsed. Yes, it is more difficult than if the delays weren't there and threading was unnecessary, but I think that what we're discussing here is more an issue of convenience than necessity.

I have no problem with discussing whether some script delay times should be changed, or whether some can be removed, but I think it's a bit silly to say that we ought to eliminate all script delays simply because they are inconvenient.


Strife Onizuka added a comment - 12/Jun/08 10:05 PM
I've seen a lot of LSL programing mistakes over the years. I don't mean the stuff that makes your script not work, I mean the stuff that makes your script two times slower. I would love to have the delays removed or made more sensible... and for some functions LL has done so on request (llBase64ToInteger for example).

I don't think this is a good idea for the reasons that Jahar stated.

The reason for a delay is to discourage bad programming. Why not design it so it rewards good programming? You could forgive the delay for time run. Here is what I mean:
1) event is entered, a time counter is started that is similar to llResetTime()
2) some code is run
3) a function is called that has a delay, from the amount of time the event has been running it subtracts the delay of the function, if the result is negative, it sleeps until it is greater than or equal to zero.
4) goto step 2 if there is more code to be run.

A call to llSleep would let you pay forwards some amount of time. There would be a cap to the amount of time you could accumulate. Not all of a delay should be forgivable. There should be some portion that the user must pay then.


Gigs Taggart added a comment - 13/Jun/08 03:32 AM - edited
Strife: Wasn't that the way energy was supposed to work?

Jahar you said: "'multithreading' with scripts should not cause a significant amount of excess lag if it is done correctly."

This is not true. The LSL scheduler gives something like 0.001-0.003 ms of time to every running script. It doesn't matter if it's Hello, Avatar. Drop 5000 Hello, Avatar scripts in a sim and watch the script performance drop to total crap. So a good scripter is one that uses a minimum number of scripts.

The other big drawback is that it creates parallel programming problems that most LSL scripters should not need to face. LSL is supposed to be a simple language. Introducing unnecessary opportunities for race conditions and deadlocks is the opposite of what LSL is supposed to be about.

With Mono, we have the opportunity to eliminate all script delays. This may be our only realistic chance to do it for a long time. Mono will already break scripts that rely on LSL being slow. Eliminating script delays at the same time will not cause excessive additional problems.


Strife Onizuka added a comment - 22/Jun/09 11:34 PM
Gigs: In a way it was yes, except that was for physics. As long as your physical object wasn't doing anything taxing, it would regenerate it's energy pool. Once it started doing something taxing, it would eat that energy. Energy worked on the object level, what I was suggesting would work on the script level.