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

[UNDERTOW-1618][UNDERTOW-1619][UNDERTOW-1620] Fix issues with abstract framed channels #827

Merged
merged 4 commits into from Jan 4, 2020

Conversation

@fl4via fl4via changed the title Undertow 1618 [UNDERTOW-1618][UNDERTOW-1619][UNDERTOW-1620] Fix issues with abstract framed channels Nov 27, 2019
@fl4via
Copy link
Member Author

fl4via commented Nov 27, 2019

This is ok to test

while (allAreSet(state, STATE_READS_RESUMED) && allAreClear(state, STATE_CLOSED | STATE_STREAM_BROKEN) && moreData);
} finally {
} while (readAgain);
} catch (RuntimeException e) {
Copy link
Contributor

Choose a reason for hiding this comment

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

We might want to be cautious here and handle errors just in case.

Suggested change
} catch (RuntimeException e) {
} catch (RuntimeException | Error e) {

Copy link
Member Author

Choose a reason for hiding this comment

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

+1, I'll incorporate this change

taskRunQueue.poll().run();
Runnable runnable;
while ((runnable = taskRunQueue.poll()) != null) {
runnable.run();
Copy link
Contributor

Choose a reason for hiding this comment

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

Looks like there's one more instance of this pattern on newFrames in void flushSenders()

Copy link
Member Author

Choose a reason for hiding this comment

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

Good catch! I created https://issues.jboss.org/browse/UNDERTOW-1621 and I'll add a fix for this in this PR.

Copy link
Contributor

Choose a reason for hiding this comment

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

Thanks!

…_AWAKEN state, and synchronize read internal task in a way to prevent a wakeupReads() call being ignored in specific race condition scenarios
…STATE_CLOSED at AbstractFramedStreamSourceChannel.lastFrame
…ints that run taskRunQueue if they run concurrently
@fl4via fl4via added the bug fix Contains bug fix(es) label Nov 28, 2019
@fl4via fl4via added next release This PR will be merged before next release or has already been merged (for payload double check) waiting CI check Ready to be merged but waiting for CI check labels Jan 3, 2020
@fl4via fl4via merged commit c722ca2 into undertow-io:master Jan 4, 2020
@fl4via fl4via removed waiting CI check Ready to be merged but waiting for CI check next release This PR will be merged before next release or has already been merged (for payload double check) labels Jan 4, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug fix Contains bug fix(es)
Projects
None yet
2 participants