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

[JENKINS-35494] - FindBugs - fix minor File Management issues in hudson.remoting.Launcher #88

Merged
merged 1 commit into from Jun 9, 2016

Conversation

Projects
None yet
4 participants
@oleg-nenashev
Copy link
Member

commented Jun 9, 2016

  • Tcp port temporary file is not being closed properly when running in the runAsTcpServer() mode
  • tcpPortFile deletion issues are not being logged
  • Resource input stream is not being closed correctly

@reviewbybees

[JENKINS-35494] - FindBugs - fix minor File Management issues in huds…
…on.remoting.Launcher

- [x] Tcp port temporary file is not being closed properly when running in the runAsTcpServer() mode
- [x] tcpPortFile deletion issues are not being logged
- [x] Resource input stream is not being closed correctly
@stephenc

This comment has been minimized.

Copy link
Member

commented Jun 9, 2016

🐝 👍

@rsandell

This comment has been minimized.

Copy link
Member

commented Jun 9, 2016

🐝

@oleg-nenashev

This comment has been minimized.

Copy link
Member Author

commented Jun 9, 2016

@reviewbybees done
I'll merge it as a maintainer

@oleg-nenashev oleg-nenashev merged commit 4610a90 into jenkinsci:master Jun 9, 2016

1 check passed

Jenkins This pull request looks good
Details

oleg-nenashev added a commit that referenced this pull request Jun 9, 2016

oleg-nenashev added a commit to jenkinsci/jenkins that referenced this pull request Jun 10, 2016

Update remoting to 2.60
Changes summary:

