Skip to content

Backport [Java] Observe error to avoid crash (#22016) #24843

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

Merged
merged 1 commit into from
Aug 14, 2020

Conversation

BrennanConroy
Copy link
Member

Description

Ungraceful disconnects can cause the Java application to crash. The cause is similar to how UnobservedTaskException's would crash the process in .NET. In the Java client there was a case where there was an exception and we would not observe it which crashes the process. The fix is to avoid causing the exception in the first place so there isn't an unobserved error.

Customer Impact

The bug was reported by a customer in issue #20187 and also by an internal customer recently who is asking us to backport the fix.

The bug can cause occasional crashes for ungraceful disconnects, these can be caused by things like going through a tunnel, etc.

Regression?

No

Risk

Low, fix is small and unlikely to cause issues.

@BrennanConroy BrennanConroy added the area-signalr Includes: SignalR clients and servers label Aug 12, 2020
@BrennanConroy BrennanConroy added this to the 3.1.x milestone Aug 12, 2020
@BrennanConroy BrennanConroy added the Servicing-consider Shiproom approval is required for the issue label Aug 13, 2020
@ghost
Copy link

ghost commented Aug 13, 2020

Hello human! Please make sure you've included the Shiproom Template in a comment or (preferably) the PR description. Also, make sure this PR is not marked as a draft and is ready-to-merge.

closeSubject.onComplete();
try {
closeLock.lock();
closeSubject.onComplete();
Copy link
Member

Choose a reason for hiding this comment

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

I'm assuming the user can't force us to take this lock in any strange ways so there's no chance of a dead lock.

Copy link
Member Author

Choose a reason for hiding this comment

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

Right, the user has no control over the callsite to this lock.

@leecow leecow added Servicing-approved Shiproom has approved the issue and removed Servicing-consider Shiproom approval is required for the issue labels Aug 13, 2020
@leecow leecow modified the milestones: 3.1.x, 3.1.8 Aug 13, 2020
@BrennanConroy
Copy link
Member Author

@dotnet/aspnet-build Merge please :)

@wtgodbe wtgodbe merged commit cd2b4bb into release/3.1 Aug 14, 2020
@wtgodbe wtgodbe deleted the brecon/bpObsError branch August 14, 2020 03:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-signalr Includes: SignalR clients and servers Servicing-approved Shiproom has approved the issue
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants