Skip to content
Permalink
Browse files
[JENKINS-20769] Trying to fix/suppress some related observed or actua…
…l NPEs.

java.lang.NullPointerException
	at hudson.remoting.ProxyOutputStream$Flush$1.run(ProxyOutputStream.java:305)
	at hudson.remoting.PipeWriter$1.run(PipeWriter.java:158)
	at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
	at java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source)
	at java.util.concurrent.FutureTask.run(Unknown Source)
	at hudson.remoting.SingleLaneExecutorService$1.run(SingleLaneExecutorService.java:111)
  • Loading branch information
jglick committed Dec 17, 2013
1 parent 622af09 commit eb3a4c380e695580174ce381a8330e8e2b8a9b2e
Showing with 9 additions and 0 deletions.
  1. +3 −0 src/main/java/hudson/remoting/ProxyInputStream.java
  2. +6 −0 src/main/java/hudson/remoting/ProxyOutputStream.java
@@ -149,6 +149,9 @@ public EOF(int oid) {

protected void execute(Channel channel) {
InputStream in = (InputStream) channel.getExportedObject(oid);
if (in == null) {
return;
}
channel.unexport(oid);
try {
in.close();
@@ -299,6 +299,9 @@ public Flush(int ioId, int oid) {

protected void execute(Channel channel) {
final OutputStream os = (OutputStream) channel.getExportedObject(oid);
if (os == null) {
return;
}
markForIoSync(channel,requestId,channel.pipeWriter.submit(ioId,new Runnable() {
public void run() {
try {
@@ -363,6 +366,9 @@ public EOF(int ioId, int oid) {

protected void execute(final Channel channel) {
final OutputStream os = (OutputStream) channel.getExportedObject(oid);
if (os == null) {
return;
}
markForIoSync(channel,requestId,channel.pipeWriter.submit(ioId,new Runnable() {
public void run() {
channel.unexport(oid);

6 comments on commit eb3a4c3

@joshmoore
Copy link
Member

@joshmoore joshmoore commented on eb3a4c3 Jan 6, 2014

Choose a reason for hiding this comment

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

Is it known why the streams returned here would be null? Is that related to another issue?

@jglick
Copy link
Member Author

@jglick jglick commented on eb3a4c3 Jan 6, 2014

Choose a reason for hiding this comment

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

When the streams are null here, something else is wrong, but I do not know what; this is just a fix of the NullPointerException symptom. It may be that what is really wrong is routine and not very important (a dead slave agent, say), in which case being quiet is an improvement.

@joshmoore
Copy link
Member

@joshmoore joshmoore commented on eb3a4c3 Jan 6, 2014

Choose a reason for hiding this comment

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

Thanks for the info. We're seeing this with jenkins LTS and I'm looking to track down why. Cheers.

@akiasi
Copy link

@akiasi akiasi commented on eb3a4c3 Jan 21, 2014

Choose a reason for hiding this comment

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

When is this change going to be a part of Jenkins release? Can I track it somehow?

@jglick
Copy link
Member Author

@jglick jglick commented on eb3a4c3 Jan 31, 2014

Choose a reason for hiding this comment

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

Depends on when @kohsuke cuts a release of remoting and integrates it.

@oleg-nenashev
Copy link
Member

@oleg-nenashev oleg-nenashev commented on eb3a4c3 Mar 18, 2014

Choose a reason for hiding this comment

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

@kohsuke
It makes sense to publish the new version before the backporting to the next LTS patch-release starts.
The #21 would be also useful, because it allows to partially workaround issues with caching of DLLs on Windows (JENKINS-20913).

Please sign in to comment.