Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Execution time of large TF commands #4331

Closed
DorpsGek opened this issue Dec 25, 2010 · 4 comments
Closed

Execution time of large TF commands #4331

DorpsGek opened this issue Dec 25, 2010 · 4 comments
Labels
flyspray This issue is imported from FlySpray (https://bugs.openttd.org/)

Comments

@DorpsGek
Copy link
Member

planetmaker opened the ticket and wrote:

The test run for large TF commands seems to impact on the execustion speed of the server, stopping it for the time the test is evaluated:

[01:17] I just checked, it seems like you can do a quite nasty thing to freeze a MP server on larger map sizes. Find (or raise) a high mountain at one corner. Then drag with the equal-level tool to the opposite corner. On 1024x1024 and a max-height mountain I've frozen OpenTTD for more than a minute now and you do not need to have money for the entire terraform action to do the attack, just enough money to raise
[01:18] I haven't actually tested this attack on a live MP server as I think it would be a bit unethical and haven't yet tested to set up an private server to test it on.
[01:23] hmm, maybe this DoCommand(P) should be able to timeout if it takes too long in order to protect the server. This might actually be good on all DoCommands as we yet do not konw all exploits on how to make a command take up a lot of time to execute.

Maybe a solution would be to limit the maximum size of allowed terraform commands:
[20:43] simply limit to say 64x64 tiles?
[20:45] then you could, coincidentally, implement the whole X terraforming per day. Possibly based on the X incoming bytes a day for network stuff
[20:45] so you're allowed to occasionally terraform 20x20 tiles, but not terraforming hundreds of tiles in a single tick

Reported version: trunk
Operating system: All


This issue was imported from FlySpray: https://bugs.openttd.org/task/4331
@DorpsGek
Copy link
Member Author

SmatZ wrote:

CmdClearArea has similiar problem, though not that serious.
What about just not executing the test run for those commands? Exec run stops when the company has no further money. Limiting the area size to something like 64x64 would help if one accidentally tries to terraform whole map with shift pressed, but commands/sec limiting wouldn't be needed.


This comment was imported from FlySpray: https://bugs.openttd.org/task/4331#comment9325

@DorpsGek
Copy link
Member Author

Rubidium wrote:

That would still fail for companies with really large amounts of money.

Even then, people have been asking for terraforming limitations. So we could add that, with a default that prevents someone from DoS-ing the server. However, people are still free to increase/remove the limitation of said setting. That shouldn't be that intrusive I'd say.


This comment was imported from FlySpray: https://bugs.openttd.org/task/4331#comment9326

@DorpsGek
Copy link
Member Author

Alberth wrote:

In SP this could be useful too, ie prevent cases like

[december 27, 2010, # openttd]
(12:52:33) FR^2: Grrr! I hate it ;) I draw a railway and a window pops up, and the rail goes across the whole continent.

while this is about laying tracks, the same applies to terraforming (in a worse way, as removing a terraform change is non-trivial).

Edit: Found it, #4264


This comment was imported from FlySpray: https://bugs.openttd.org/task/4331#comment9343

@DorpsGek
Copy link
Member Author

DorpsGek commented Jan 4, 2011

Rubidium closed the ticket.

Reason for closing: Fixed

In r21728


This comment was imported from FlySpray: https://bugs.openttd.org/task/4331

@DorpsGek DorpsGek closed this as completed Jan 4, 2011
@DorpsGek DorpsGek added Core flyspray This issue is imported from FlySpray (https://bugs.openttd.org/) labels Apr 7, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
flyspray This issue is imported from FlySpray (https://bugs.openttd.org/)
Projects
None yet
Development

No branches or pull requests

1 participant