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

java/rmi/server/useCustomRef/UseCustomRef.java failed with java.net.BindException intermittently

XMLWordPrintable

    • b148
    • generic
    • generic

        This happened once in JDK 9 b63 same binaries run on Solaris amd64

        Please refer to this test output:
        Test failed with: Port already in use: 43442; nested exception is:
        java.net.BindException: Address already in use
        java.rmi.server.ExportException: Port already in use: 43442; nested exception is:
        java.net.BindException: Address already in use
        at sun.rmi.transport.tcp.TCPTransport.listen(TCPTransport.java:336)
        at sun.rmi.transport.tcp.TCPTransport.exportObject(TCPTransport.java:244)
        at sun.rmi.transport.tcp.TCPEndpoint.exportObject(TCPEndpoint.java:411)
        at sun.rmi.transport.LiveRef.exportObject(LiveRef.java:147)
        at sun.rmi.server.UnicastServerRef.exportObject(UnicastServerRef.java:206)
        at sun.rmi.registry.RegistryImpl.setup(RegistryImpl.java:152)
        at sun.rmi.registry.RegistryImpl.<init>(RegistryImpl.java:137)
        at java.rmi.registry.LocateRegistry.createRegistry(LocateRegistry.java:203)
        at TestLibrary.createRegistryOnUnusedPort(TestLibrary.java:412)
        at UseCustomRef.main(UseCustomRef.java:85)
        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:502)
        at com.sun.javatest.regtest.agent.MainWrapper$MainThread.run(MainWrapper.java:92)
        at java.lang.Thread.run(Thread.java:745)
        Caused by: java.net.BindException: Address already in use
        at java.net.PlainSocketImpl.socketBind(Native Method)
        at java.net.AbstractPlainSocketImpl.bind(AbstractPlainSocketImpl.java:382)
        at java.net.ServerSocket.bind(ServerSocket.java:376)
        at java.net.ServerSocket.<init>(ServerSocket.java:238)
        at java.net.ServerSocket.<init>(ServerSocket.java:130)
        at sun.rmi.transport.proxy.RMIDirectSocketFactory.createServerSocket(RMIDirectSocketFactory.java:45)
        at sun.rmi.transport.proxy.RMIMasterSocketFactory.createServerSocket(RMIMasterSocketFactory.java:341)
        at sun.rmi.transport.tcp.TCPEndpoint.newServerSocket(TCPEndpoint.java:666)
        at sun.rmi.transport.tcp.TCPTransport.listen(TCPTransport.java:325)
        ... 15 more
        TestFailedException: TEST FAILED: ; nested exception is:
        java.rmi.server.ExportException: Port already in use: 43442; nested exception is:
        java.net.BindException: Address already in use
        java.rmi.server.ExportException: Port already in use: 43442; nested exception is:
        java.net.BindException: Address already in use
        at sun.rmi.transport.tcp.TCPTransport.listen(TCPTransport.java:336)
        at sun.rmi.transport.tcp.TCPTransport.exportObject(TCPTransport.java:244)
        at sun.rmi.transport.tcp.TCPEndpoint.exportObject(TCPEndpoint.java:411)
        at sun.rmi.transport.LiveRef.exportObject(LiveRef.java:147)
        at sun.rmi.server.UnicastServerRef.exportObject(UnicastServerRef.java:206)
        at sun.rmi.registry.RegistryImpl.setup(RegistryImpl.java:152)
        at sun.rmi.registry.RegistryImpl.<init>(RegistryImpl.java:137)
        at java.rmi.registry.LocateRegistry.createRegistry(LocateRegistry.java:203)
        at TestLibrary.createRegistryOnUnusedPort(TestLibrary.java:412)
        at UseCustomRef.main(UseCustomRef.java:85)
        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:502)
        at com.sun.javatest.regtest.agent.MainWrapper$MainThread.run(MainWrapper.java:92)
        at java.lang.Thread.run(Thread.java:745)
        Caused by: java.net.BindException: Address already in use
        at java.net.PlainSocketImpl.socketBind(Native Method)
        at java.net.AbstractPlainSocketImpl.bind(AbstractPlainSocketImpl.java:382)
        at java.net.ServerSocket.bind(ServerSocket.java:376)
        at java.net.ServerSocket.<init>(ServerSocket.java:238)
        at java.net.ServerSocket.<init>(ServerSocket.java:130)
        at sun.rmi.transport.proxy.RMIDirectSocketFactory.createServerSocket(RMIDirectSocketFactory.java:45)
        at sun.rmi.transport.proxy.RMIMasterSocketFactory.createServerSocket(RMIMasterSocketFactory.java:341)
        at sun.rmi.transport.tcp.TCPEndpoint.newServerSocket(TCPEndpoint.java:666)
        at sun.rmi.transport.tcp.TCPTransport.listen(TCPTransport.java:325)
        ... 15 more

        Attached test log too.

              mli Hamlin Li
              xiaofeya Xiaofeng Yang
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

                Created:
                Updated:
                Resolved: