Skip to content

Instantly share code, notes, and snippets.

@Xorlev
Created July 28, 2014 17:43
Show Gist options
  • Save Xorlev/9676261f61c5be7a6e44 to your computer and use it in GitHub Desktop.
Save Xorlev/9676261f61c5be7a6e44 to your computer and use it in GitHub Desktop.
Java 8 - SSL Concurrency Issues
New I/O worker #21 [BLOCKED] CPU time: 1s
java.security.Provider.getService(String, String)
sun.security.jca.ProviderList$ServiceList.tryGet(int)
sun.security.jca.ProviderList$ServiceList.access$200(ProviderList$ServiceList, int)
sun.security.jca.ProviderList$ServiceList$1.hasNext()
javax.crypto.KeyGenerator.nextSpi(KeyGeneratorSpi, boolean)
javax.crypto.KeyGenerator.<init>(String)
javax.crypto.KeyGenerator.getInstance(String)
sun.security.ssl.JsseJce.getKeyGenerator(String)
sun.security.ssl.HandshakeMessage$Finished.getFinished(HandshakeHash, int, SecretKey)
sun.security.ssl.HandshakeMessage$Finished.verify(HandshakeHash, int, SecretKey)
sun.security.ssl.ClientHandshaker.serverFinished(HandshakeMessage$Finished)
sun.security.ssl.ClientHandshaker.processMessage(byte, int)
sun.security.ssl.Handshaker.processLoop()
sun.security.ssl.Handshaker.process_record(InputRecord, boolean)
sun.security.ssl.SSLEngineImpl.readRecord(EngineArgs)
sun.security.ssl.SSLEngineImpl.readNetRecord(EngineArgs)
sun.security.ssl.SSLEngineImpl.unwrap(ByteBuffer, ByteBuffer[], int, int)
javax.net.ssl.SSLEngine.unwrap(ByteBuffer, ByteBuffer)
org.jboss.netty.handler.ssl.SslHandler.unwrap(ChannelHandlerContext, Channel, ChannelBuffer, ByteBuffer, int)
org.jboss.netty.handler.ssl.SslHandler.decode(ChannelHandlerContext, Channel, ChannelBuffer)
org.jboss.netty.handler.codec.frame.FrameDecoder.callDecode(ChannelHandlerContext, Channel, ChannelBuffer, SocketAddress)
org.jboss.netty.handler.codec.frame.FrameDecoder.messageReceived(ChannelHandlerContext, MessageEvent)
org.jboss.netty.channel.SimpleChannelUpstreamHandler.handleUpstream(ChannelHandlerContext, ChannelEvent)
org.jboss.netty.channel.DefaultChannelPipeline.sendUpstream(DefaultChannelPipeline$DefaultChannelHandlerContext, ChannelEvent)
org.jboss.netty.channel.DefaultChannelPipeline.sendUpstream(ChannelEvent)
org.jboss.netty.channel.Channels.fireMessageReceived(Channel, Object, SocketAddress)
org.jboss.netty.channel.Channels.fireMessageReceived(Channel, Object)
org.jboss.netty.channel.socket.nio.NioWorker.read(SelectionKey)
org.jboss.netty.channel.socket.nio.AbstractNioWorker.process(Selector)
org.jboss.netty.channel.socket.nio.AbstractNioSelector.run()
org.jboss.netty.channel.socket.nio.AbstractNioWorker.run()
org.jboss.netty.channel.socket.nio.NioWorker.run()
org.jboss.netty.util.ThreadRenamingRunnable.run()
org.jboss.netty.util.internal.DeadLockProofWorker$1.run()
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor$Worker)
java.util.concurrent.ThreadPoolExecutor$Worker.run()
java.lang.Thread.run()
New I/O worker #19 [BLOCKED] CPU time: 0s
sun.security.ssl.SignatureAndHashAlgorithm.getSupportedAlgorithms(AlgorithmConstraints)
sun.security.ssl.Handshaker.getLocalSupportedSignAlgs()
sun.security.ssl.ClientHandshaker.getKickstartMessage()
sun.security.ssl.Handshaker.kickstart()
sun.security.ssl.SSLEngineImpl.kickstartHandshake()
sun.security.ssl.SSLEngineImpl.writeAppRecord(EngineArgs)
sun.security.ssl.SSLEngineImpl.wrap(ByteBuffer[], int, int, ByteBuffer)
javax.net.ssl.SSLEngine.wrap(ByteBuffer, ByteBuffer)
org.jboss.netty.handler.ssl.SslHandler.wrap(ChannelHandlerContext, Channel)
org.jboss.netty.handler.ssl.SslHandler.handleDownstream(ChannelHandlerContext, ChannelEvent)
org.jboss.netty.channel.DefaultChannelPipeline.sendDownstream(DefaultChannelPipeline$DefaultChannelHandlerContext, ChannelEvent)
org.jboss.netty.channel.DefaultChannelPipeline$DefaultChannelHandlerContext.sendDownstream(ChannelEvent)
org.jboss.netty.channel.Channels.write(ChannelHandlerContext, ChannelFuture, Object, SocketAddress)
org.jboss.netty.handler.codec.oneone.OneToOneEncoder.doEncode(ChannelHandlerContext, MessageEvent)
org.jboss.netty.handler.codec.oneone.OneToOneEncoder.handleDownstream(ChannelHandlerContext, ChannelEvent)
org.jboss.netty.handler.codec.http.HttpClientCodec.handleDownstream(ChannelHandlerContext, ChannelEvent)
org.jboss.netty.channel.DefaultChannelPipeline.sendDownstream(DefaultChannelPipeline$DefaultChannelHandlerContext, ChannelEvent)
org.jboss.netty.channel.DefaultChannelPipeline$DefaultChannelHandlerContext.sendDownstream(ChannelEvent)
org.jboss.netty.handler.stream.ChunkedWriteHandler.flush(ChannelHandlerContext, boolean)
org.jboss.netty.handler.stream.ChunkedWriteHandler.handleDownstream(ChannelHandlerContext, ChannelEvent)
org.jboss.netty.channel.DefaultChannelPipeline.sendDownstream(DefaultChannelPipeline$DefaultChannelHandlerContext, ChannelEvent)
org.jboss.netty.channel.DefaultChannelPipeline.sendDownstream(ChannelEvent)
org.jboss.netty.channel.Channels.write(Channel, Object, SocketAddress)
org.jboss.netty.channel.Channels.write(Channel, Object)
org.jboss.netty.channel.AbstractChannel.write(Object)
com.ning.http.client.providers.netty.NettyAsyncHttpProvider.writeRequest(Channel, AsyncHttpClientConfig, NettyResponseFuture)
com.ning.http.client.providers.netty.NettyAsyncHttpProvider.doConnect(Request, AsyncHandler, NettyResponseFuture, boolean, boolean, boolean)
com.ning.http.client.providers.netty.NettyAsyncHttpProvider.execute(Request, NettyResponseFuture, boolean, boolean, boolean)
com.ning.http.client.providers.netty.NettyAsyncHttpProvider.nextRequest(Request, NettyResponseFuture, boolean)
com.ning.http.client.providers.netty.NettyAsyncHttpProvider.nextRequest(Request, NettyResponseFuture)
com.ning.http.client.providers.netty.NettyAsyncHttpProvider.access$2100(NettyAsyncHttpProvider, Request, NettyResponseFuture)
com.ning.http.client.providers.netty.NettyAsyncHttpProvider$HttpProtocol.handle(ChannelHandlerContext, MessageEvent)
com.ning.http.client.providers.netty.NettyAsyncHttpProvider.messageReceived(ChannelHandlerContext, MessageEvent)
org.jboss.netty.channel.SimpleChannelUpstreamHandler.handleUpstream(ChannelHandlerContext, ChannelEvent)
org.jboss.netty.channel.DefaultChannelPipeline.sendUpstream(DefaultChannelPipeline$DefaultChannelHandlerContext, ChannelEvent)
org.jboss.netty.channel.DefaultChannelPipeline$DefaultChannelHandlerContext.sendUpstream(ChannelEvent)
org.jboss.netty.handler.stream.ChunkedWriteHandler.handleUpstream(ChannelHandlerContext, ChannelEvent)
org.jboss.netty.channel.DefaultChannelPipeline.sendUpstream(DefaultChannelPipeline$DefaultChannelHandlerContext, ChannelEvent)
org.jboss.netty.channel.DefaultChannelPipeline$DefaultChannelHandlerContext.sendUpstream(ChannelEvent)
org.jboss.netty.channel.Channels.fireMessageReceived(ChannelHandlerContext, Object, SocketAddress)
org.jboss.netty.handler.codec.frame.FrameDecoder.unfoldAndFireMessageReceived(ChannelHandlerContext, SocketAddress, Object)
org.jboss.netty.handler.codec.replay.ReplayingDecoder.callDecode(ChannelHandlerContext, Channel, ChannelBuffer, ChannelBuffer, SocketAddress)
org.jboss.netty.handler.codec.replay.ReplayingDecoder.messageReceived(ChannelHandlerContext, MessageEvent)
org.jboss.netty.channel.SimpleChannelUpstreamHandler.handleUpstream(ChannelHandlerContext, ChannelEvent)
org.jboss.netty.handler.codec.http.HttpClientCodec.handleUpstream(ChannelHandlerContext, ChannelEvent)
org.jboss.netty.channel.DefaultChannelPipeline.sendUpstream(DefaultChannelPipeline$DefaultChannelHandlerContext, ChannelEvent)
org.jboss.netty.channel.DefaultChannelPipeline.sendUpstream(ChannelEvent)
org.jboss.netty.channel.Channels.fireMessageReceived(Channel, Object, SocketAddress)
org.jboss.netty.channel.Channels.fireMessageReceived(Channel, Object)
org.jboss.netty.channel.socket.nio.NioWorker.read(SelectionKey)
org.jboss.netty.channel.socket.nio.AbstractNioWorker.process(Selector)
org.jboss.netty.channel.socket.nio.AbstractNioSelector.run()
org.jboss.netty.channel.socket.nio.AbstractNioWorker.run()
org.jboss.netty.channel.socket.nio.NioWorker.run()
org.jboss.netty.util.ThreadRenamingRunnable.run()
org.jboss.netty.util.internal.DeadLockProofWorker$1.run()
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor$Worker)
java.util.concurrent.ThreadPoolExecutor$Worker.run()
java.lang.Thread.run()
New I/O worker #35 [BLOCKED] CPU time: 0s
sun.security.ssl.CipherSuite$BulkCipher.isAvailable(CipherSuite$BulkCipher)
sun.security.ssl.CipherSuite$BulkCipher.isAvailable()
sun.security.ssl.CipherSuite.isAvailable()
sun.security.ssl.SSLContextImpl.getApplicableCipherSuiteList(ProtocolList, boolean)
sun.security.ssl.SSLContextImpl.getDefaultCipherSuiteList(boolean)
sun.security.ssl.SSLEngineImpl.init(SSLContextImpl)
sun.security.ssl.SSLEngineImpl.<init>(SSLContextImpl)
sun.security.ssl.SSLContextImpl.engineCreateSSLEngine()
javax.net.ssl.SSLContext.createSSLEngine()
com.fullcontact.sherlock.targets.SearchTargetFactory$SearchTargetModule$2.newSSLEngine()
com.ning.http.client.providers.netty.NettyAsyncHttpProvider.createSSLEngine()
com.ning.http.client.providers.netty.NettyAsyncHttpProvider.upgradeProtocol(ChannelPipeline, String)
com.ning.http.client.providers.netty.NettyAsyncHttpProvider.access$2300(NettyAsyncHttpProvider, ChannelPipeline, String)
com.ning.http.client.providers.netty.NettyAsyncHttpProvider$HttpProtocol.handle(ChannelHandlerContext, MessageEvent)
com.ning.http.client.providers.netty.NettyAsyncHttpProvider.messageReceived(ChannelHandlerContext, MessageEvent)
org.jboss.netty.channel.SimpleChannelUpstreamHandler.handleUpstream(ChannelHandlerContext, ChannelEvent)
org.jboss.netty.channel.DefaultChannelPipeline.sendUpstream(DefaultChannelPipeline$DefaultChannelHandlerContext, ChannelEvent)
org.jboss.netty.channel.DefaultChannelPipeline$DefaultChannelHandlerContext.sendUpstream(ChannelEvent)
org.jboss.netty.handler.stream.ChunkedWriteHandler.handleUpstream(ChannelHandlerContext, ChannelEvent)
org.jboss.netty.channel.DefaultChannelPipeline.sendUpstream(DefaultChannelPipeline$DefaultChannelHandlerContext, ChannelEvent)
org.jboss.netty.channel.DefaultChannelPipeline$DefaultChannelHandlerContext.sendUpstream(ChannelEvent)
org.jboss.netty.channel.Channels.fireMessageReceived(ChannelHandlerContext, Object, SocketAddress)
org.jboss.netty.handler.codec.frame.FrameDecoder.unfoldAndFireMessageReceived(ChannelHandlerContext, SocketAddress, Object)
org.jboss.netty.handler.codec.replay.ReplayingDecoder.callDecode(ChannelHandlerContext, Channel, ChannelBuffer, ChannelBuffer, SocketAddress)
org.jboss.netty.handler.codec.replay.ReplayingDecoder.messageReceived(ChannelHandlerContext, MessageEvent)
org.jboss.netty.channel.SimpleChannelUpstreamHandler.handleUpstream(ChannelHandlerContext, ChannelEvent)
org.jboss.netty.handler.codec.http.HttpClientCodec.handleUpstream(ChannelHandlerContext, ChannelEvent)
org.jboss.netty.channel.DefaultChannelPipeline.sendUpstream(DefaultChannelPipeline$DefaultChannelHandlerContext, ChannelEvent)
org.jboss.netty.channel.DefaultChannelPipeline.sendUpstream(ChannelEvent)
org.jboss.netty.channel.Channels.fireMessageReceived(Channel, Object, SocketAddress)
org.jboss.netty.channel.Channels.fireMessageReceived(Channel, Object)
org.jboss.netty.channel.socket.nio.NioWorker.read(SelectionKey)
org.jboss.netty.channel.socket.nio.AbstractNioWorker.process(Selector)
org.jboss.netty.channel.socket.nio.AbstractNioSelector.run()
org.jboss.netty.channel.socket.nio.AbstractNioWorker.run()
org.jboss.netty.channel.socket.nio.NioWorker.run()
org.jboss.netty.util.ThreadRenamingRunnable.run()
org.jboss.netty.util.internal.DeadLockProofWorker$1.run()
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor$Worker)
java.util.concurrent.ThreadPoolExecutor$Worker.run()
java.lang.Thread.run()
search-target-bolt-pool-12 [BLOCKED] CPU time: 0s
java.security.Provider.getService(String, String)
sun.security.jca.ProviderList$ServiceList.tryGet(int)
sun.security.jca.ProviderList$ServiceList.access$200(ProviderList$ServiceList, int)
sun.security.jca.ProviderList$ServiceList$1.hasNext()
javax.crypto.Mac.getInstance(String)
com.ning.http.client.oauth.ThreadSafeHMAC.<init>(ConsumerKey, RequestToken)
com.ning.http.client.oauth.OAuthSignatureCalculator.<init>(ConsumerKey, RequestToken)
com.fullcontact.sherlock.utils.OAuthService.getCalculatorFromToken(Token)
com.fullcontact.sherlock.targets.AsyncSearchTarget.addOAuthHeadersIfNecessary(AsyncHttpClient$BoundRequestBuilder, Optional)
com.fullcontact.sherlock.targets.AsyncSearchTarget.processSearch(SearchTargetCallback)
com.fullcontact.sherlock.controller.AsyncSearchTargetController.searchForTask(SearchTaskContainer)
com.fullcontact.sherlock.storm.bolt.SearchTargetBolt$1.run()
java.util.concurrent.Executors$RunnableAdapter.call()
java.util.concurrent.FutureTask.run()
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor$Worker)
java.util.concurrent.ThreadPoolExecutor$Worker.run()
java.lang.Thread.run()
pool-9-thread-27 [BLOCKED] CPU time: 0s
sun.security.ssl.SSLContextImpl.getDefaultCipherSuiteList(boolean)
sun.security.ssl.SSLSocketImpl.init(SSLContextImpl, boolean)
sun.security.ssl.SSLSocketImpl.<init>(SSLContextImpl)
sun.security.ssl.SSLSocketFactoryImpl.createSocket()
org.apache.http.conn.ssl.SSLSocketFactory.createSocket(HttpParams)
org.apache.http.impl.conn.DefaultClientConnectionOperator.openConnection(OperatedClientConnection, HttpHost, InetAddress, HttpContext, HttpParams)
org.apache.http.impl.conn.AbstractPoolEntry.open(HttpRoute, HttpContext, HttpParams)
org.apache.http.impl.conn.AbstractPooledConnAdapter.open(HttpRoute, HttpContext, HttpParams)
org.apache.http.impl.client.DefaultRequestDirector.tryConnect(RoutedRequest, HttpContext)
org.apache.http.impl.client.DefaultRequestDirector.execute(HttpHost, HttpRequest, HttpContext)
org.apache.http.impl.client.AbstractHttpClient.execute(HttpHost, HttpRequest, HttpContext)
org.apache.http.impl.client.AbstractHttpClient.execute(HttpUriRequest, HttpContext)
org.apache.http.impl.client.AbstractHttpClient.execute(HttpUriRequest)
com.amazonaws.http.AmazonHttpClient.executeHelper(Request, HttpResponseHandler, HttpResponseHandler, ExecutionContext)
com.amazonaws.http.AmazonHttpClient.execute(Request, HttpResponseHandler, HttpResponseHandler, ExecutionContext)
com.amazonaws.services.sqs.AmazonSQSClient.invoke(Request, Unmarshaller)
com.amazonaws.services.sqs.AmazonSQSClient.deleteMessage(DeleteMessageRequest)
com.amazonaws.services.sqs.AmazonSQSAsyncClient$29.call()<2 recursive calls>
java.util.concurrent.FutureTask.run()
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor$Worker)
java.util.concurrent.ThreadPoolExecutor$Worker.run()
java.lang.Thread.run()
@toddlipcon
Copy link

@Xorlev did you ever track down a JDK bug for this deadlock?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment