Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AttachAPISanity_SE90 failed intermittently on Windows #1454

Closed
terryzuoty opened this issue Mar 15, 2018 · 12 comments
Closed

AttachAPISanity_SE90 failed intermittently on Windows #1454

terryzuoty opened this issue Mar 15, 2018 · 12 comments

Comments

@terryzuoty
Copy link
Contributor

java -version:

"C:/temp/bld_381273/jdk/bin\\java" -version
openjdk version "9-internal"
OpenJDK Runtime Environment (build 9-internal+0-adhoc.j9build.openjdk)
Eclipse OpenJ9 VM (build cbuild-37b9b7b2, JRE 9 Windows 7 amd64-64 Compressed References 20180315_381273 (JIT enabled, AOT enabled)
OpenJ9   - 37b9b7b2
OMR      - 3dfc56d5
JCL      - 6faae28dcd based on jdk-9+181)

Error Message:

===============================================
Running test AttachAPISanity_SE90_0 ...
===============================================
test with NoOptions
{ "C:/temp/bld_381273/jdk/bin\\java"  -Xcompressedrefs  \
--add-exports=java.base/com.ibm.tools.attach.target=ALL-UNNAMED \
-cp "C:/temp/bld_381273/openj9/test///..//jvmtest\\TestConfig\\resources;C:/temp/bld_381273/openj9/test///..//jvmtest\\TestConfig\\lib\\testng.jar;C:/temp/bld_381273/openj9/test///..//jvmtest\\TestConfig\\lib\\jcommander.jar;C:/temp/bld_381273/openj9/test///..//jvmtest\\Java8andUp\\GeneralTest.jar" \
-Dcom.ibm.tools.attach.enable=yes \
-Djdk.attach.allowAttachSelf=true \
-Dcom.ibm.tools.attach.timeout=15000 \
-Djava.sidecar="--add-exports=java.base/com.ibm.tools.attach.target=ALL-UNNAMED" \
org.testng.TestNG -d "C:/temp/bld_381273/openj9/test/\\TestConfig\\test_output_15211345307487\\AttachAPISanity_SE90_0" "C:/temp/bld_381273/openj9/test///..//jvmtest\\Java8andUp\\testng.xml" -testnames AttachAPISanity \
-groups level.sanity \
-excludegroups d.*.win_x86-64_cmprssptrs,d.*.arch.x86,d.*.os.win,d.*.bits.64,d.*.generic-all; \
if [ $? -eq 0 ] ; then echo "AttachAPISanity_SE90_0""_PASSED"; else echo -e "\nAttachAPISanity_SE90_0""_FAILED\n"; fi; } 2>&1 | tee -a "C:/temp/bld_381273/openj9/test/\\TestConfig\\test_output_15211345307487\\TestTargetResult"
[IncludeExcludeTestAnnotationTransformer] [INFO] exclude file is C:/temp/bld_381273/openj9/test///..//jvmtest\\TestConfig\\resources\\excludes\\latest_exclude_SE90.txt
...
... TestNG 6.14.2 by C�dric Beust (cedric@beust.com)
...

FAILED CONFIGURATION: @BeforeMethod setUp
java.lang.AssertionError: main process did not initialize attach API
	at org.testng.Assert.fail(Assert.java:96)
	at org.openj9.test.attachAPI.AttachAPISanity.setUp(AttachAPISanity.java:105)
	at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(java.base@9-internal/Native Method)
	at jdk.internal.reflect.NativeMethodAccessorImpl.invoke(java.base@9-internal/NativeMethodAccessorImpl.java:62)
	at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(java.base@9-internal/DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(java.base@9-internal/Method.java:564)
	at org.testng.internal.MethodInvocationHelper.invokeMethod(MethodInvocationHelper.java:124)
	at org.testng.internal.MethodInvocationHelper.invokeMethodConsideringTimeout(MethodInvocationHelper.java:59)
	at org.testng.internal.Invoker.invokeConfigurationMethod(Invoker.java:455)
	at org.testng.internal.Invoker.invokeConfigurations(Invoker.java:222)
	at org.testng.internal.Invoker.invokeMethod(Invoker.java:520)
	at org.testng.internal.Invoker.invokeTestMethod(Invoker.java:716)
	at org.testng.internal.Invoker.invokeTestMethods(Invoker.java:988)
	at org.testng.internal.TestMethodWorker.invokeTestMethods(TestMethodWorker.java:125)
	at org.testng.internal.TestMethodWorker.run(TestMethodWorker.java:109)
	at org.testng.TestRunner.privateRun(TestRunner.java:648)
	at org.testng.TestRunner.run(TestRunner.java:505)
	at org.testng.SuiteRunner.runTest(SuiteRunner.java:455)
	at org.testng.SuiteRunner.runSequentially(SuiteRunner.java:450)
	at org.testng.SuiteRunner.privateRun(SuiteRunner.java:415)
	at org.testng.SuiteRunner.run(SuiteRunner.java:364)
	at org.testng.SuiteRunnerWorker.runSuite(SuiteRunnerWorker.java:52)
	at org.testng.SuiteRunnerWorker.run(SuiteRunnerWorker.java:84)
	at org.testng.TestNG.runSuitesSequentially(TestNG.java:1208)
	at org.testng.TestNG.runSuitesLocally(TestNG.java:1137)
	at org.testng.TestNG.runSuites(TestNG.java:1049)
	at org.testng.TestNG.run(TestNG.java:1017)
	at org.testng.TestNG.privateMain(TestNG.java:1354)
	at org.testng.TestNG.main(TestNG.java:1323)

SKIPPED CONFIGURATION: @BeforeMethod setUp
SKIPPED CONFIGURATION: @BeforeMethod setUp
SKIPPED: testAttachToOtherProcess
java.lang.AssertionError: main process did not initialize attach API
	at org.testng.Assert.fail(Assert.java:96)
	at org.openj9.test.attachAPI.AttachAPISanity.setUp(AttachAPISanity.java:105)
	at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(java.base@9-internal/Native Method)
	at jdk.internal.reflect.NativeMethodAccessorImpl.invoke(java.base@9-internal/NativeMethodAccessorImpl.java:62)
	at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(java.base@9-internal/DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(java.base@9-internal/Method.java:564)
	at org.testng.internal.MethodInvocationHelper.invokeMethod(MethodInvocationHelper.java:124)
	at org.testng.internal.MethodInvocationHelper.invokeMethodConsideringTimeout(MethodInvocationHelper.java:59)
	at org.testng.internal.Invoker.invokeConfigurationMethod(Invoker.java:455)
	at org.testng.internal.Invoker.invokeConfigurations(Invoker.java:222)
	at org.testng.internal.Invoker.invokeMethod(Invoker.java:520)
	at org.testng.internal.Invoker.invokeTestMethod(Invoker.java:716)
	at org.testng.internal.Invoker.invokeTestMethods(Invoker.java:988)
	at org.testng.internal.TestMethodWorker.invokeTestMethods(TestMethodWorker.java:125)
	at org.testng.internal.TestMethodWorker.run(TestMethodWorker.java:109)
	at org.testng.TestRunner.privateRun(TestRunner.java:648)
	at org.testng.TestRunner.run(TestRunner.java:505)
	at org.testng.SuiteRunner.runTest(SuiteRunner.java:455)
	at org.testng.SuiteRunner.runSequentially(SuiteRunner.java:450)
	at org.testng.SuiteRunner.privateRun(SuiteRunner.java:415)
	at org.testng.SuiteRunner.run(SuiteRunner.java:364)
	at org.testng.SuiteRunnerWorker.runSuite(SuiteRunnerWorker.java:52)
	at org.testng.SuiteRunnerWorker.run(SuiteRunnerWorker.java:84)
	at org.testng.TestNG.runSuitesSequentially(TestNG.java:1208)
	at org.testng.TestNG.runSuitesLocally(TestNG.java:1137)
	at org.testng.TestNG.runSuites(TestNG.java:1049)
	at org.testng.TestNG.run(TestNG.java:1017)
	at org.testng.TestNG.privateMain(TestNG.java:1354)
	at org.testng.TestNG.main(TestNG.java:1323)

SKIPPED: testAttachToSelf
java.lang.AssertionError: main process did not initialize attach API
	at org.testng.Assert.fail(Assert.java:96)
	at org.openj9.test.attachAPI.AttachAPISanity.setUp(AttachAPISanity.java:105)
	at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(java.base@9-internal/Native Method)
	at jdk.internal.reflect.NativeMethodAccessorImpl.invoke(java.base@9-internal/NativeMethodAccessorImpl.java:62)
	at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(java.base@9-internal/DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(java.base@9-internal/Method.java:564)
	at org.testng.internal.MethodInvocationHelper.invokeMethod(MethodInvocationHelper.java:124)
	at org.testng.internal.MethodInvocationHelper.invokeMethodConsideringTimeout(MethodInvocationHelper.java:59)
	at org.testng.internal.Invoker.invokeConfigurationMethod(Invoker.java:455)
	at org.testng.internal.Invoker.invokeConfigurations(Invoker.java:222)
	at org.testng.internal.Invoker.invokeMethod(Invoker.java:520)
	at org.testng.internal.Invoker.invokeTestMethod(Invoker.java:716)
	at org.testng.internal.Invoker.invokeTestMethods(Invoker.java:988)
	at org.testng.internal.TestMethodWorker.invokeTestMethods(TestMethodWorker.java:125)
	at org.testng.internal.TestMethodWorker.run(TestMethodWorker.java:109)
	at org.testng.TestRunner.privateRun(TestRunner.java:648)
	at org.testng.TestRunner.run(TestRunner.java:505)
	at org.testng.SuiteRunner.runTest(SuiteRunner.java:455)
	at org.testng.SuiteRunner.runSequentially(SuiteRunner.java:450)
	at org.testng.SuiteRunner.privateRun(SuiteRunner.java:415)
	at org.testng.SuiteRunner.run(SuiteRunner.java:364)
	at org.testng.SuiteRunnerWorker.runSuite(SuiteRunnerWorker.java:52)
	at org.testng.SuiteRunnerWorker.run(SuiteRunnerWorker.java:84)
	at org.testng.TestNG.runSuitesSequentially(TestNG.java:1208)
	at org.testng.TestNG.runSuitesLocally(TestNG.java:1137)
	at org.testng.TestNG.runSuites(TestNG.java:1049)
	at org.testng.TestNG.run(TestNG.java:1017)
	at org.testng.TestNG.privateMain(TestNG.java:1354)
	at org.testng.TestNG.main(TestNG.java:1323)

SKIPPED: testAttachToSelfAndOthers
java.lang.AssertionError: main process did not initialize attach API
	at org.testng.Assert.fail(Assert.java:96)
	at org.openj9.test.attachAPI.AttachAPISanity.setUp(AttachAPISanity.java:105)
	at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(java.base@9-internal/Native Method)
	at jdk.internal.reflect.NativeMethodAccessorImpl.invoke(java.base@9-internal/NativeMethodAccessorImpl.java:62)
	at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(java.base@9-internal/DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(java.base@9-internal/Method.java:564)
	at org.testng.internal.MethodInvocationHelper.invokeMethod(MethodInvocationHelper.java:124)
	at org.testng.internal.MethodInvocationHelper.invokeMethodConsideringTimeout(MethodInvocationHelper.java:59)
	at org.testng.internal.Invoker.invokeConfigurationMethod(Invoker.java:455)
	at org.testng.internal.Invoker.invokeConfigurations(Invoker.java:222)
	at org.testng.internal.Invoker.invokeMethod(Invoker.java:520)
	at org.testng.internal.Invoker.invokeTestMethod(Invoker.java:716)
	at org.testng.internal.Invoker.invokeTestMethods(Invoker.java:988)
	at org.testng.internal.TestMethodWorker.invokeTestMethods(TestMethodWorker.java:125)
	at org.testng.internal.TestMethodWorker.run(TestMethodWorker.java:109)
	at org.testng.TestRunner.privateRun(TestRunner.java:648)
	at org.testng.TestRunner.run(TestRunner.java:505)
	at org.testng.SuiteRunner.runTest(SuiteRunner.java:455)
	at org.testng.SuiteRunner.runSequentially(SuiteRunner.java:450)
	at org.testng.SuiteRunner.privateRun(SuiteRunner.java:415)
	at org.testng.SuiteRunner.run(SuiteRunner.java:364)
	at org.testng.SuiteRunnerWorker.runSuite(SuiteRunnerWorker.java:52)
	at org.testng.SuiteRunnerWorker.run(SuiteRunnerWorker.java:84)
	at org.testng.TestNG.runSuitesSequentially(TestNG.java:1208)
	at org.testng.TestNG.runSuitesLocally(TestNG.java:1137)
	at org.testng.TestNG.runSuites(TestNG.java:1049)
	at org.testng.TestNG.run(TestNG.java:1017)
	at org.testng.TestNG.privateMain(TestNG.java:1354)
	at org.testng.TestNG.main(TestNG.java:1323)


===============================================
    AttachAPISanity
    Tests run: 3, Failures: 0, Skips: 3
    Configuration Failures: 1, Skips: 2
===============================================
@DanHeidinga
Copy link
Member

@pdbain-ibm Any ideas on why this failing?

@terryzuoty
Copy link
Contributor Author

terryzuoty commented Mar 15, 2018

did a search and found this may be related to #1255 , but they failed at two different tests targets and two different Java files.

terryzuoty pushed a commit to terryzuoty/openj9 that referenced this issue Mar 15, 2018
* TestNG before 6.14 treats configuration failure as pass,
  this has been fixed since TestNG 6.14, update TestNG
  version to 6.14.2 to fix this bug in product build
* separate JLM test targets to avoid OOM failure
* re-enable tests which are fixed and passing
* update exclude file which failed on TestNG 6.14.2
* exclude reattachAfterExit from win since it is not supported on win
* disable testSoftMxRemote tests since it failed at setup stage

[ci skip]

fixed:eclipse-openj9#1367
fixed:eclipse-openj9#1112
Issue:eclipse-openj9#1454

Signed-off-by: Tianyu Zuo <tianyu@ca.ibm.com>
@pdbain-ibm
Copy link
Contributor

I'll take a look. One possible problem is the temporary directory may not be accessible.

@pdbain-ibm
Copy link
Contributor

@TianyuZuo Could you post a link to the job? Thanks

@pdbain-ibm
Copy link
Contributor

I ran the sanity test manually > 10X on a machine where it failed. What failure rate do you see?
Also, are you seeing failures in Java 8?

@pdbain-ibm
Copy link
Contributor

Seeing the failure frequently on 9.28.161.140

@pdbain-ibm
Copy link
Contributor

Fails consistently on that machine. Setting -Dcom.ibm.tools.attach.logging=yes, we get:
1521551840457 7560: 12 [Attach API initializer]: AttachHandler initialize
1521551840460 7560: 12 [Attach API initializer]: IPC Directory=C:\cygwin64\tmp.com_ibm_tools_attach
1521551840461 7560: 12 [Attach API initializer]: createDirectoryAndSemaphore C:\cygwin64\tmp.com_ibm_tools_attach
1521551840463 7560: 12 [Attach API initializer]: non-blocking locking file C:\cygwin64\tmp.com_ibm_tools_attach_master
1521551840464 7560: 12 [Attach API initializer]: locking file C:\cygwin64\tmp.com_ibm_tools_attach_master
1521551840466 7560: 12 [Attach API initializer]: lock failed, trying blocking lock
1521551840480 7560: 12 [Attach API initializer]: AttachHandler obtained master lock
1521551840483 7560: 12 [Attach API initializer]: unlocking file C:\cygwin64\tmp.com_ibm_tools_attach_attachlock
1521551840483 7560: 12 [Attach API initializer]: unlocking file C:\cygwin64\tmp.com_ibm_tools_attach_master
1521551840483 7560: 12 [Attach API initializer]: AttachHandler IOException while creating files: C:\cygwin64\tmp.com_ibm_tools_attach\7560
1521551840483 7560: 12 [Attach API initializer]: AttachHandler terminate: Attach API is being shut down
1521551840484 7560: 12 [Attach API initializer]: AttachHandler terminate removing directory : C:\cygwin64\tmp.com_ibm_tools_attach
1521551840484 7560: 12 [Attach API initializer]: deleting my directory
1521551840484 7560: 12 [Attach API initializer]: deleting my files
1521551840493 7560: 12 [Attach API initializer]: non-blocking locking file C:\cygwin64\tmp.com_ibm_tools_attach_master
1521551840494 7560: 12 [Attach API initializer]: VM already notified for termination, abandoning master lock
1521551840494 7560: 12 [Attach API initializer]: AttachHandler tryObtainMasterLock failed
1521551840494 7560: 12 [Attach API initializer]: ERROR: failed to initialize

Rebooted the machine, still failing. Cannot delete /tmp/.com_ibm_tools_attach

@pdbain-ibm
Copy link
Contributor

This is a machine issue.
Tried specifying a different attach director using -Dcom.ibm.tools.attach.directory= and the attach API initialized properly.
Opened a ticket to delete C:\cygwin64\tmp.com_ibm_tools_attach.

@DanHeidinga
Copy link
Member

Is there a change we can make to the test so its more robust and cleans up after itself?

@pdbain-ibm
Copy link
Contributor

I doubt it. Note that the Attach API already cleans up after itself in the common directory (and tries to clean artifacts left by defunct processes).

The issue here is that the malformed files were in j9build's temp directory but were owned by Administrator and had what looked like the wrong permissions.

@pdbain-ibm
Copy link
Contributor

temp directory cleared. I re-ran the test and problem looks fixed.
Please close this issue.

pdbain-ibm added a commit to pdbain-ibm/openj9 that referenced this issue Mar 20, 2018
The failures were caused by machine problems.

Fixes eclipse-openj9#1454

Signed-off-by: Peter Bain <peter_bain@ca.ibm.com>
@DanHeidinga
Copy link
Member

Thanks Peter

yanluo7 pushed a commit to yanluo7/openj9 that referenced this issue Mar 28, 2018
* TestNG before 6.14 treats configuration failure as pass,
  this has been fixed since TestNG 6.14, update TestNG
  version to 6.14.2 to fix this bug in product build
* separate JLM test targets to avoid OOM failure
* re-enable tests which are fixed and passing
* update exclude file which failed on TestNG 6.14.2
* exclude reattachAfterExit from win since it is not supported on win
* disable testSoftMxRemote tests since it failed at setup stage

[ci skip]

fixed:eclipse-openj9#1367
fixed:eclipse-openj9#1112
Issue:eclipse-openj9#1454

Signed-off-by: Tianyu Zuo <tianyu@ca.ibm.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants