[JDK-8170562] TEST_BUG: java/rmi/activation/rmidViaInheritedChannel tests fails intermittently with "port in use" in rmid Created: 2016-12-01  Updated: 2018-09-11

Status: Open
Project: JDK
Component/s: core-libs
Affects Version/s: 9, 10
Fix Version/s: tbd

Type: Bug Priority: P4
Reporter: Hamlin Li Assignee: Hamlin Li
Resolution: Unresolved Votes: 0
Labels: ProblemList, key-intermittent, mach5, noreg-self, same-binary, samebinary-highfrequency, testbug, teststabilization, tier3
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Duplicate
duplicates JDK-8170561 java/rmi/activation/rmidViaInheritedC... Closed
Relates
relates to JDK-8190573 Problem list InheritedChannelNotServe... Resolved
relates to JDK-8019538 TEST_BUG: java/rmi/activation/rmidVia... Resolved
Subcomponent: java.rmi

 Description   
java/rmi/activation/rmidViaInheritedChannel/InheritedChannelNotServerSocket.java fails with "port in use" in rmid.

This is a issue left by JDK-8019538. There are 4 issues in the bug JDK-8019538,
2 in RmidViaInheritedChannel.java: "port in use" in registry, "port in use" in rmid start.
2 InheritedChannelNotServerSocket.java: "port in use" in registry, "port in use" in rmid start.
The fix for JDK-8019538 is to
1. remove RmidViaInheritedChannel as SelectorProvider is well tested by other tests, for example the tests under java/rmi/activation/Activatable
2. fix the "port in use" in registry in InheritedChannelNotServerSocket.java

For "port in use" in rmid in InheritedChannelNotServerSocket, it's a little bit hard, as it intends to test rmid when inherited channel not work. Currently the only solution in my mind is to retry when rmid fails with "port in use", it's not a good solution as it might impact other programs or tests, and it's not efficient.

This bug is to track "port in use" in rmid in InheritedChannelNotServerSocket after fix for JDK-8019538 is pushed.


 Comments   
Comment by Rajdeep Paul (Inactive) [ 2017-04-11 ]
Failed in Mach 5 9-dev build # 2229

http://java.se.oracle.com/mach5//view/All/job/9-dev/2229/artifact/logs/tier3-linux-x64-jdk_test.log/*view*/

Snippet:

command: compile /scratch/mesos/work_dir/slaves/312d6566-622b-464b-aaa4-3bf578ae320f-S8/frameworks/1735e8a2-a1db-478c-8104-60c8b0af87dd-0196/executors/c98cf0c6-af98-4ce5-b647-c3c81a41afd0/runs/d06838a4-c495-4efc-acaf-9daeefa66840/srcBundle/jdk/test/java/rmi/activation/rmidViaInheritedChannel/InheritedChannelNotServerSocket.java
reason: .class file out of date or does not exist
Additional options from @modules: --add-modules java.base,java.rmi --add-exports java.base/sun.nio.ch=ALL-UNNAMED --add-exports java.rmi/sun.rmi.registry=ALL-UNNAMED --add-exports java.rmi/sun.rmi.server=ALL-UNNAMED --add-exports java.rmi/sun.rmi.transport=ALL-UNNAMED --add-exports java.rmi/sun.rmi.transport.tcp=ALL-UNNAMED
Mode: agentvm
Agent id: 0
elapsed time (seconds): 0.063
configuration:
Boot Layer (javac runtime environment)
  class path: /scratch/sparky/jib-data/install/java/re/jtreg/4.2/promoted/all/b07/bundles/jtreg_bin-4.2.zip/jtreg/lib/javatest.jar
              /scratch/sparky/jib-data/install/java/re/jtreg/4.2/promoted/all/b07/bundles/jtreg_bin-4.2.zip/jtreg/lib/jtreg.jar
  patch: java.base /scratch/mesos/work_dir/slaves/312d6566-622b-464b-aaa4-3bf578ae320f-S8/frameworks/1735e8a2-a1db-478c-8104-60c8b0af87dd-0196/executors/c98cf0c6-af98-4ce5-b647-c3c81a41afd0/runs/d06838a4-c495-4efc-acaf-9daeefa66840/testoutput/jtreg/JTwork/patches/java.base

javac compilation environment
  add modules: java.base java.rmi
  add exports: java.base/sun.nio.ch ALL-UNNAMED
               java.rmi/sun.rmi.registry ALL-UNNAMED
               java.rmi/sun.rmi.server ALL-UNNAMED
               java.rmi/sun.rmi.transport ALL-UNNAMED
               java.rmi/sun.rmi.transport.tcp ALL-UNNAMED
  source path: /scratch/mesos/work_dir/slaves/312d6566-622b-464b-aaa4-3bf578ae320f-S8/frameworks/1735e8a2-a1db-478c-8104-60c8b0af87dd-0196/executors/c98cf0c6-af98-4ce5-b647-c3c81a41afd0/runs/d06838a4-c495-4efc-acaf-9daeefa66840/srcBundle/jdk/test/java/rmi/activation/rmidViaInheritedChannel
               /scratch/mesos/work_dir/slaves/312d6566-622b-464b-aaa4-3bf578ae320f-S8/frameworks/1735e8a2-a1db-478c-8104-60c8b0af87dd-0196/executors/c98cf0c6-af98-4ce5-b647-c3c81a41afd0/runs/d06838a4-c495-4efc-acaf-9daeefa66840/srcBundle/jdk/test/java/rmi/testlibrary
  class path: /scratch/mesos/work_dir/slaves/312d6566-622b-464b-aaa4-3bf578ae320f-S8/frameworks/1735e8a2-a1db-478c-8104-60c8b0af87dd-0196/executors/c98cf0c6-af98-4ce5-b647-c3c81a41afd0/runs/d06838a4-c495-4efc-acaf-9daeefa66840/srcBundle/jdk/test/java/rmi/activation/rmidViaInheritedChannel
               /scratch/mesos/work_dir/slaves/312d6566-622b-464b-aaa4-3bf578ae320f-S8/frameworks/1735e8a2-a1db-478c-8104-60c8b0af87dd-0196/executors/c98cf0c6-af98-4ce5-b647-c3c81a41afd0/runs/d06838a4-c495-4efc-acaf-9daeefa66840/testoutput/jtreg/JTwork/classes/1/java/rmi/activation/rmidViaInheritedChannel
               /scratch/mesos/work_dir/slaves/312d6566-622b-464b-aaa4-3bf578ae320f-S8/frameworks/1735e8a2-a1db-478c-8104-60c8b0af87dd-0196/executors/c98cf0c6-af98-4ce5-b647-c3c81a41afd0/runs/d06838a4-c495-4efc-acaf-9daeefa66840/testoutput/jtreg/JTwork/classes/1/java/rmi/testlibrary

