ID:1914830
 
Resolved
When a proc chain fails due to too much recursion, it will no longer count as a critical error (which can lead to eventual server shutdown). Also, if a catch block is available to catch the error, it will do so.
Applies to:Dream Daemon
Status: Resolved (508.1295)

This issue has been resolved.
After 3 infinite loop detections from DD, it appears DD kills itself flat out.

I agree with infinite loop detections, however, killing the server without way to turn it off (without disabling world.loop_checks, which is a WHOLE different can of worms) is bad, especially for false positives.
If you're doing something where you're triggering the loop check and it's not something disabling loop_checks will help, you're doing something wrong.

If you have loops running undelayed and uncontrolled, the server's going to crash anyways, regardless of whether the infinite loops are detected or not.

I'd look at your loops and figure out what you're doing wrong with them instead of asking for something that basically equates to a band-aid for poor programming practices.
On the scale of SS13, disabling loop checks will fix certain false positives.

of course this then basically drops any protection against other infinite loops.

infinite loops can pop up out of the blue, especially on an open source project (with a lot of trash old code), disabling loop checks is shooting yourself in the foot because 1 infinite loop (that's not a false positive) will kill your server without even any message about WHAT happened.

False loop check positives can cause server killing, and disabling loop checks to fix that opens up too big of a can of worms.
I'd be more worried about correcting the false positives than masking them.
Couldn't you know make sure there isn't infinite loops?
it's easier said than done
In response to PJB3005
PJB3005 wrote:
it's easier said than done

I agree with that, being an open source game. However, code should not be implemented into the whole source until thoroughly checked. This is something the owner\s of that source need to check up on.

I understand SS13 is a beast, but some quality control needs to be in place, disabling a feature like this will as Nadrew said, only mask the problem.
It won't mask the problem, it'll prevent a complete server shutdown for something (possibly) survivable.

Also we do have quality control, lots of it, but looking through gitlab's diff page isn't enough to find infinite loops. (in some cases)

Not to mention the amount of potential things that can go wrong. testing things thoroughly can be very hard.
Ya, We want the infiloop protection, what we don't want is the crash from when our users find ways to make objects interact with eachother in COOL AND NEW WAYS that trigger a recursion and crash everything.


disabling a feature like this will as Nadrew said, only mask the problem.

Making it so that every possible loop of objects interacting with each other in a recursive way in a code project of 300 THOUSAND lines causes a crash exploit that the users then abuse for kicks defeats the entire purpose of the feature.

We don't want the shit disabled, we just want it to stop shutting down the server after 3 triggers.

Make it a command line option, or a compile option, what ever you need, but having it turn a recursion loop into a crash exploit is just stupid
It's up to the developers to handle situations where said recursion can fly out of control, not BYOND. If you don't want infinite loops crashing out, fix them as you find them.

I'm not disagreeing with the ability to disable this safety check, I'm just saying it should fall solely on BYOND to manage these situations for you.
Couldn't you know make sure there isn't infinite loops?

SS13 is atomic, you can flat out deconstruct the entire station leaving only space, we have almost 10 thousand different defined things of subtype /obj/, code remains properly separated, things like energy guns hold a battery object inside them, and that battery object handles power management, (even borgs have these), We made it very atomic, we don't allow duplicate code, we actually enforce the separation of responsibility. (for new code at least, the original goon code is another issue)

The point here is, objects generally don't know, or care, about the objects they interact with, and there are ALOT of interactions:

We have an object, called a signaller, it triggers a signal on a radio frequency when you press a button, it can be attached to things like a voice analyzer, that will trigger the signaller when a certain word is said.

A lot of objects can be opened up, exposing their wires, you can then put a signaller on a wire to "pulse" it when triggered, pulsing a wire can do anything from shocking a door for 30 seconds to activating a function on a device.

We have such a device, it's called a voice recorder, it can record short segments of speech in game and play it back, it always starts with the phrase "[00:00] Recording Started." when you play it back.

It has a wire called the play wire, that will toggle play pause state when pulsed.

So what happens when you set a voice analyzer to the word recording, attach it to a signaller, put another signaller on the play wire of a tape recorder set to the same frequency, put it near a intercom with the speaker turned on and the mic button set to always on, and then say "recording" over the radio.

A server crash is what happens. Followed by that user than going around to every ss13 code base and abusing that bug (and getting banned by them all)

Oh, thats not all! I'll be back after some coffee to detail more of our FUN recursion crashes
The 'recording' scenario you mentioned seems to be a problem with the system itself. In my mind, it is the same as if you put a microphone near a speaker and you get feedback. There isn't really any anti-feedback system on electronics to prevent it, that is just how the objects interact. The way to fix that is make it 'not happen'. Disable the ability to do that scenario you mentioned and such a thing won't happen.
That is my perspective, anyhow.
There are valid points on both sides of the fence, but overall, the more moving parts are in a machine, the harder a problem is to diagnose to the root cause.

Sometimes infinite loops can happen because something in memory isn't maintained properly. You'll never get any kind of a traceback to the thing that caused it because the swap in memory wasn't the problem. It just exposed a problem way down the line in a sort of cascade.

With something the size of SS13, things will happen.

SS13 could be slimmed down and standardized a lot more, but even looking at that kind of a project would take years just to get what's currently there in the head of a team of organizers. SS13 is just too big and has too many cooks clustered around the pot for any one person to know everything that's going on.
In response to Ter13
Ter13 wrote:
There are valid points on both sides of the fence, but overall, the more moving parts are in a machine, the harder a problem is to diagnose to the root cause.

Sometimes infinite loops can happen because something in memory isn't maintained properly. You'll never get any kind of a traceback to the thing that caused it because the swap in memory wasn't the problem. It just exposed a problem way down the line in a sort of cascade.

With something the size of SS13, things will happen.

SS13 could be slimmed down and standardized a lot more, but even looking at that kind of a project would take years just to get what's currently there in the head of a team of organizers. SS13 is just too big and has too many cooks clustered around the pot for any one person to know everything that's going on.

Spot on, as they say: "Too many cooks in the kitchen will spoil the stew."
In response to AERProductions
AERProductions wrote:
The 'recording' scenario you mentioned seems to be a problem with the system itself. In my mind, it is the same as if you put a microphone near a speaker and you get feedback. There isn't really any anti-feedback system on electronics to prevent it, that is just how the objects interact. The way to fix that is make it 'not happen'. Disable the ability to do that scenario you mentioned and such a thing won't happen.
That is my perspective, anyhow.

Part of the appeal of ss13 is its pseudo-reality, Its a role playing game so having moments like "wait? you can do that?" is its lifeblood. "Hook a mouse trap up to a grenade then hide it under a piece of paper so that when somebody steps on the paper it triggers the mouse trap and that pulls the pin out activating the grenade?" Yep, you can do that.

But not all infinite recursions are actually infinite recursions:

In ss13 we have a chemical called space lube, if you poor space lube out on to the floor, and somebody walks on that floor tile, they slip, and fall, and get shot forwards in the direction they were moving. This is literally its only use, to make the space station equivalent of a slip and slide.

if you find a long enough straight corridor, put some space lube down on every tile, and three people walk down that corridor (or are picked up by somebody else, and thrown down that corridor), you get a server crash.

(set up a string of lube leading to an external airlock so that mob bumps into it, opening it, and getting sucked out into space from explosion decompression, dieing in space, yep! you can do that! (but you'll get banned for griffing if you aren't selected as a round antagonist))
In response to MrStonedOne
MrStonedOne wrote:
if you find a long enough straight corridor, put some space lube down on every tile, and three people walk down that corridor (or are picked up by somebody else, and thrown down that corridor), you get a server crash.

So? Put some measures in to control that to avoid a "crash". I don't see why you're making this such a huge deal when it's not.
In response to A.T.H.K
Except with the amount of things you can do in SS13, it's gonna take ages, and it's basically impossible to catch them all.

If you play/code SS13, you'll realise.
In response to PJB3005
PJB3005 wrote:
Except with the amount of things you can do in SS13, it's gonna take ages, and it's basically impossible to catch them all.

If you play/code SS13, you'll realise.

So pretty much, you're saying ... We can't be bothered to do X with our game, BYOND must do it for us even though all the tools are available to us?

I don't want to be an ass, but you're both making it quite hard not to come off as one..
In response to A.T.H.K
Technically, yes.

However, you're dealing with a load more sanity and stuff = worse performance.

And yes, that DOES matter for things like saycode.
A.T.H.K.

In that case, it's not a infinite recursion loop, it shouldn't crash.

But I see you still aren't getting the point, so i'll continue writing up examples of server crash exploits caused by this "feature"

We have an item called a field generator. This item when powered by a structure that emits power lasers in a direction (called an emitter no less) will spawn a containment field between it and other field generators in range. This is used to contain the black hole that powers the station. If you bump into a containment field border, it shocks you, and throws you backwards.

So what do you think happens when you get stuck on the inside of a containment field? You get thrown back, and hit the other edge, it throws you back, and you hit the first edge again.

(See where this is going?)

That is actually a case where we want the recursion. The idea of somebody getting tossed back and forth between these is kinda amusing, and it has sleeps so it won't hang the server.

But NOOOOOOO, apparently this one kind of runtime has to turn fun situations into a DoS exploit.
Page: 1 2 3 4 5