Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-37566

FindBugs-clean remoting layer

XMLWordPrintable

    • Icon: Task Task
    • Resolution: Fixed
    • Icon: Major Major
    • remoting

      I would like to cleanup FindBugs in remoting by Remoting 3.0.
      Actually the plan is to perform the most of the fixes in Remoting 2 stabilization branch and then merge them towards 3.0

      Current state in the master branch:

      [INFO] BugInstance size is 54
      [INFO] Error size is 0
      [INFO] Total bugs: 54
      [INFO] Wait not in loop in hudson.remoting.AsyncFutureImpl.get(long, TimeUnit) [hudson.remoting.AsyncFutureImpl] At AsyncFutureImpl.java:[line 83] WA_NOT_IN_LOOP
      [INFO] hudson.remoting.Capability.read(InputStream) may fail to close stream [hudson.remoting.Capability] At Capability.java:[line 124] OS_OPEN_STREAM
      [INFO] hudson.remoting.Capability.writePreamble(OutputStream) may fail to close stream [hudson.remoting.Capability] At Capability.java:[line 114] OS_OPEN_STREAM
      [INFO] hudson.remoting.Channel.getProperty(ChannelProperty) is unsynchronized, hudson.remoting.Channel.setProperty(Object, Object) is synchronized [hudson.remoting.Channel] At Channel.java:[line 1210] UG_SYNC_SET_UNSYNC_GET
      [INFO] hudson.remoting.ChannelBuilder.getProperties() may expose internal representation by returning ChannelBuilder.properties [hudson.remoting.ChannelBuilder] At ChannelBuilder.java:[line 277] EI_EXPOSE_REP
      [INFO] Return value of putIfAbsent is ignored, but checksum is reused in hudson.remoting.Checksum.calculateFor(URL) [hudson.remoting.Checksum] At Checksum.java:[line 111] RV_RETURN_VALUE_OF_PUTIFABSENT_IGNORED
      [INFO] Private method hudson.remoting.ChunkedOutputStream.frameSize() is never called [hudson.remoting.ChunkedOutputStream] At ChunkedOutputStream.java:[line 34] UPM_UNCALLED_PRIVATE_METHOD
      [INFO] Non serializable hudson.remoting.RemoteClassLoader$IClassLoader written to ObjectOutput in hudson.remoting.ClassLoaderHolder.writeObject(ObjectOutputStream) [hudson.remoting.ClassLoaderHolder] At ClassLoaderHolder.java:[line 44] DMI_NONSERIALIZABLE_OBJECT_WRITTEN
      [INFO] hudson.remoting.DiagnosedStreamCorruptionException.getReadAhead() may expose internal representation by returning DiagnosedStreamCorruptionException.readAhead [hudson.remoting.DiagnosedStreamCorruptionException] At DiagnosedStreamCorruptionException.java:[line 33] EI_EXPOSE_REP
      [INFO] hudson.remoting.DiagnosedStreamCorruptionException.getReadBack() may expose internal representation by returning DiagnosedStreamCorruptionException.readBack [hudson.remoting.DiagnosedStreamCorruptionException] At DiagnosedStreamCorruptionException.java:[line 29] EI_EXPOSE_REP
      [INFO] Unwritten field: hudson.remoting.ExportTable$Entry.recorder [hudson.remoting.ExportTable$Entry] At ExportTable.java:[line 110] UWF_UNWRITTEN_FIELD
      [INFO] hudson.remoting.ExportTable$ExportList is serializable but also an inner class of a non-serializable class [hudson.remoting.ExportTable$ExportList] At ExportTable.java:[lines 241-255] SE_BAD_FIELD_INNER_CLASS
      [INFO] Return value of Throwable.getStackTrace() ignored, but method has no side effect [hudson.remoting.ExportTable$Source] At ExportTable.java:[line 211] RV_RETURN_VALUE_IGNORED_NO_SIDE_EFFECT
      [INFO] Exceptional return value of java.io.File.setLastModified(long) ignored in hudson.remoting.FileSystemJarCache.lookInCache(Channel, long, long) [hudson.remoting.FileSystemJarCache] At FileSystemJarCache.java:[line 53] RV_RETURN_VALUE_IGNORED_BAD_PRACTICE
      [INFO] Exceptional return value of java.io.File.delete() ignored in hudson.remoting.FileSystemJarCache.retrieve(Channel, long, long) [hudson.remoting.FileSystemJarCache] At FileSystemJarCache.java:[line 113] RV_RETURN_VALUE_IGNORED_BAD_PRACTICE
      [INFO] hudson.remoting.InitializeJarCacheMain.copyFile(File, File) may fail to clean up java.io.OutputStream on checked exception [hudson.remoting.InitializeJarCacheMain, hudson.remoting.InitializeJarCacheMain, hudson.remoting.InitializeJarCacheMain, hudson.remoting.InitializeJarCacheMain, hudson.remoting.InitializeJarCacheMain] Obligation to clean up resource created at InitializeJarCacheMain.java:[line 69] is not dischargedPath continues at InitializeJarCacheMain.java:[line 70]Path continues at InitializeJarCacheMain.java:[line 72]Path continues at InitializeJarCacheMain.java:[line 76]Path continues at InitializeJarCacheMain.java:[line 77] OBL_UNSATISFIED_OBLIGATION_EXCEPTION_EDGE
      [INFO] hudson.remoting.InitializeJarCacheMain.copyFile(File, File) may fail to close stream on exception [hudson.remoting.InitializeJarCacheMain] At InitializeJarCacheMain.java:[line 69] OS_OPEN_STREAM_EXCEPTION_PATH
      [INFO] Exceptional return value of java.util.concurrent.ExecutorService.submit(Runnable) ignored in hudson.remoting.JarCacheSupport.resolve(Channel, long, long) [hudson.remoting.JarCacheSupport] At JarCacheSupport.java:[line 61] RV_RETURN_VALUE_IGNORED_BAD_PRACTICE
      [INFO] Invocation of reflect.Method.setAccessible(boolean), which should be invoked from within a doPrivileged block, in hudson.remoting.Launcher.addClasspath(String) [hudson.remoting.Launcher] At Launcher.java:[line 131] DP_DO_INSIDE_DO_PRIVILEGED
      [INFO] Unread field: hudson.remoting.PipeWindow$Real.key [hudson.remoting.PipeWindow$Real] At PipeWindow.java:[line 176] URF_UNREAD_FIELD
      [INFO] The field hudson.remoting.PreloadJarTask.target is transient but isn't set by deserialization [hudson.remoting.PreloadJarTask] In PreloadJarTask.java SE_TRANSIENT_FIELD_NOT_RESTORED
      [INFO] ProxyOutputStream.java:[line 185] is set to null inside finalize method in hudson.remoting.ProxyOutputStream [hudson.remoting.ProxyOutputStream] At ProxyOutputStream.java:[line 185] FI_FINALIZER_NULLS_FIELDS
      [INFO] ProxyWriter.java:[line 200] is set to null inside finalize method in hudson.remoting.ProxyWriter [hudson.remoting.ProxyWriter] At ProxyWriter.java:[line 200] FI_FINALIZER_NULLS_FIELDS
      [INFO] Inconsistent synchronization of hudson.remoting.ProxyWriter.channel; locked 64% of time [hudson.remoting.ProxyWriter, hudson.remoting.ProxyWriter, hudson.remoting.ProxyWriter, hudson.remoting.ProxyWriter, hudson.remoting.ProxyWriter, hudson.remoting.ProxyWriter, hudson.remoting.ProxyWriter, hudson.remoting.ProxyWriter, hudson.remoting.ProxyWriter, hudson.remoting.ProxyWriter, hudson.remoting.ProxyWriter, hudson.remoting.ProxyWriter, hudson.remoting.ProxyWriter] Unsynchronized access at ProxyWriter.java:[line 167]Unsynchronized access at ProxyWriter.java:[line 167]Unsynchronized access at ProxyWriter.java:[line 168]Unsynchronized access at ProxyWriter.java:[line 168]Synchronized access at ProxyWriter.java:[line 185]Synchronized access at ProxyWriter.java:[line 185]Synchronized access at ProxyWriter.java:[line 186]Synchronized access at ProxyWriter.java:[line 111]Synchronized access at ProxyWriter.java:[line 158]Synchronized access at ProxyWriter.java:[line 158]Synchronized access at ProxyWriter.java:[line 180]Synchronized access at ProxyWriter.java:[line 78]Synchronized access at ProxyWriter.java:[line 82] IS2_INCONSISTENT_SYNC
      [INFO] Inconsistent synchronization of hudson.remoting.ProxyWriter.oid; locked 80% of time [hudson.remoting.ProxyWriter, hudson.remoting.ProxyWriter, hudson.remoting.ProxyWriter, hudson.remoting.ProxyWriter, hudson.remoting.ProxyWriter] Unsynchronized access at ProxyWriter.java:[line 168]Synchronized access at ProxyWriter.java:[line 185]Synchronized access at ProxyWriter.java:[line 187]Synchronized access at ProxyWriter.java:[line 158]Synchronized access at ProxyWriter.java:[line 83] IS2_INCONSISTENT_SYNC
      [INFO] Inconsistent synchronization of hudson.remoting.ProxyWriter.closed; locked 75% of time [hudson.remoting.ProxyWriter, hudson.remoting.ProxyWriter, hudson.remoting.ProxyWriter, hudson.remoting.ProxyWriter] Unsynchronized access at ProxyWriter.java:[line 102]Synchronized access at ProxyWriter.java:[line 176]Synchronized access at ProxyWriter.java:[line 177]Synchronized access at ProxyWriter.java:[line 93] IS2_INCONSISTENT_SYNC
      [INFO] hudson.remoting.RemoteClassLoader.create(ClassLoader, RemoteClassLoader$IClassLoader) creates a hudson.remoting.RemoteClassLoader classloader, which should be performed within a doPrivileged block [hudson.remoting.RemoteClassLoader] At RemoteClassLoader.java:[line 115] DP_CREATE_CLASSLOADER_INSIDE_DO_PRIVILEGED
      [INFO] Invocation of reflect.Method.setAccessible(boolean), which should be invoked from within a doPrivileged block, in hudson.remoting.RemoteClassLoader.<static initializer for RemoteClassLoader>() [hudson.remoting.RemoteClassLoader] At RemoteClassLoader.java:[line 330] DP_DO_INSIDE_DO_PRIVILEGED
      [INFO] The field hudson.remoting.RemoteClassLoader$ClassFile2.clazz is transient but isn't set by deserialization [hudson.remoting.RemoteClassLoader$ClassFile2] In RemoteClassLoader.java SE_TRANSIENT_FIELD_NOT_RESTORED
      [INFO] hudson.remoting.RemoteClassLoader$ClassLoaderProxy.<static initializer for ClassLoaderProxy>() creates a hudson.remoting.RemoteClassLoader$ClassLoaderProxy$1 classloader, which should be performed within a doPrivileged block [hudson.remoting.RemoteClassLoader$ClassLoaderProxy] At RemoteClassLoader.java:[line 996] DP_CREATE_CLASSLOADER_INSIDE_DO_PRIVILEGED
      [INFO] The field hudson.remoting.RemoteClassLoader$ResourceFile.local is transient but isn't set by deserialization [hudson.remoting.RemoteClassLoader$ResourceFile] In RemoteClassLoader.java SE_TRANSIENT_FIELD_NOT_RESTORED
      [INFO] Invocation of reflect.Method.setAccessible(boolean), which should be invoked from within a doPrivileged block, in hudson.remoting.RemoteInvocationHandler$RPCRequest.perform(Channel) [hudson.remoting.RemoteInvocationHandler$RPCRequest] At RemoteInvocationHandler.java:[line 884] DP_DO_INSIDE_DO_PRIVILEGED
      [INFO] The field hudson.remoting.RemoteInvocationHandler$RPCRequest.classLoader is transient but isn't set by deserialization [hudson.remoting.RemoteInvocationHandler$RPCRequest] In RemoteInvocationHandler.java SE_TRANSIENT_FIELD_NOT_RESTORED
      [INFO] Exceptional return value of java.util.concurrent.ExecutorService.submit(Runnable) ignored in hudson.remoting.SingleLaneExecutorService.execute(Runnable) [hudson.remoting.SingleLaneExecutorService] At SingleLaneExecutorService.java:[line 105] RV_RETURN_VALUE_IGNORED_BAD_PRACTICE
      [INFO] Exceptional return value of java.util.concurrent.ExecutorService.submit(Runnable) ignored in hudson.remoting.SingleLaneExecutorService$1.run() [hudson.remoting.SingleLaneExecutorService$1] At SingleLaneExecutorService.java:[line 120] RV_RETURN_VALUE_IGNORED_BAD_PRACTICE
      [INFO] Class hudson.remoting.UserRequest defines non-transient non-serializable instance field classLoaderProxy [hudson.remoting.UserRequest] In UserRequest.java SE_BAD_FIELD
      [INFO] The field hudson.remoting.UserRequest.exports is transient but isn't set by deserialization [hudson.remoting.UserRequest] In UserRequest.java SE_TRANSIENT_FIELD_NOT_RESTORED
      [INFO] Exceptional return value of java.io.File.delete() ignored in hudson.remoting.Util.createTempDir() [hudson.remoting.Util] At Util.java:[line 81] RV_RETURN_VALUE_IGNORED_BAD_PRACTICE
      [INFO] Exceptional return value of java.io.File.mkdir() ignored in hudson.remoting.Util.createTempDir() [hudson.remoting.Util] At Util.java:[line 82] RV_RETURN_VALUE_IGNORED_BAD_PRACTICE
      [INFO] Exceptional return value of java.io.File.mkdirs() ignored in hudson.remoting.Util.makeResource(String, byte[]) [hudson.remoting.Util] At Util.java:[line 60] RV_RETURN_VALUE_IGNORED_BAD_PRACTICE
      [INFO] Invocation of reflect.Field.setAccessible(boolean), which should be invoked from within a doPrivileged block, in hudson.remoting.Which.jarFile(URL, String) [hudson.remoting.Which, hudson.remoting.Which, hudson.remoting.Which, hudson.remoting.Which] At Which.java:[line 144]Another occurrence at Which.java:[line 149]Another occurrence at Which.java:[line 154]Another occurrence at Which.java:[line 204] DP_DO_INSIDE_DO_PRIVILEGED
      [INFO] Exception is caught when Exception is not thrown in hudson.remoting.Which.jarFile(URL, String) [hudson.remoting.Which] At Which.java:[line 186] REC_CATCH_EXCEPTION
      [INFO] hudson.remoting.jnlp.Main.createEngine() may fail to close stream [hudson.remoting.jnlp.Main] At Main.java:[line 199] OS_OPEN_STREAM
      [INFO] Useless object stored in variable certificates of method hudson.remoting.jnlp.Main.createEngine() [hudson.remoting.jnlp.Main] At Main.java:[line 183] UC_USELESS_OBJECT
      [INFO] Unread public/protected field: org.jenkinsci.remoting.engine.JnlpServer3Handshake.cookie [org.jenkinsci.remoting.engine.JnlpServer3Handshake] At JnlpServer3Handshake.java:[line 62] URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD
      [INFO] JnlpServer3Handshake.handshakeCiphers not initialized in constructor and dereferenced in org.jenkinsci.remoting.engine.JnlpServer3Handshake.authenticateToSlave() [org.jenkinsci.remoting.engine.JnlpServer3Handshake] At JnlpServer3Handshake.java:[line 120] UWF_FIELD_NOT_INITIALIZED_IN_CONSTRUCTOR
      [INFO] JnlpServer3Handshake.handshakeCiphers not initialized in constructor and dereferenced in org.jenkinsci.remoting.engine.JnlpServer3Handshake.validateSlave() [org.jenkinsci.remoting.engine.JnlpServer3Handshake] At JnlpServer3Handshake.java:[line 139] UWF_FIELD_NOT_INITIALIZED_IN_CONSTRUCTOR
      [INFO] Exceptional return value of java.util.concurrent.AbstractExecutorService.submit(Runnable) ignored in org.jenkinsci.remoting.nio.NioChannelHub.run() [org.jenkinsci.remoting.nio.NioChannelHub, org.jenkinsci.remoting.nio.NioChannelHub] At NioChannelHub.java:[line 592]Another occurrence at NioChannelHub.java:[line 610] RV_RETURN_VALUE_IGNORED_BAD_PRACTICE
      [INFO] NioChannelHub$NioTransport.receiver not initialized in constructor and dereferenced in org.jenkinsci.remoting.nio.NioChannelHub$NioTransport.abort(Throwable) [org.jenkinsci.remoting.nio.NioChannelHub$NioTransport] At NioChannelHub.java:[line 208] UWF_FIELD_NOT_INITIALIZED_IN_CONSTRUCTOR
      [INFO] Class org.jenkinsci.remoting.nio.NioChannelHub$NioTransport$1 defines non-transient non-serializable instance field this$1 [org.jenkinsci.remoting.nio.NioChannelHub$NioTransport$1] In NioChannelHub.java SE_BAD_FIELD
      [INFO] Class org.jenkinsci.remoting.nio.NioChannelHub$NioTransport$2 defines non-transient non-serializable instance field this$1 [org.jenkinsci.remoting.nio.NioChannelHub$NioTransport$2] In NioChannelHub.java SE_BAD_FIELD
      [INFO] Invocation of reflect.Method.setAccessible(boolean), which should be invoked from within a doPrivileged block, in org.jenkinsci.remoting.nio.SelectableFileChannelFactory.create(FileDescriptor) [org.jenkinsci.remoting.nio.SelectableFileChannelFactory] At SelectableFileChannelFactory.java:[line 118] DP_DO_INSIDE_DO_PRIVILEGED
      [INFO] Invocation of reflect.Field.setAccessible(boolean), which should be invoked from within a doPrivileged block, in org.jenkinsci.remoting.nio.SelectableFileChannelFactory.unwrap(InputStream) [org.jenkinsci.remoting.nio.SelectableFileChannelFactory] At SelectableFileChannelFactory.java:[line 50] DP_DO_INSIDE_DO_PRIVILEGED
      [INFO] Invocation of reflect.Field.setAccessible(boolean), which should be invoked from within a doPrivileged block, in org.jenkinsci.remoting.nio.SelectableFileChannelFactory.unwrap(OutputStream) [org.jenkinsci.remoting.nio.SelectableFileChannelFactory] At SelectableFileChannelFactory.java:[line 70] DP_DO_INSIDE_DO_PRIVILEGED
      

            oleg_nenashev Oleg Nenashev
            oleg_nenashev Oleg Nenashev
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: