0

The Context of my question

My server software is based on

openjdk version "1.8.0_242"

Nearly ever 2-3 week my server process crashes. In the Java Dmp file is see that when doing

HttpsURLConnection conn = (HttpsURLConnection)myurl.openConnection(); 

there is a memory violation in the libcrypt-1_1 DLL in

4XENATIVESTACK               CRYPTO_memcmp+0xe8ef8 (0x00007FFA122A5C18 [libcrypto-1_1-x64+0x185c18])

So for me it looks like that CRYPTO_memcmp forces

1XHEXCPCODE Windows_ExceptionCode: C0000005

My Question

Did anybody observe a similar crash with openJ9 or have an idea about the root cause?

Many thanks in advance Reinhold

  • Quick Hint: I have also a different installation ( same software) but libcrypto ois not used. In this case the DLL libeay32.dll is used. But Nevertheless I get also the memeory violation exception and the crash is in libeay32.dll in the native method NativeCrypto.CBCInit(Native Method). – Reinhold Jäkle Jan 07 '21 at 13:21
  • BTW: Both software instanaces are running on Windows OS – Reinhold Jäkle Jan 07 '21 at 13:29

2 Answers2

0

I just think about my implementation which is a server and of cource I am using multitheading.

So I need to double check if libcrypto is Multi-Thread-safe. If not then this could explain the crash.

But the real question is: Is the method myurl.openConnection() realy thread-safe.
As far as I know it should be thread safe.

I will update with my finding as soon I found something

  • I checked : https://wiki.openssl.org/index.php/Libcrypto_API , and I found the following note in section Thread Safety --> OpenSSL currently is thread-NOT-safe by default. – Reinhold Jäkle Jan 07 '21 at 13:51
0

I think you've encountered OpenJ9 issue 8373 which is fixed in the 0.23 release of jdk8u275-b01.

  • Great.. many thanks for the hint.. I will give a try to check if the new build fixes the problem.. Mightbe it will take some time before I can confirm it. The server may run few weeks or forever :-) Cheers Reinhold – Reinhold Jäkle Jan 13 '21 at 12:36