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

Fixes mask deadlock for angle mask #2456

Conversation

TheMeinerLP
Copy link
Member

Overview

Fixes #2448

Description

This PR fixes some deadlock scenarios from angle mask.
I reverted some code peaces but try to keep it native to java.

Submitter Checklist

Preview Give feedback

@TheMeinerLP TheMeinerLP marked this pull request as ready for review October 10, 2023 15:41
@TheMeinerLP TheMeinerLP requested a review from a team as a code owner October 10, 2023 15:41
@github-actions github-actions bot added the Bugfix This PR fixes a bug label Oct 10, 2023
Copy link
Member

@dordsor21 dordsor21 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is completely negating the entire point of the call lock - we should NOT be editing a chunk set/get whilst the parent is being called. The fix is to correctly synchronise/wait elsewhere on the call chain, and the fact it's locking is an indicator that improvements to the order need to be changed.

@TheMeinerLP
Copy link
Member Author

This is completely negating the entire point of the call lock - we should NOT be editing a chunk set/get whilst the parent is being called. The fix is to correctly synchronise/wait elsewhere on the call chain, and the fact it's locking is an indicator that improvements to the order need to be changed.

But the current code is "unstable" and makes the behavior to crash servers.

Apply this a temp solution to fix the issues and after that we can apply a better solution.

@SirYwell
Copy link
Member

This solution isn't really better - it is just unsafe with other unforseen side effects.

@TheMeinerLP
Copy link
Member Author

This solution isn't really better - it is just unsafe with other unforseen side effects.

Thats true, what i learned. If some code does not work or makes issues. Rollback it and apply a better solution.

@MrJoshuaT
Copy link

This would seem to be more stable than any 2.7.x or 2.8.x versions, even if not correct this is more like the 2.6.x behaviour which was very stable. Our 1.20.1 public creative server was crashing constantly with users doing any angle mask, so we had to disable all of them.

In 2.7.x or 2.8.x when a user did a large size angle mask brush, 30 or more, the server would stop ticking and crash every time. With this change this behaviour is better - there still a side effect when a large brush is used constantly FAWE will lock up for that user, but the server will not crash, from initial testing, which is better behaviour

@dordsor21
Copy link
Member

Closing in favour of #2461

@dordsor21 dordsor21 closed this Oct 14, 2023
@TheMeinerLP TheMeinerLP deleted the bugfix/2448_mask-thread-deadlock branch December 2, 2023 11:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bugfix This PR fixes a bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Parallel Masks Causing Deadlock With Brushes
4 participants