Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8237368

Problem with NullPointerException in RMI TCPEndpoint.read

    Details

    • Subcomponent:
    • Introduced In Version:
    • Resolved In Build:
      b34
    • Verification:
      Verified

      Backports

        Description

        After upgrading to Java 1.8.0_241, 11.0.6, and 13.0.2, and
        then noticed NullPointerExceptions.

        A small test case that reproduces the problem is attached.

        The test works in 1.8.0_231 and 11.0.5, but fails in 1.8.0_241 with:

          Registry binding failed
          java.lang.NullPointerException
        at sun.rmi.transport.tcp.TCPEndpoint.read(TCPEndpoint.java:557)
        at sun.rmi.transport.LiveRef.read(LiveRef.java:292)
        at sun.rmi.server.UnicastRef2.readExternal(UnicastRef2.java:78)
        at java.rmi.server.RemoteObject.readObject(RemoteObject.java:455)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:498)
        at java.io.ObjectStreamClass.invokeReadObject(ObjectStreamClass.java:1170)
        at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:2232)
        at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:2123)
        at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1624)
        at java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:2341)
        at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:2265)
        at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:2123)
        at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1624)
        at java.io.ObjectInputStream.readObject(ObjectInputStream.java:464)
        at java.io.ObjectInputStream.readObject(ObjectInputStream.java:422)
        at sun.rmi.registry.RegistryImpl_Skel.dispatch(RegistryImpl_Skel.java:154)
        at sun.rmi.server.UnicastServerRef.oldDispatch(UnicastServerRef.java:469)
        at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:301)
        at sun.rmi.transport.Transport$1.run(Transport.java:200)
        at sun.rmi.transport.Transport$1.run(Transport.java:197)
        at java.security.AccessController.doPrivileged(Native Method)
        at sun.rmi.transport.Transport.serviceCall(Transport.java:196)
        at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:573)
        at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run0(TCPTransport.java:834)
        at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.lambda$run$0(TCPTransport.java:688)
        at java.security.AccessController.doPrivileged(Native Method)
        at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:687)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
        at java.lang.Thread.run(Thread.java:748)
        at sun.rmi.transport.StreamRemoteCall.exceptionReceivedFromServer(StreamRemoteCall.java:303)
        at sun.rmi.transport.StreamRemoteCall.executeCall(StreamRemoteCall.java:279)
        at sun.rmi.server.UnicastRef.invoke(UnicastRef.java:379)
        at sun.rmi.registry.RegistryImpl_Stub.rebind(RegistryImpl_Stub.java:158)
        at TCPEndpointReadBug.main(TCPEndpointReadBug.java:88)

          Attachments

            Issue Links

              Activity

                People

                • Assignee:
                  rriggs Roger Riggs
                  Reporter:
                  rriggs Roger Riggs
                • Votes:
                  0 Vote for this issue
                  Watchers:
                  8 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved: