So I've enabled debug logging which helps a bit. https://gist.github.com/gnodet/04b08b1d19caa67359f352522774a70d
I suspect a concurrent access to the byte buffer because the exception should be thrown from the HeapByteBuffer#checkIndex instead of from HeapByteBuffer#get. So I think there is a concurrent access which is called between the call to checkIndex and the array access. But this exception may be irrelevant as it's happening while handling another exception which is org.apache.mina.core.write.WriteToClosedSessionException While debugging, I noticed that during the call to isCloseNotify, the IoBuffer is at the end, so not sure that this is expected by the code. Le mer. 20 juin 2018 à 17:59, Emmanuel Lécharny <elecha...@gmail.com> a écrit : > > > Le 20/06/2018 à 17:29, Guillaume Nodet a écrit : > > Here it is: > > https://gist.github.com/gnodet/e2f63e474965ba4d02e9625a1c69cbb5 > > There is some message : > > Padded plaintext before ENCRYPTION: len = 240 > 0000: 2A 74 62 52 BC 59 24 C5 82 77 DB B3 B6 70 E6 D0 *tbR.Y$..w...p.. > 0010: 3C 3F 78 6D 6C 20 76 65 72 73 69 6F 6E 3D 22 31 <?xml version="1 > 0020: 2E 30 22 20 65 6E 63 6F 64 69 6E 67 3D 22 55 54 .0" encoding="UT > 0030: 46 2D 38 22 3F 3E 3C 65 72 72 6F 72 20 78 6D 6C F-8"?><error xml > 0040: 6E 73 3D 22 75 72 6E 3A 69 65 74 66 3A 70 61 72 ns="urn:ietf:par > 0050: 61 6D 73 3A 78 6D 6C 3A 6E 73 3A 78 6D 70 70 2D ams:xml:ns:xmpp- > 0060: 73 74 72 65 61 6D 73 22 3E 3C 62 61 64 2D 66 6F streams"><bad-fo > 0070: 72 6D 61 74 3E 3C 2F 62 61 64 2D 66 6F 72 6D 61 rmat></bad-forma > 0080: 74 3E 3C 74 65 78 74 20 78 6D 6C 3A 6C 61 6E 67 t><text xml:lang > 0090: 3D 22 65 6E 5F 55 53 22 3E 63 6F 75 6C 64 20 6E ="en_US">could n > 00A0: 6F 74 20 70 72 6F 63 65 73 73 20 69 6E 63 6F 6D ot process incom > 00B0: 69 6E 67 20 73 74 61 6E 7A 61 3C 2F 74 65 78 74 ing stanza</text > 00C0: 3E 28 A5 2F 6A 93 2E E7 B1 AA 46 6C D1 6D 51 70 >(./j.....Fl.mQp > 00D0: 33 92 83 AF A5 86 AA BD F5 89 66 5A 43 DB EC 8D 3.........fZC... > 00E0: 61 0E 0E 0E 0E 0E 0E 0E 0E 0E 0E 0E 0E 0E 0E 0E a............... > > > that might have cause one of the peer to close the connection, leading > to the error you get. > > In any case, the handshake has been properly handled, ending with a > FINISHED message on both side. > > What we see is : > > ... > NioProcessor-2, called closeInbound() > Smack Reader (0), received EOFException: error > Smack Reader (0), handling exception: > javax.net.ssl.SSLHandshakeException: Remote host closed connection > during handshake > NioProcessor-2, fatal error: 80: Inbound closed before receiving peer's > close_notify: possible truncation attack? > javax.net.ssl.SSLException: Inbound closed before receiving peer's > close_notify: possible truncation attack? > ... > > Could it be a problem in Camel ? > > > > > Le mer. 20 juin 2018 à 17:22, Emmanuel Lécharny <elecha...@gmail.com> a > > écrit : > > > >> I'd like to have the following test ran with -Djavax.net.debug=all > >> option set : > >> org.apache.camel.component.xmpp.XmppMultiUserChatTest.testXmppChat > >> > >> There is clearly some SSL weirdness going on... > >> > >> java.lang.RuntimeException: Could not connect to XMPP server: > >> localhost:5222/null > >> Caused by: org.jivesoftware.smack.SmackException: > >> javax.net.ssl.SSLHandshakeException: Remote host closed connection > >> during handshake > >> Caused by: javax.net.ssl.SSLHandshakeException: Remote host closed > >> connection during handshake > >> Caused by: java.io.EOFException: SSL peer shut down incorrectly > >> > >> > >> Le 20/06/2018 à 14:50, Guillaume Nodet a écrit : > >>> It seems mina-core 2.0.19 contains changes that could cause SSL > problems > >> in > >>> the following camel tests. > >>> Any idea ? > >>> > >>> Guillaume > >>> > >>> ---------- Forwarded message --------- > >>> From: Pascal Schumacher <pascalschumac...@gmx.net> > >>> Date: mar. 19 juin 2018 à 19:27 > >>> Subject: Upgrade to Mina 2.0.19 broke camel-xmpp tests > >>> To: d...@camel.apache.org <d...@camel.apache.org> > >>> > >>> > >>> Hi everybody, > >>> > >>> after the recent updated to Mina 2.0.19 four camel-xmpp tests are > broken: > >>> > >>> > >> > https://builds.apache.org/view/C/view/Apache%20Camel/job/Camel/job/master/411/testReport/junit/org.apache.camel.component.xmpp/ > >>> > >>> I can replicated this locally. Reverting commit > >>> 2b16d9b1c224e0d4b131f70017cf8010bb16edfe "Upgrade Mina to version > >>> 2.0.19" makes the tests pass again. > >>> > >>> No idea how to probably fix this, but I think we should fix this before > >>> releasing camel 2.22. > >>> > >>> Cheers, > >>> > >>> Pascal > >>> > >>> > >>> > >>> > >>> > >>> > >> > >> -- > >> Emmanuel Lecharny > >> > >> Symas.com > >> directory.apache.org > >> > >> > > > > -- > Emmanuel Lecharny > > Symas.com > directory.apache.org > > -- ------------------------ Guillaume Nodet