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

okhttp integration tests fail with latest oracle jdk on OSX #1582

Closed
buchgr opened this issue Mar 23, 2016 · 5 comments
Closed

okhttp integration tests fail with latest oracle jdk on OSX #1582

buchgr opened this issue Mar 23, 2016 · 5 comments

Comments

@buchgr
Copy link
Collaborator

buchgr commented Mar 23, 2016

After updating to the latest Oracle JDK8u73 on OS X , the okhttp integration tests fail.

Running ./gradlew clean build on latest master (65d3847) gives me the below output and hangs there indefinitely.

:grpc-interop-testing:test
objc[25479]: Class JavaLaunchHelper is implemented in both /Library/Java/JavaVirtualMachines/jdk1.8.0_73.jdk/Contents/Home/bin/java and /Library/Java/JavaVirtualMachines/jdk1.8.0_73.jdk/Contents/Home/jre/lib/libinstrument.dylib. One of the two will be used. Which one is undefined.

io.grpc.testing.integration.Http2OkHttpTest > receivedDataForFinishedStream FAILED
    java.lang.Exception: test timed out after 10000 milliseconds
        at sun.misc.Unsafe.park(Native Method)
        at java.util.concurrent.locks.LockSupport.park(LockSupport.java:175)
        at com.google.common.util.concurrent.AbstractFuture.get(AbstractFuture.java:445)
        at com.google.common.util.concurrent.AbstractFuture$TrustedFuture.get(AbstractFuture.java:79)
        at io.grpc.testing.integration.Http2OkHttpTest.receivedDataForFinishedStream(Http2OkHttpTest.java:133)

io.grpc.testing.integration.Http2OkHttpTest > wrongHostNameFailHostnameVerification FAILED
    java.lang.Exception: test timed out after 10000 milliseconds
        at sun.misc.Unsafe.park(Native Method)
        at java.util.concurrent.locks.LockSupport.park(LockSupport.java:175)
        at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await(AbstractQueuedSynchronizer.java:2039)
        at java.util.concurrent.LinkedBlockingQueue.take(LinkedBlockingQueue.java:442)
        at io.grpc.stub.ClientCalls$ThreadlessExecutor.waitAndDrain(ClientCalls.java:500)
        at io.grpc.stub.ClientCalls.blockingUnaryCall(ClientCalls.java:134)
        at io.grpc.testing.integration.TestServiceGrpc$TestServiceBlockingStub.emptyCall(TestServiceGrpc.java:214)
        at io.grpc.testing.integration.Http2OkHttpTest.wrongHostNameFailHostnameVerification(Http2OkHttpTest.java:155)

io.grpc.testing.integration.Http2OkHttpTest > veryLargeRequest FAILED
    java.lang.Exception: test timed out after 30000 milliseconds

io.grpc.testing.integration.Http2OkHttpTest > deadlineExceeded FAILED
    java.lang.Exception: test timed out after 10000 milliseconds
> Building 74% > :grpc-interop-testing:test > 122 tests completed, 4 failed

Using jstack, I can see that gradle hangs at AbstractInteropTest.deadlineNotExceeded

"Test worker" #11 prio=5 os_prio=31 tid=0x00007fe0cd2bb000 nid=0x5103 waiting on condition [0x0000700001146000]
   java.lang.Thread.State: WAITING (parking)
    at sun.misc.Unsafe.park(Native Method)
    - parking to wait for  <0x00000007a6a0bef8> (a java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject)
    at java.util.concurrent.locks.LockSupport.park(LockSupport.java:175)
    at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await(AbstractQueuedSynchronizer.java:2039)
    at java.util.concurrent.LinkedBlockingQueue.take(LinkedBlockingQueue.java:442)
    at io.grpc.stub.ClientCalls$ThreadlessExecutor.waitAndDrain(ClientCalls.java:500)
    at io.grpc.stub.ClientCalls.blockingUnaryCall(ClientCalls.java:134)
    at io.grpc.testing.integration.TestServiceGrpc$TestServiceBlockingStub.emptyCall(TestServiceGrpc.java:214)
    at io.grpc.testing.integration.AbstractInteropTest.deadlineNotExceeded(AbstractInteropTest.java:624)
    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:497)
    at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:47)

The issue is always reproducable.

@buchgr buchgr changed the title okhttp integration tests fail with latest oracle jdk okhttp integration tests fail with latest oracle jdk on OSX Mar 23, 2016
@carl-mastrangelo
Copy link
Contributor

Are you running with jetty-alpn? I think you need to have a specific jdk version for that to work.

I tried using java 7 and the tests blew up as well:

JAVA_HOME=/usr/lib/jvm/java-7-openjdk-amd64/jre/ ./gradlew build

@buchgr
Copy link
Collaborator Author

buchgr commented Mar 23, 2016

@carl-mastrangelo well I guess, assuming jetty-alpn is the default for okhttp? I wouldn't know whether I run with it or not :-). I upgraded my jdk from 8u60 (everything works) to 8u73 (test failures).

Anything particular you want to do/check?

@carl-mastrangelo
Copy link
Contributor

https://github.com/grpc/grpc-java/blob/master/build.gradle#L151

Try changing that to 'org.mortbay.jetty.alpn:alpn-boot:8.1.7.v20160121'
?

@ejona86
Copy link
Member

ejona86 commented Mar 23, 2016

This is a dup of #1497. #1501 was made to fix it, but it fails on Travis.

@buchgr
Copy link
Collaborator Author

buchgr commented Mar 23, 2016

@ejona86 thanks! will close then.

@buchgr buchgr closed this as completed Mar 23, 2016
@lock lock bot locked as resolved and limited conversation to collaborators Sep 22, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants