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

NPE in testsuite logged when using Conscrypt. #7988

Closed
normanmaurer opened this issue May 30, 2018 · 7 comments · Fixed by google/conscrypt#499 or #8001
Closed

NPE in testsuite logged when using Conscrypt. #7988

normanmaurer opened this issue May 30, 2018 · 7 comments · Fixed by google/conscrypt#499 or #8001
Milestone

Comments

@normanmaurer
Copy link
Member

Saw this during the build:

Running io.netty.handler.ssl.ConscryptJdkSslEngineInteropTest
18:01:39.304 [nioEventLoopGroup-676-3] DEBUG io.netty.buffer.PoolThreadCache - Freed 10 thread-local buffer(s) from thread: nioEventLoopGroup-676-3
18:01:39.304 [nioEventLoopGroup-676-2] DEBUG io.netty.buffer.PoolThreadCache - Freed 8 thread-local buffer(s) from thread: nioEventLoopGroup-676-2
[98.268s][info   ][gc,start      ] GC(54) Pause Young (G1 Evacuation Pause)
[98.268s][info   ][gc,task       ] GC(54) Using 8 workers of 8 for evacuation
[98.289s][info   ][gc,phases     ] GC(54)   Pre Evacuate Collection Set: 0.0ms
[98.289s][info   ][gc,phases     ] GC(54)   Evacuate Collection Set: 19.5ms
[98.289s][info   ][gc,phases     ] GC(54)   Post Evacuate Collection Set: 1.5ms
[98.289s][info   ][gc,phases     ] GC(54)   Other: 0.4ms
[98.289s][info   ][gc,heap       ] GC(54) Eden regions: 178->0(171)
[98.289s][info   ][gc,heap       ] GC(54) Survivor regions: 3->10(23)
[98.289s][info   ][gc,heap       ] GC(54) Old regions: 7->7
[98.289s][info   ][gc,heap       ] GC(54) Humongous regions: 54->54
[98.289s][info   ][gc,metaspace  ] GC(54) Metaspace: 33982K->33982K(1081344K)
[98.289s][info   ][gc            ] GC(54) Pause Young (G1 Evacuation Pause) 482M->140M(604M) 21.501ms
[98.290s][info   ][gc,cpu        ] GC(54) User=0.03s Sys=0.01s Real=0.02s
18:01:39.566 [nioEventLoopGroup-689-1] DEBUG io.netty.handler.ssl.SslHandler - [id: 0x4b609c89, L:/127.0.0.1:37424 - R:/127.0.0.1:45348] HANDSHAKEN: TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256
18:01:39.568 [nioEventLoopGroup-690-1] DEBUG io.netty.handler.ssl.SslHandler - [id: 0xc3c9581f, L:/127.0.0.1:45348 - R:/127.0.0.1:37424] HANDSHAKEN: TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256
18:01:39.588 [nioEventLoopGroup-689-1] DEBUG io.netty.buffer.PoolThreadCache - Freed 14 thread-local buffer(s) from thread: nioEventLoopGroup-689-1
18:01:39.601 [nioEventLoopGroup-690-1] DEBUG io.netty.buffer.PoolThreadCache - Freed 10 thread-local buffer(s) from thread: nioEventLoopGroup-690-1
18:01:39.642 [nioEventLoopGroup-677-2] DEBUG io.netty.buffer.PoolThreadCache - Freed 7 thread-local buffer(s) from thread: nioEventLoopGroup-677-2
18:01:39.643 [nioEventLoopGroup-677-3] DEBUG io.netty.buffer.PoolThreadCache - Freed 6 thread-local buffer(s) from thread: nioEventLoopGroup-677-3
18:01:39.684 [nioEventLoopGroup-692-1] DEBUG io.netty.handler.ssl.SslHandler - [id: 0x34ae8109, L:/127.0.0.1:40594 - R:/127.0.0.1:43038] HANDSHAKEN: TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256
18:01:39.685 [nioEventLoopGroup-693-1] DEBUG io.netty.handler.ssl.SslHandler - [id: 0x6cb9adc0, L:/127.0.0.1:43038 - R:/127.0.0.1:40594] HANDSHAKEN: TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256
18:01:39.713 [nioEventLoopGroup-692-1] DEBUG io.netty.buffer.PoolThreadCache - Freed 8 thread-local buffer(s) from thread: nioEventLoopGroup-692-1
18:01:39.730 [nioEventLoopGroup-693-1] DEBUG io.netty.buffer.PoolThreadCache - Freed 9 thread-local buffer(s) from thread: nioEventLoopGroup-693-1
18:01:39.811 [nioEventLoopGroup-678-2] DEBUG io.netty.buffer.PoolThreadCache - Freed 9 thread-local buffer(s) from thread: nioEventLoopGroup-678-2
18:01:39.813 [nioEventLoopGroup-678-3] DEBUG io.netty.buffer.PoolThreadCache - Freed 10 thread-local buffer(s) from thread: nioEventLoopGroup-678-3
18:01:39.905 [nioEventLoopGroup-679-3] DEBUG io.netty.buffer.PoolThreadCache - Freed 10 thread-local buffer(s) from thread: nioEventLoopGroup-679-3
18:01:39.999 [nioEventLoopGroup-679-2] DEBUG io.netty.buffer.PoolThreadCache - Freed 8 thread-local buffer(s) from thread: nioEventLoopGroup-679-2
18:01:40.171 [nioEventLoopGroup-680-3] DEBUG io.netty.buffer.PoolThreadCache - Freed 160 thread-local buffer(s) from thread: nioEventLoopGroup-680-3
18:01:40.171 [nioEventLoopGroup-680-2] DEBUG io.netty.buffer.PoolThreadCache - Freed 9 thread-local buffer(s) from thread: nioEventLoopGroup-680-2
18:01:40.323 [nioEventLoopGroup-681-3] DEBUG io.netty.buffer.PoolThreadCache - Freed 160 thread-local buffer(s) from thread: nioEventLoopGroup-681-3
18:01:40.325 [nioEventLoopGroup-681-2] DEBUG io.netty.buffer.PoolThreadCache - Freed 9 thread-local buffer(s) from thread: nioEventLoopGroup-681-2
18:01:40.482 [nioEventLoopGroup-682-2] DEBUG io.netty.buffer.PoolThreadCache - Freed 9 thread-local buffer(s) from thread: nioEventLoopGroup-682-2
18:01:40.482 [nioEventLoopGroup-682-3] DEBUG io.netty.buffer.PoolThreadCache - Freed 160 thread-local buffer(s) from thread: nioEventLoopGroup-682-3
18:01:40.528 [nioEventLoopGroup-695-1] DEBUG io.netty.handler.ssl.SslHandler - [id: 0x4ca0a975, L:/172.19.0.2:37904 - R:/172.19.0.2:51436] HANDSHAKEN: TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256
18:01:40.550 [nioEventLoopGroup-683-3] DEBUG io.netty.buffer.PoolThreadCache - Freed 160 thread-local buffer(s) from thread: nioEventLoopGroup-683-3
18:01:40.553 [nioEventLoopGroup-695-1] DEBUG io.netty.buffer.PoolThreadCache - Freed 12 thread-local buffer(s) from thread: nioEventLoopGroup-695-1
18:01:40.559 [nioEventLoopGroup-696-1] DEBUG io.netty.buffer.PoolThreadCache - Freed 5 thread-local buffer(s) from thread: nioEventLoopGroup-696-1
18:01:40.643 [nioEventLoopGroup-683-2] DEBUG io.netty.buffer.PoolThreadCache - Freed 9 thread-local buffer(s) from thread: nioEventLoopGroup-683-2
18:01:40.691 [nioEventLoopGroup-684-3] DEBUG io.netty.buffer.PoolThreadCache - Freed 161 thread-local buffer(s) from thread: nioEventLoopGroup-684-3
18:01:40.706 [main] DEBUG i.n.h.s.u.InsecureTrustManagerFactory - Accepting a server certificate: CN=example.com
18:01:40.796 [nioEventLoopGroup-684-2] DEBUG io.netty.buffer.PoolThreadCache - Freed 9 thread-local buffer(s) from thread: nioEventLoopGroup-684-2
18:01:40.960 [nioEventLoopGroup-699-1] DEBUG io.netty.handler.ssl.SslHandler - SSLException during trying to call SSLEngine.wrap(...) because of an previous SSLException, ignoring...
javax.net.ssl.SSLHandshakeException: SSL handshake aborted: ssl=0x7f12c41b3cf8: Failure in SSL library, usually a protocol error
error:1000007d:SSL routines:OPENSSL_internal:CERTIFICATE_VERIFY_FAILED (../ssl/handshake.cc:363 0x7f12bb959503:0x00000000)
	at org.conscrypt.SSLUtils.toSSLHandshakeException(SSLUtils.java:331)
	at org.conscrypt.ConscryptEngine.handshake(ConscryptEngine.java:1013)
	at org.conscrypt.ConscryptEngine.wrap(ConscryptEngine.java:1427)
	at java.base/javax.net.ssl.SSLEngine.wrap(SSLEngine.java:511)
	at org.conscrypt.Java8EngineWrapper.wrap(Java8EngineWrapper.java:56)
	at io.netty.handler.ssl.SslHandler.wrap(SslHandler.java:997)
	at io.netty.handler.ssl.SslHandler.wrap(SslHandler.java:803)
	at io.netty.handler.ssl.SslHandler.wrapAndFlush(SslHandler.java:771)
	at io.netty.handler.ssl.SslHandler.handleUnwrapThrowable(SslHandler.java:1207)
	at io.netty.handler.ssl.SslHandler.decodeJdkCompatible(SslHandler.java:1183)
	at io.netty.handler.ssl.SslHandler.decode(SslHandler.java:1221)
	at io.netty.handler.codec.ByteToMessageDecoder.decodeRemovalReentryProtection(ByteToMessageDecoder.java:489)
	at io.netty.handler.codec.ByteToMessageDecoder.callDecode(ByteToMessageDecoder.java:428)
	at io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:265)
	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:362)
	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:348)
	at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:340)
	at io.netty.channel.DefaultChannelPipeline$HeadContext.channelRead(DefaultChannelPipeline.java:1434)
	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:362)
	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:348)
	at io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:965)
	at io.netty.channel.nio.AbstractNioByteChannel$NioByteUnsafe.read(AbstractNioByteChannel.java:163)
	at io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:644)
	at io.netty.channel.nio.NioEventLoop.processSelectedKeysPlain(NioEventLoop.java:544)
	at io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:498)
	at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:458)
	at io.netty.util.concurrent.SingleThreadEventExecutor$5.run(SingleThreadEventExecutor.java:884)
	at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30)
	at java.base/java.lang.Thread.run(Thread.java:844)
Caused by: javax.net.ssl.SSLProtocolException: SSL handshake aborted: ssl=0x7f12c41b3cf8: Failure in SSL library, usually a protocol error
error:1000007d:SSL routines:OPENSSL_internal:CERTIFICATE_VERIFY_FAILED (../ssl/handshake.cc:363 0x7f12bb959503:0x00000000)
	at org.conscrypt.NativeCrypto.ENGINE_SSL_do_handshake(Native Method)
	at org.conscrypt.NativeSsl.doHandshake(NativeSsl.java:391)
	at org.conscrypt.ConscryptEngine.handshake(ConscryptEngine.java:978)
	... 27 common frames omitted
18:01:40.971 [nioEventLoopGroup-685-2] DEBUG io.netty.buffer.PoolThreadCache - Freed 9 thread-local buffer(s) from thread: nioEventLoopGroup-685-2
18:01:40.974 [nioEventLoopGroup-685-3] DEBUG io.netty.buffer.PoolThreadCache - Freed 161 thread-local buffer(s) from thread: nioEventLoopGroup-685-3
18:01:41.018 [nioEventLoopGroup-698-1] DEBUG io.netty.buffer.PoolThreadCache - Freed 4 thread-local buffer(s) from thread: nioEventLoopGroup-698-1
18:01:41.025 [nioEventLoopGroup-699-1] DEBUG io.netty.buffer.PoolThreadCache - Freed 7 thread-local buffer(s) from thread: nioEventLoopGroup-699-1
18:01:41.026 [nioEventLoopGroup-686-3] DEBUG io.netty.buffer.PoolThreadCache - Freed 161 thread-local buffer(s) from thread: nioEventLoopGroup-686-3
18:01:41.124 [nioEventLoopGroup-686-2] DEBUG io.netty.buffer.PoolThreadCache - Freed 9 thread-local buffer(s) from thread: nioEventLoopGroup-686-2
18:01:41.329 [nioEventLoopGroup-687-2] DEBUG io.netty.buffer.PoolThreadCache - Freed 9 thread-local buffer(s) from thread: nioEventLoopGroup-687-2
18:01:41.339 [nioEventLoopGroup-687-3] DEBUG io.netty.buffer.PoolThreadCache - Freed 161 thread-local buffer(s) from thread: nioEventLoopGroup-687-3
18:01:41.399 [main] DEBUG i.n.h.s.u.InsecureTrustManagerFactory - Accepting a server certificate: CN=example.com
18:01:41.426 [nioEventLoopGroup-702-1] DEBUG io.netty.handler.ssl.SslHandler - SSLException during trying to call SSLEngine.wrap(...) because of an previous SSLException, ignoring...
javax.net.ssl.SSLHandshakeException: SSL handshake aborted: ssl=0x7f129800be38: Failure in SSL library, usually a protocol error
error:10000416:SSL routines:OPENSSL_internal:SSLV3_ALERT_CERTIFICATE_UNKNOWN (../ssl/tls_record.cc:586 0x7f1298870be8:0x00000001)
	at org.conscrypt.SSLUtils.toSSLHandshakeException(SSLUtils.java:331)
	at org.conscrypt.ConscryptEngine.handshake(ConscryptEngine.java:1013)
	at org.conscrypt.ConscryptEngine.wrap(ConscryptEngine.java:1427)
	at java.base/javax.net.ssl.SSLEngine.wrap(SSLEngine.java:511)
	at org.conscrypt.Java8EngineWrapper.wrap(Java8EngineWrapper.java:56)
	at io.netty.handler.ssl.SslHandler.wrap(SslHandler.java:997)
	at io.netty.handler.ssl.SslHandler.wrap(SslHandler.java:803)
	at io.netty.handler.ssl.SslHandler.wrapAndFlush(SslHandler.java:771)
	at io.netty.handler.ssl.SslHandler.handleUnwrapThrowable(SslHandler.java:1207)
	at io.netty.handler.ssl.SslHandler.decodeJdkCompatible(SslHandler.java:1183)
	at io.netty.handler.ssl.SslHandler.decode(SslHandler.java:1221)
	at io.netty.handler.codec.ByteToMessageDecoder.decodeRemovalReentryProtection(ByteToMessageDecoder.java:489)
	at io.netty.handler.codec.ByteToMessageDecoder.callDecode(ByteToMessageDecoder.java:428)
	at io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:265)
	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:362)
	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:348)
	at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:340)
	at io.netty.channel.DefaultChannelPipeline$HeadContext.channelRead(DefaultChannelPipeline.java:1434)
	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:362)
	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:348)
	at io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:965)
	at io.netty.channel.nio.AbstractNioByteChannel$NioByteUnsafe.read(AbstractNioByteChannel.java:163)
	at io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:644)
	at io.netty.channel.nio.NioEventLoop.processSelectedKeysPlain(NioEventLoop.java:544)
	at io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:498)
	at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:458)
	at io.netty.util.concurrent.SingleThreadEventExecutor$5.run(SingleThreadEventExecutor.java:884)
	at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30)
	at java.base/java.lang.Thread.run(Thread.java:844)
Caused by: javax.net.ssl.SSLProtocolException: SSL handshake aborted: ssl=0x7f129800be38: Failure in SSL library, usually a protocol error
error:10000416:SSL routines:OPENSSL_internal:SSLV3_ALERT_CERTIFICATE_UNKNOWN (../ssl/tls_record.cc:586 0x7f1298870be8:0x00000001)
	at org.conscrypt.NativeCrypto.ENGINE_SSL_do_handshake(Native Method)
	at org.conscrypt.NativeSsl.doHandshake(NativeSsl.java:391)
	at org.conscrypt.ConscryptEngine.handshake(ConscryptEngine.java:978)
	... 27 common frames omitted
18:01:41.432 [nioEventLoopGroup-701-1] DEBUG io.netty.buffer.PoolThreadCache - Freed 6 thread-local buffer(s) from thread: nioEventLoopGroup-701-1
18:01:41.439 [nioEventLoopGroup-702-1] DEBUG io.netty.buffer.PoolThreadCache - Freed 8 thread-local buffer(s) from thread: nioEventLoopGroup-702-1
18:01:41.563 [main] DEBUG i.n.h.s.u.InsecureTrustManagerFactory - Accepting a server certificate: CN=example.com
18:01:41.691 [nioEventLoopGroup-704-1] DEBUG io.netty.handler.ssl.SslHandler - [id: 0xaea8b212, L:/127.0.0.1:34256 - R:/127.0.0.1:60070] HANDSHAKEN: TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256
18:01:41.692 [nioEventLoopGroup-705-1] DEBUG io.netty.handler.ssl.SslHandler - [id: 0x045d2f89, L:/127.0.0.1:60070 - R:localhost/127.0.0.1:34256] HANDSHAKEN: TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256
18:01:41.697 [nioEventLoopGroup-705-1] WARN  i.n.c.AbstractChannelHandlerContext - Failed to mark a promise as failure because it has succeeded already: DefaultChannelPromise@80355a8(success)
javax.net.ssl.SSLException: java.lang.NullPointerException: bio == null
	at org.conscrypt.SSLUtils.toSSLException(SSLUtils.java:341)
	at org.conscrypt.ConscryptEngine.convertException(ConscryptEngine.java:1151)
	at org.conscrypt.ConscryptEngine.readPendingBytesFromBIO(ConscryptEngine.java:1267)
	at org.conscrypt.ConscryptEngine.wrap(ConscryptEngine.java:1411)
	at java.base/javax.net.ssl.SSLEngine.wrap(SSLEngine.java:511)
	at org.conscrypt.Java8EngineWrapper.wrap(Java8EngineWrapper.java:56)
	at io.netty.handler.ssl.SslHandler.wrap(SslHandler.java:997)
	at io.netty.handler.ssl.SslHandler.wrap(SslHandler.java:803)
	at io.netty.handler.ssl.SslHandler.wrapAndFlush(SslHandler.java:771)
	at io.netty.handler.ssl.SslHandler.flush(SslHandler.java:752)
	at io.netty.handler.ssl.SslHandler.flush(SslHandler.java:1625)
	at io.netty.handler.ssl.SslHandler.closeOutboundAndChannel(SslHandler.java:1593)
	at io.netty.handler.ssl.SslHandler.close(SslHandler.java:710)
	at io.netty.channel.AbstractChannelHandlerContext.invokeClose(AbstractChannelHandlerContext.java:624)
	at io.netty.channel.AbstractChannelHandlerContext.access$1100(AbstractChannelHandlerContext.java:38)
	at io.netty.channel.AbstractChannelHandlerContext$13.run(AbstractChannelHandlerContext.java:613)
	at io.netty.util.concurrent.AbstractEventExecutor.safeExecute(AbstractEventExecutor.java:163)
	at io.netty.util.concurrent.SingleThreadEventExecutor.runAllTasks(SingleThreadEventExecutor.java:404)
	at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:462)
	at io.netty.util.concurrent.SingleThreadEventExecutor$5.run(SingleThreadEventExecutor.java:884)
	at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30)
	at java.base/java.lang.Thread.run(Thread.java:844)
Caused by: java.lang.NullPointerException: bio == null
	at org.conscrypt.NativeCrypto.SSL_pending_written_bytes_in_BIO(Native Method)
	at org.conscrypt.NativeSsl$BioWrapper.getPendingWrittenBytes(NativeSsl.java:571)
	at org.conscrypt.ConscryptEngine.pendingOutboundEncryptedBytes(ConscryptEngine.java:553)
	at org.conscrypt.ConscryptEngine.readPendingBytesFromBIO(ConscryptEngine.java:1236)
	... 19 common frames omitted
18:01:41.749 [nioEventLoopGroup-704-1] DEBUG io.netty.buffer.PoolThreadCache - Freed 8 thread-local buffer(s) from thread: nioEventLoopGroup-704-1
18:01:41.771 [nioEventLoopGroup-705-1] DEBUG io.netty.buffer.PoolThreadCache - Freed 11 thread-local buffer(s) from thread: nioEventLoopGroup-705-1

Most interesting is this:

javax.net.ssl.SSLException: java.lang.NullPointerException: bio == null
	at org.conscrypt.SSLUtils.toSSLException(SSLUtils.java:341)
	at org.conscrypt.ConscryptEngine.convertException(ConscryptEngine.java:1151)
	at org.conscrypt.ConscryptEngine.readPendingBytesFromBIO(ConscryptEngine.java:1267)
	at org.conscrypt.ConscryptEngine.wrap(ConscryptEngine.java:1411)
	at java.base/javax.net.ssl.SSLEngine.wrap(SSLEngine.java:511)
	at org.conscrypt.Java8EngineWrapper.wrap(Java8EngineWrapper.java:56)
	at io.netty.handler.ssl.SslHandler.wrap(SslHandler.java:997)
	at io.netty.handler.ssl.SslHandler.wrap(SslHandler.java:803)
	at io.netty.handler.ssl.SslHandler.wrapAndFlush(SslHandler.java:771)
	at io.netty.handler.ssl.SslHandler.flush(SslHandler.java:752)
	at io.netty.handler.ssl.SslHandler.flush(SslHandler.java:1625)
	at io.netty.handler.ssl.SslHandler.closeOutboundAndChannel(SslHandler.java:1593)
	at io.netty.handler.ssl.SslHandler.close(SslHandler.java:710)
	at 

I wonder if this is just a bug in conscrypt ?

@normanmaurer
Copy link
Member Author

@ejona86 @carl-mastrangelo @nmittler who would be the best to ping on your end ?

@carl-mastrangelo
Copy link
Member

@flooey
Copy link

flooey commented May 31, 2018

Yep, that's probably just a bug in Conscrypt. Can you tell me what you're doing to trigger that?

flooey pushed a commit to flooey/conscrypt that referenced this issue May 31, 2018
When calling wrap() on a closed SSLEngine instance, we check to see if
anything is already pending to be written, but the native BIO will
already have been freed, so the native code threw
NullPointerException.  Check for it being already freed when looking
for pending data and just return zero in thta case.

Also sets the bio pointer to 0 before freeing it and and marks it as
volatile to reduce the chances of any weird race conditions, though
the locking in ConscryptEngine should already make these impossible.

Fixes netty/netty#7988.
@flooey
Copy link

flooey commented May 31, 2018

Nevermind, I see through the stack trace that this is due to calling wrap() on a closed SSLEngine. That obviously shouldn't throw NPE. I've uploaded a fix for review.

@normanmaurer
Copy link
Member Author

normanmaurer commented May 31, 2018 via email

flooey added a commit to google/conscrypt that referenced this issue May 31, 2018
When calling wrap() on a closed SSLEngine instance, we check to see if
anything is already pending to be written, but the native BIO will
already have been freed, so the native code threw
NullPointerException.  Check for it being already freed when looking
for pending data and just return zero in that case.

Also sets the bio pointer to 0 before freeing it and and marks it as
volatile to reduce the chances of any weird race conditions, though
the locking in ConscryptEngine should already make these impossible.

Fixes netty/netty#7988.
@flooey
Copy link

flooey commented May 31, 2018

Okay, this should be fixed at head. I expect to make our next release on Monday.

@normanmaurer
Copy link
Member Author

normanmaurer commented May 31, 2018 via email

normanmaurer added a commit that referenced this issue Jun 4, 2018
…sing conscrypt.

Motivation:

When using conscrypt some NPEs were logged, these were fixed in the latest release.

Modifications:

Update to conscrypt 1.1.3.

Result:

Fixes #7988.
normanmaurer added a commit that referenced this issue Jun 4, 2018
…ng conscrypt.

Motivation:

When using conscrypt some NPEs were logged, these were fixed in the latest release.

Modifications:

Update to conscrypt 1.1.3.

Result:

Fixes #7988.
normanmaurer added a commit that referenced this issue Jun 4, 2018
…ng conscrypt. (#8001)

Motivation:

When using conscrypt some NPEs were logged, these were fixed in the latest release.

Modifications:

Update to conscrypt 1.1.3.

Result:

Fixes #7988.
@normanmaurer normanmaurer added this to the 4.1.26.Final milestone Jun 4, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants