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

Get out of gerrit event stream loop in illegal state #62

Merged
merged 2 commits into from May 11, 2017

Conversation

Projects
None yet
3 participants
@rinrinne
Copy link
Contributor

commented May 8, 2017

InputStream generated by SSH channel may not reach EOF in illegal SSH connection state change. Due to this, GerritConnection cannot get out of the loop for reading gerrit stream.

This patch checks the state of SSH channel and connection per loop. In addition, send signal to watchdog only if stream read count is > 0 for working watchdog effectively.

Issue: #58

Add interface that returns SSH channel without connection
According to JSch document, stream handling for SSH channel should be
done before channel connection. Existing SShConnection cannot be
solved.

This path adds new interface that returns SSH channel without
connection. Server can handle streams then establish connection.

Server should handle JschException too.
@hugares

This comment has been minimized.

Copy link
Contributor

commented May 8, 2017

Thanks for the patch. I deployed it on our server, I will let you know if the issue is fixed.

test.log Outdated
@@ -0,0 +1,423 @@
[INFO] Scanning for projects...

This comment has been minimized.

Copy link
@rsandell

rsandell May 9, 2017

Collaborator

What is this doing here?

This comment has been minimized.

Copy link
@rinrinne

rinrinne May 9, 2017

Author Contributor

Ahhh, this was added by mistake. This is the output of "mvn test". I will remove this.

@rsandell

This comment has been minimized.

Copy link
Collaborator

commented May 9, 2017

OK, waiting with merge until @hugares reports back :)

@hugares

This comment has been minimized.

Copy link
Contributor

commented May 9, 2017

So far so good, almost 24 hours since I deployed the patch and we did not have the issue. We use to have it at least once per day. I will report back tomorrow same time, 48 hours without the issue will mean this patch is good to go.

Get out of gerrit event stream loop in illegal state
InputStream generated by SSH channel may not reach EOF
in illegal SSH connection state change.
Due to this, GerritConnection cannot get out of the loop
for reading gerrit stream.

This patch checks the state of SSH channel and connection
per loop. In addition, send signal to watchdog only if
stream read count is > 0 for working watchdog effectively.

@rinrinne rinrinne force-pushed the rinrinne:disconnect branch from a1fc6ef to 2487e7b May 9, 2017

@hugares

This comment has been minimized.

Copy link
Contributor

commented May 10, 2017

2 days without seeing the issue, I think we can merge this one

@rsandell

This comment has been minimized.

Copy link
Collaborator

commented May 11, 2017

Awesome! Thanks @hugares and @rinrinne

@rsandell rsandell merged commit 105b78d into sonyxperiadev:master May 11, 2017

@rinrinne

This comment has been minimized.

Copy link
Contributor Author

commented May 11, 2017

Thanks @hugares for verifying this in the wild and thanks @rsandell for merging:)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.