[JIRA] (JENKINS-54566) Failed to execute command Pipe.Flush

2018-11-15 Thread laurens.leeu...@gmail.com (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Laurens Leeuwis edited a comment on  JENKINS-54566  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
  Re: Failed to execute command Pipe.Flush   
 

  
 
 
 
 

 
 [~jglick] Using the patched version of the {{workflow-api}} did make the {{Pipe.Flush(-1)}} log disappear! Great :){quote}failure to actually show log output would be a real bug. What step is involved? If {{sh}}, are you running an up-to-date {{durable-task}} & {{workflow-durable-task-step}}?{quote}We still don't see some logging in blue ocean using the patched version of {{workflow-api}} (we do see the logging in the 'normal' Jenkins views). We are making extensive use of {{sh}} steps. We're using {{durable-task}} v1.27 and {{workflow-durable-task-step}} v2.26. I think it might not be related to this {{Pipe.Flush(-1)}} issue after all. I found that we're running an ancient version of {{blueocean}} (v1.0.0-b23). Might be best to ignore this  for now .   
 

  
 
 
 
 

 
 
 

 
 
 Add Comment  
 

  
 

  
 
 
 
  
 

  
 
 
 
 

 
 This message was sent by Atlassian Jira (v7.11.2#711002-sha1:fdc329d)  
 

  
 

   





-- 
You received this message because you are subscribed to the Google Groups "Jenkins Issues" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[JIRA] (JENKINS-54566) Failed to execute command Pipe.Flush

2018-11-15 Thread laurens.leeu...@gmail.com (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Laurens Leeuwis commented on  JENKINS-54566  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
  Re: Failed to execute command Pipe.Flush   
 

  
 
 
 
 

 
 Jesse Glick Using the patched version of the workflow-api did make the Pipe.Flush(-1) log disappear! Great  

failure to actually show log output would be a real bug. What step is involved? If sh, are you running an up-to-date durable-task & workflow-durable-task-step?
 We still don't see some logging in blue ocean using the patched version of workflow-api (we do see the logging in the 'normal' Jenkins views). We are making extensive use of sh steps. We're using durable-task v1.27 and workflow-durable-task-step v2.26. I think it might not be related to this Pipe.Flush(-1) issue after all. I found that we're running an ancient version of blueocean (v1.0.0-b23). Might be best to ignore this.    
 

  
 
 
 
 

 
 
 

 
 
 Add Comment  
 

  
 

  
 
 
 
  
 

  
 
 
 
 

 
 This message was sent by Atlassian Jira (v7.11.2#711002-sha1:fdc329d)  
 

  
 

   





-- 
You received this message because you are subscribed to the Google Groups "Jenkins Issues" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[JIRA] (JENKINS-54566) Failed to execute command Pipe.Flush

2018-11-15 Thread laurens.leeu...@gmail.com (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Laurens Leeuwis edited a comment on  JENKINS-54566  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
  Re: Failed to execute command Pipe.Flush   
 

  
 
 
 
 

 
 I have the same problem as well. We had a single job which always gave this message in the logging. (the job containing lots of proprietary libraries. I tried to create a simpler reproduction to be able to share it here, but was not able to). When this job runs on master there is no problem.I've tried different versions of Jenkins (2.138.1, 2.138.2, 2.138.3) and different versions of remoting (3.25, 3.27).In the end I've slightly modified the remoting.jar so it logs more and did some digging around: * I found that this problem happens when first the finalize method of the ProxyOutputStream is called ([https://github.com/jenkinsci/remoting/blob/remoting-3.27/src/main/java/hudson/remoting/ProxyOutputStream.java#L180),] which sets the oid to -1 but leaves the channel as is. * After that the flush method is called ([https://github.com/jenkinsci/remoting/blob/remoting-3.27/src/main/java/hudson/remoting/ProxyOutputStream.java#L154).] * The 'Pipe.Flush(-1)' part of the error comes from [https://github.com/jenkinsci/remoting/blob/remoting-3.27/src/main/java/hudson/remoting/ProxyOutputStream.java#L320] * The rest of the message comes from [https://github.com/jenkinsci/remoting/blob/remoting-3.27/src/main/java/hudson/remoting/Channel.java#L570]I think it kind of makes sense that this fails. First you clean up ('garbage collect') the ProxyOutputStream and afterwards you try to flush it.I've logged some additional stacktraces at different places and saw: * The DelayBufferedOutputStream from the workflow-api-plugin seems to cause this. At [https://github.com/jenkinsci/workflow-api-plugin/blob/workflow-api-2.32/src/main/java/org/jenkinsci/plugins/workflow/log/DelayBufferedOutputStream.java#L100] it does the finalize first and flush afterwards.I'm in no way a Jenkins internals expert, but these seem to be related. I don't know in what way they are related (since DelayBufferedOutputStream inherits from BufferedOutputStream so it should flush that I presume, but I don't know how that is glued to a (remote?) ProxyOutputStream).Anyhow, downgrading the workflow-api-plugin to a pre 2.30 version (see in [https://github.com/jenkinsci/workflow-api-plugin/tree/workflow-api-2.29/src/main/java/org/jenkinsci/plugins/workflow] that the org.jenkinsci.plugins.workflow.log package doesn't even exist here) made this message disappear from the logs entirely (also after running the single job which always caused the issue).This also makes it seem log related. After doing some more digging we saw that the job which always gave the error message was not able to show logging for the steps it executed (only checked this in blue ocean).Hope this helps [~jglick]! Additional note: this finalize then flush seems to be added in [https://github.com/jenkinsci/workflow-api-plugin/commit/f8ef9d300cc85138bffb69e151b538e8dc163d6e] which would mean that workflow-api 2.30 would be ok to use as well (2.31 and higher contain this commit). I haven't checked this personally.  
 

  
 
 
 
 

 
 
 

 

[JIRA] (JENKINS-54566) Failed to execute command Pipe.Flush

2018-11-15 Thread laurens.leeu...@gmail.com (JIRA)
Title: Message Title


 
 
 
 

 
 
 

 
   
 Laurens Leeuwis commented on  JENKINS-54566  
 

  
 
 
 
 

 
 
  
 
 
 
 

 
  Re: Failed to execute command Pipe.Flush   
 

  
 
 
 
 

 
 I have the same problem as well. We had a single job which always gave this message in the logging. (the job containing lots of proprietary libraries. I tried to create a simpler reproduction to be able to share it here, but was not able to). When this job runs on master there is no problem. I've tried different versions of Jenkins (2.138.1, 2.138.2, 2.138.3) and different versions of remoting (3.25, 3.27). In the end I've slightly modified the remoting.jar so it logs more and did some digging around: 
 
I found that this problem happens when first the finalize method of the ProxyOutputStream is called (https://github.com/jenkinsci/remoting/blob/remoting-3.27/src/main/java/hudson/remoting/ProxyOutputStream.java#L180), which sets the oid to -1 but leaves the channel as is. 
After that the flush method is called (https://github.com/jenkinsci/remoting/blob/remoting-3.27/src/main/java/hudson/remoting/ProxyOutputStream.java#L154). 
The 'Pipe.Flush(-1)' part of the error comes from https://github.com/jenkinsci/remoting/blob/remoting-3.27/src/main/java/hudson/remoting/ProxyOutputStream.java#L320 
The rest of the message comes from https://github.com/jenkinsci/remoting/blob/remoting-3.27/src/main/java/hudson/remoting/Channel.java#L570 
 I think it kind of makes sense that this fails. First you clean up ('garbage collect') the ProxyOutputStream and afterwards you try to flush it. I've logged some additional stacktraces at different places and saw: 
 
The DelayBufferedOutputStream from the workflow-api-plugin seems to cause this. At https://github.com/jenkinsci/workflow-api-plugin/blob/workflow-api-2.32/src/main/java/org/jenkinsci/plugins/workflow/log/DelayBufferedOutputStream.java#L100 it does the finalize first and flush afterwards. 
 I'm in no way a Jenkins internals expert, but these seem to be related. I don't know in what way they are related (since DelayBufferedOutputStream inherits from BufferedOutputStream so it should flush that I presume, but I don't know how that is glued to a (remote?) ProxyOutputStream). Anyhow, downgrading the workflow-api-plugin to a pre 2.30 version (see in https://github.com/jenkinsci/workflow-api-plugin/tree/workflow-api-2.29/src/main/java/org/jenkinsci/plugins/workflow that the org.jenkinsci.plugins.workflow.log package doesn't even exist here) made this message disappear from the logs entirely (also after running the single job which always caused the issue). This also makes it seem log related. After doing some more digging we saw that the job which always gave the error message was not able to show logging for the steps it executed (only checked this in blue ocean). Hope this helps Jesse Glick!