rerun:
HOME=/tmp/sparky-temp-home-4733907722437418091/user_home \
JDK8_HOME=/opt/java/jdk1.8.0_91 \
JTREG_TIMEOUT_OPTION=-timeoutFactor:5 \
JTREG_VERBOSE=fail,error,time \
LD_LIBRARY_PATH=/scratch/mesos/work_dir/slaves/312d6566-622b-464b-aaa4-3bf578ae320f-S8/frameworks/1735e8a2-a1db-478c-8104-60c8b0af87dd-0196/executors/c98cf0c6-af98-4ce5-b647-c3c81a41afd0/runs/d06838a4-c495-4efc-acaf-9daeefa66840/./testBundle/jdk/jtreg/native \
PATH=/bin:/usr/bin \
    /scratch/mesos/work_dir/slaves/312d6566-622b-464b-aaa4-3bf578ae320f-S8/frameworks/1735e8a2-a1db-478c-8104-60c8b0af87dd-0196/executors/c98cf0c6-af98-4ce5-b647-c3c81a41afd0/runs/d06838a4-c495-4efc-acaf-9daeefa66840/./product/bin/javac \
        -J-ea \
        -J-esa \
        -J-Xmx512m \
        -J-Djava.library.path=/scratch/mesos/work_dir/slaves/312d6566-622b-464b-aaa4-3bf578ae320f-S8/frameworks/1735e8a2-a1db-478c-8104-60c8b0af87dd-0196/executors/c98cf0c6-af98-4ce5-b647-c3c81a41afd0/runs/d06838a4-c495-4efc-acaf-9daeefa66840/./testBundle/jdk/jtreg/native \
        -J-Dtest.class.path.prefix=/scratch/mesos/work_dir/slaves/312d6566-622b-464b-aaa4-3bf578ae320f-S8/frameworks/1735e8a2-a1db-478c-8104-60c8b0af87dd-0196/executors/c98cf0c6-af98-4ce5-b647-c3c81a41afd0/runs/d06838a4-c495-4efc-acaf-9daeefa66840/testoutput/jtreg/JTwork/classes/1/java/rmi/activation/rmidViaInheritedChannel:/scratch/mesos/work_dir/slaves/312d6566-622b-464b-aaa4-3bf578ae320f-S8/frameworks/1735e8a2-a1db-478c-8104-60c8b0af87dd-0196/executors/c98cf0c6-af98-4ce5-b647-c3c81a41afd0/runs/d06838a4-c495-4efc-acaf-9daeefa66840/srcBundle/jdk/test/java/rmi/activation/rmidViaInheritedChannel:/scratch/mesos/work_dir/slaves/312d6566-622b-464b-aaa4-3bf578ae320f-S8/frameworks/1735e8a2-a1db-478c-8104-60c8b0af87dd-0196/executors/c98cf0c6-af98-4ce5-b647-c3c81a41afd0/runs/d06838a4-c495-4efc-acaf-9daeefa66840/testoutput/jtreg/JTwork/classes/1/java/rmi/testlibrary \
        -J-Dtest.src=/scratch/mesos/work_dir/slaves/312d6566-622b-464b-aaa4-3bf578ae320f-S8/frameworks/1735e8a2-a1db-478c-8104-60c8b0af87dd-0196/executors/c98cf0c6-af98-4ce5-b647-c3c81a41afd0/runs/d06838a4-c495-4efc-acaf-9daeefa66840/srcBundle/jdk/test/java/rmi/activation/rmidViaInheritedChannel \
        -J-Dtest.src.path=/scratch/mesos/work_dir/slaves/312d6566-622b-464b-aaa4-3bf578ae320f-S8/frameworks/1735e8a2-a1db-478c-8104-60c8b0af87dd-0196/executors/c98cf0c6-af98-4ce5-b647-c3c81a41afd0/runs/d06838a4-c495-4efc-acaf-9daeefa66840/srcBundle/jdk/test/java/rmi/activation/rmidViaInheritedChannel:/scratch/mesos/work_dir/slaves/312d6566-622b-464b-aaa4-3bf578ae320f-S8/frameworks/1735e8a2-a1db-478c-8104-60c8b0af87dd-0196/executors/c98cf0c6-af98-4ce5-b647-c3c81a41afd0/runs/d06838a4-c495-4efc-acaf-9daeefa66840/srcBundle/jdk/test/java/rmi/testlibrary \
        -J-Dtest.classes=/scratch/mesos/work_dir/slaves/312d6566-622b-464b-aaa4-3bf578ae320f-S8/frameworks/1735e8a2-a1db-478c-8104-60c8b0af87dd-0196/executors/c98cf0c6-af98-4ce5-b647-c3c81a41afd0/runs/d06838a4-c495-4efc-acaf-9daeefa66840/testoutput/jtreg/JTwork/classes/1/java/rmi/activation/rmidViaInheritedChannel \
        -J-Dtest.class.path=/scratch/mesos/work_dir/slaves/312d6566-622b-464b-aaa4-3bf578ae320f-S8/frameworks/1735e8a2-a1db-478c-8104-60c8b0af87dd-0196/executors/c98cf0c6-af98-4ce5-b647-c3c81a41afd0/runs/d06838a4-c495-4efc-acaf-9daeefa66840/testoutput/jtreg/JTwork/classes/1/java/rmi/activation/rmidViaInheritedChannel:/scratch/mesos/work_dir/slaves/312d6566-622b-464b-aaa4-3bf578ae320f-S8/frameworks/1735e8a2-a1db-478c-8104-60c8b0af87dd-0196/executors/c98cf0c6-af98-4ce5-b647-c3c81a41afd0/runs/d06838a4-c495-4efc-acaf-9daeefa66840/testoutput/jtreg/JTwork/classes/1/java/rmi/testlibrary \
        -J-Dtest.vm.opts='-ea -esa -Xmx512m' \
        -J-Dtest.tool.vm.opts='-J-ea -J-esa -J-Xmx512m' \
        -J-Dtest.compiler.opts= \
        -J-Dtest.java.opts= \
        -J-Dtest.jdk=/scratch/mesos/work_dir/slaves/312d6566-622b-464b-aaa4-3bf578ae320f-S8/frameworks/1735e8a2-a1db-478c-8104-60c8b0af87dd-0196/executors/c98cf0c6-af98-4ce5-b647-c3c81a41afd0/runs/d06838a4-c495-4efc-acaf-9daeefa66840/./product \
        -J-Dcompile.jdk=/scratch/mesos/work_dir/slaves/312d6566-622b-464b-aaa4-3bf578ae320f-S8/frameworks/1735e8a2-a1db-478c-8104-60c8b0af87dd-0196/executors/c98cf0c6-af98-4ce5-b647-c3c81a41afd0/runs/d06838a4-c495-4efc-acaf-9daeefa66840/./product \
        -J-Dtest.timeout.factor=5.0 \
        -J-Dtest.modules='java.base/sun.nio.ch java.rmi/sun.rmi.registry java.rmi/sun.rmi.server java.rmi/sun.rmi.transport java.rmi/sun.rmi.transport.tcp' \
        -J-Dtest.nativepath=/scratch/mesos/work_dir/slaves/312d6566-622b-464b-aaa4-3bf578ae320f-S8/frameworks/1735e8a2-a1db-478c-8104-60c8b0af87dd-0196/executors/c98cf0c6-af98-4ce5-b647-c3c81a41afd0/runs/d06838a4-c495-4efc-acaf-9daeefa66840/./testBundle/jdk/jtreg/native \
        --add-modules java.base,java.rmi \
        --add-exports java.base/sun.nio.ch=ALL-UNNAMED \
        --add-exports java.rmi/sun.rmi.registry=ALL-UNNAMED \
        --add-exports java.rmi/sun.rmi.server=ALL-UNNAMED \
        --add-exports java.rmi/sun.rmi.transport=ALL-UNNAMED \
        --add-exports java.rmi/sun.rmi.transport.tcp=ALL-UNNAMED \
        -d /scratch/mesos/work_dir/slaves/312d6566-622b-464b-aaa4-3bf578ae320f-S8/frameworks/1735e8a2-a1db-478c-8104-60c8b0af87dd-0196/executors/c98cf0c6-af98-4ce5-b647-c3c81a41afd0/runs/d06838a4-c495-4efc-acaf-9daeefa66840/testoutput/jtreg/JTwork/classes/1/java/rmi/activation/rmidViaInheritedChannel \
        -sourcepath /scratch/mesos/work_dir/slaves/312d6566-622b-464b-aaa4-3bf578ae320f-S8/frameworks/1735e8a2-a1db-478c-8104-60c8b0af87dd-0196/executors/c98cf0c6-af98-4ce5-b647-c3c81a41afd0/runs/d06838a4-c495-4efc-acaf-9daeefa66840/srcBundle/jdk/test/java/rmi/activation/rmidViaInheritedChannel:/scratch/mesos/work_dir/slaves/312d6566-622b-464b-aaa4-3bf578ae320f-S8/frameworks/1735e8a2-a1db-478c-8104-60c8b0af87dd-0196/executors/c98cf0c6-af98-4ce5-b647-c3c81a41afd0/runs/d06838a4-c495-4efc-acaf-9daeefa66840/srcBundle/jdk/test/java/rmi/testlibrary \
        -classpath /scratch/mesos/work_dir/slaves/312d6566-622b-464b-aaa4-3bf578ae320f-S8/frameworks/1735e8a2-a1db-478c-8104-60c8b0af87dd-0196/executors/c98cf0c6-af98-4ce5-b647-c3c81a41afd0/runs/d06838a4-c495-4efc-acaf-9daeefa66840/srcBundle/jdk/test/java/rmi/activation/rmidViaInheritedChannel:/scratch/mesos/work_dir/slaves/312d6566-622b-464b-aaa4-3bf578ae320f-S8/frameworks/1735e8a2-a1db-478c-8104-60c8b0af87dd-0196/executors/c98cf0c6-af98-4ce5-b647-c3c81a41afd0/runs/d06838a4-c495-4efc-acaf-9daeefa66840/testoutput/jtreg/JTwork/classes/1/java/rmi/activation/rmidViaInheritedChannel:/scratch/mesos/work_dir/slaves/312d6566-622b-464b-aaa4-3bf578ae320f-S8/frameworks/1735e8a2-a1db-478c-8104-60c8b0af87dd-0196/executors/c98cf0c6-af98-4ce5-b647-c3c81a41afd0/runs/d06838a4-c495-4efc-acaf-9daeefa66840/testoutput/jtreg/JTwork/classes/1/java/rmi/testlibrary /scratch/mesos/work_dir/slaves/312d6566-622b-464b-aaa4-3bf578ae320f-S8/frameworks/1735e8a2-a1db-478c-8104-60c8b0af87dd-0196/executors/c98cf0c6-af98-4ce5-b647-c3c81a41afd0/runs/d06838a4-c495-4efc-acaf-9daeefa66840/srcBundle/jdk/test/java/rmi/activation/rmidViaInheritedChannel/InheritedChannelNotServerSocket.java