Fixed issues:
* [JENKINS-22722](https://issues.jenkins-ci.org/browse/JENKINS-22722) - 
Make the channel reader tolerant against Socket timeouts. 
(jenkinsci/remoting#80)
* [JENKINS-32326](https://issues.jenkins-ci.org/browse/JENKINS-32326) - 
Support no_proxy environment variable. 
(jenkinsci/remoting#84)
* [JENKINS-35190](https://issues.jenkins-ci.org/browse/JENKINS-35190)  - 
Do not invoke PingFailureAnalyzer for agent=>master ping failures. 
(jenkinsci/remoting#85)
* [JENKINS-31256](https://issues.jenkins-ci.org/browse/JENKINS-31256) - 
 <code>hudson.Remoting.Engine#waitForServerToBack</code> now uses credentials for connection. 
(jenkinsci/remoting#87)
* [JENKINS-35494](https://issues.jenkins-ci.org/browse/JENKINS-35494) - 
Fix issues in file management in <code>hudson.remoting.Launcher</code> (main executable class). 
(jenkinsci/remoting#88)

Enhancements:
* Ensure a message is logged if remoting fails to override the default <code>ClassFilter</code>. 
(jenkinsci/remoting#80)

oleg-nenashev added a commit to jenkinsci/jenkins that referenced this pull request Jun 11, 2016

Update remoting to 2.60 (#2403)
Changes summary:

Fixed issues:
* [JENKINS-22722](https://issues.jenkins-ci.org/browse/JENKINS-22722) - 
Make the channel reader tolerant against Socket timeouts. 
(jenkinsci/remoting#80)
* [JENKINS-32326](https://issues.jenkins-ci.org/browse/JENKINS-32326) - 
Support no_proxy environment variable. 
(jenkinsci/remoting#84)
* [JENKINS-35190](https://issues.jenkins-ci.org/browse/JENKINS-35190)  - 
Do not invoke PingFailureAnalyzer for agent=>master ping failures. 
(jenkinsci/remoting#85)
* [JENKINS-31256](https://issues.jenkins-ci.org/browse/JENKINS-31256) - 
 <code>hudson.Remoting.Engine#waitForServerToBack</code> now uses credentials for connection. 
(jenkinsci/remoting#87)
* [JENKINS-35494](https://issues.jenkins-ci.org/browse/JENKINS-35494) - 
Fix issues in file management in <code>hudson.remoting.Launcher</code> (main executable class). 
(jenkinsci/remoting#88)

Enhancements:
* Ensure a message is logged if remoting fails to override the default <code>ClassFilter</code>. 
(jenkinsci/remoting#80)
// accept just one connection and that's it.
// when we are done, remove the port file to avoid stale port file
Socket s;
try {
s = ss.accept();
ss.close();
} finally {
tcpPortFile.delete();
boolean deleted = tcpPortFile.delete();

This comment has been minimized.

Copy link
@jtnord

jtnord Jun 13, 2016

Member

BTW - java 7 NIO is much better as it will tell you why it could not delete the file...

w.write(String.valueOf(ss.getLocalPort()));
w.close();

try {

This comment has been minimized.

Copy link
@jtnord

jtnord Jun 13, 2016

Member

try-with-resources?

@oleg-nenashev

This comment has been minimized.

Copy link
Member Author

commented Jun 13, 2016

@jtnord Yep, such Java7 improvements make sense. BTW it rather requires a bulk refactoring. I'm not ready to perform it now. Better to fix blocker issues first

olivergondza added a commit to jenkinsci/jenkins that referenced this pull request Jul 20, 2016

Update remoting to 2.60 (#2403)
Changes summary:

Fixed issues:
* [JENKINS-22722](https://issues.jenkins-ci.org/browse/JENKINS-22722) -
Make the channel reader tolerant against Socket timeouts.
(jenkinsci/remoting#80)
* [JENKINS-32326](https://issues.jenkins-ci.org/browse/JENKINS-32326) -
Support no_proxy environment variable.
(jenkinsci/remoting#84)
* [JENKINS-35190](https://issues.jenkins-ci.org/browse/JENKINS-35190)  -
Do not invoke PingFailureAnalyzer for agent=>master ping failures.
(jenkinsci/remoting#85)
* [JENKINS-31256](https://issues.jenkins-ci.org/browse/JENKINS-31256) -
 <code>hudson.Remoting.Engine#waitForServerToBack</code> now uses credentials for connection.
(jenkinsci/remoting#87)
* [JENKINS-35494](https://issues.jenkins-ci.org/browse/JENKINS-35494) -
Fix issues in file management in <code>hudson.remoting.Launcher</code> (main executable class).
(jenkinsci/remoting#88)

Enhancements:
* Ensure a message is logged if remoting fails to override the default <code>ClassFilter</code>.
(jenkinsci/remoting#80)
(cherry picked from commit c718516)

samatdav added a commit to samatdav/jenkins that referenced this pull request Jul 25, 2016

Update remoting to 2.60 (jenkinsci#2403)
Changes summary:

Fixed issues:
* [JENKINS-22722](https://issues.jenkins-ci.org/browse/JENKINS-22722) - 
Make the channel reader tolerant against Socket timeouts. 
(jenkinsci/remoting#80)
* [JENKINS-32326](https://issues.jenkins-ci.org/browse/JENKINS-32326) - 
Support no_proxy environment variable. 
(jenkinsci/remoting#84)
* [JENKINS-35190](https://issues.jenkins-ci.org/browse/JENKINS-35190)  - 
Do not invoke PingFailureAnalyzer for agent=>master ping failures. 
(jenkinsci/remoting#85)
* [JENKINS-31256](https://issues.jenkins-ci.org/browse/JENKINS-31256) - 
 <code>hudson.Remoting.Engine#waitForServerToBack</code> now uses credentials for connection. 
(jenkinsci/remoting#87)
* [JENKINS-35494](https://issues.jenkins-ci.org/browse/JENKINS-35494) - 
Fix issues in file management in <code>hudson.remoting.Launcher</code> (main executable class). 
(jenkinsci/remoting#88)

Enhancements:
* Ensure a message is logged if remoting fails to override the default <code>ClassFilter</code>. 
(jenkinsci/remoting#80)

samatdav added a commit to samatdav/jenkins that referenced this pull request Jul 25, 2016

Update remoting to 2.60 (jenkinsci#2403)
Changes summary:

Fixed issues:
* [JENKINS-22722](https://issues.jenkins-ci.org/browse/JENKINS-22722) - 
Make the channel reader tolerant against Socket timeouts. 
(jenkinsci/remoting#80)
* [JENKINS-32326](https://issues.jenkins-ci.org/browse/JENKINS-32326) - 
Support no_proxy environment variable. 
(jenkinsci/remoting#84)
* [JENKINS-35190](https://issues.jenkins-ci.org/browse/JENKINS-35190)  - 
Do not invoke PingFailureAnalyzer for agent=>master ping failures. 
(jenkinsci/remoting#85)
* [JENKINS-31256](https://issues.jenkins-ci.org/browse/JENKINS-31256) - 
 <code>hudson.Remoting.Engine#waitForServerToBack</code> now uses credentials for connection. 
(jenkinsci/remoting#87)
* [JENKINS-35494](https://issues.jenkins-ci.org/browse/JENKINS-35494) - 
Fix issues in file management in <code>hudson.remoting.Launcher</code> (main executable class). 
(jenkinsci/remoting#88)

Enhancements:
* Ensure a message is logged if remoting fails to override the default <code>ClassFilter</code>. 
(jenkinsci/remoting#80)
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.