direct:
/scratch/mesos/work_dir/slaves/312d6566-622b-464b-aaa4-3bf578ae320f-S8/frameworks/1735e8a2-a1db-478c-8104-60c8b0af87dd-0196/executors/c98cf0c6-af98-4ce5-b647-c3c81a41afd0/runs/d06838a4-c495-4efc-acaf-9daeefa66840/srcBundle/jdk/test/java/rmi/activation/rmidViaInheritedChannel/InheritedChannelNotServerSocket.java:141: warning: DefaultSelectorProvider is internal proprietary API and may be removed in a future release
            provider = sun.nio.ch.DefaultSelectorProvider.create();
                                 ^
1 warning

ACTION: main -- Failed. Execution failed: `main' threw exception: TestFailedException: TEST FAILED: Rmid process exited with status 1 after 613ms.
REASON: User specified action: run main/othervm/timeout=240 InheritedChannelNotServerSocket
TIME: 1.469 seconds
messages:
command: main InheritedChannelNotServerSocket
reason: User specified action: run main/othervm/timeout=240 InheritedChannelNotServerSocket
Mode: othervm [/othervm specified]
Additional options from @modules: --add-modules java.base,java.rmi --add-exports java.base/sun.nio.ch=ALL-UNNAMED --add-exports java.rmi/sun.rmi.registry=ALL-UNNAMED --add-exports java.rmi/sun.rmi.server=ALL-UNNAMED --add-exports java.rmi/sun.rmi.transport=ALL-UNNAMED --add-exports java.rmi/sun.rmi.transport.tcp=ALL-UNNAMED
elapsed time (seconds): 1.469
configuration:
Boot Layer
  add modules: java.base java.rmi
  add exports: java.base/sun.nio.ch ALL-UNNAMED
               java.rmi/sun.rmi.registry ALL-UNNAMED
               java.rmi/sun.rmi.server ALL-UNNAMED
               java.rmi/sun.rmi.transport ALL-UNNAMED
               java.rmi/sun.rmi.transport.tcp ALL-UNNAMED

STDOUT:
STDERR:

Regression test for bug 6261402
Generated at Sat Aug 24 03:19:32 UTC 2019 using Jira 7.13.5#713005-sha1:8d78f1047b9cca7d35d4d13f706b37e27d869e07.