[openssl-dev] [openssl.org #4088] RE: [Bug] Openssl caused CPU high to 100%

Zhang, Lily via RT rt at openssl.org
Sun Oct 11 00:52:40 UTC 2015


Hi,
I have found the API which caused high CPU.

When calling API below, the CPU went to high in my host.
FIPS_mode_set(1);

Is it possible to reduce the CPU usage in this API?

Thanks
Lily

From: Zhang, Lily (USD)
Sent: Thursday, October 08, 2015 2:43 PM
To: 'rt at openssl.org'
Cc: Joshi, Samiksha
Subject: [Bug] Openssl caused CPU high to 100%

Hi

Description:
Client side uses openssl to communicate with https server, Openssl caused high CPU to 100%  in client host.

Detail:
Our client uses openssl 0.9.8za-fips to communicate with a server. In our test, client is able to communicate with server without any issues, but we found our client caused CPU to 100% in client host, and it lasted about several seconds.
When the CPU is high, some dumps were generated, it is in openssl area from the call stack,

Dump 0's call stack:
0:000> .ttime
Created: Thu Sep 10 03:28:11.968 2015 (GMT+8)
0:000> kb
ChildEBP RetAddr  Args to Child
WARNING: Stack unwind information not available. Following frames may be wrong.
0012fa34 0fb8ed9a 0fb96d8a 012e2998 2a7d0bb7 libeay32!bn_sub_words+0xf53
0012fa38 0fb96d8a 012e2998 2a7d0bb7 00000008 libeay32!bn_sub_words+0x92a
0012fa50 0fb96d4a 0fb96e2b 012e2998 012e2958 libeay32!BN_MONT_CTX_set_locked+0x1da
00000000 00000000 00000000 00000000 00000000 libeay32!BN_MONT_CTX_set_locked+0x19a

Dump 1's call stack:
0:000> .ttime
Created: Thu Sep 10 03:29:31.640 2015 (GMT+8)
Kernel:  0 days 0:00:00.171
User:    0 days 0:00:01.546
0:000> kb
ChildEBP RetAddr  Args to Child
WARNING: Stack unwind information not available. Following frames may be wrong.
0012fb18 0fb8df9a 0fb96628 012e2868 012d32f8 libeay32!FINGERPRINT_premain+0x22c
0012fb1c 0fb96628 012e2868 012d32f8 00000020 libeay32!bn_mul_add_words+0xa
0012fb58 0fb8bac9 012d3d18 012e0bb0 0fb96b37 libeay32!BN_from_montgomery+0x108
0012fb64 0fb96b37 012d3d18 012e0b9c 012de8c0 libeay32!BN_CTX_get+0x49
0012fb84 0fb8de39 012d3d18 012d3d18 012d3d18 libeay32!BN_mod_mul_montgomery+0x57
0012fc48 0fb8fadf 012d3cf0 012d3cf0 012d3cdc libeay32!BN_mod_exp_mont+0x339
0012fc64 0fb90235 012d3cc8 00000002 012de8c0 libeay32!BN_GENCB_call+0x5f
0012fc9c 0fb95c86 012d3ca0 00000032 012d30b8 libeay32!BN_is_prime_fasttest_ex+0x345
00000000 00000000 00000000 00000000 00000000 libeay32!DSA_do_verify+0x5d6

Dump2's call stack:
0:000> .ttime
Created: Thu Sep 10 03:29:36.687 2015 (GMT+8)
Kernel:  0 days 0:00:00.125
User:    0 days 0:00:03.046

.  0  Id: d60.870 Suspend: 1 Teb: 7ffdd000 Unfrozen
ChildEBP RetAddr  Args to Child
WARNING: Stack unwind information not available. Following frames may be wrong.
0012faf4 0fb8e041 04eb474c 00000000 8c3155d4 libeay32!FINGERPRINT_premain+0x276
0012fb1c 0fb96628 011aabf8 012d32f8 00000008 libeay32!bn_mul_add_words+0xb1
0012fb64 0fb96b37 012d3d58 012d3d6c 012de8c0 libeay32!BN_from_montgomery+0x108
0012fb84 0fb8dd27 012d3d58 012d3d44 012d3d1c libeay32!BN_mod_mul_montgomery+0x57
0012fbe8 78134c58 0fb82a9d 012d2e90 012d2e90 libeay32!BN_mod_exp_mont+0x227
0012fc2c 0fb8c85d 012d3d08 00000400 0fb8c840 msvcr80!free+0xec [f:\dd\vctools\crt_bld\self_x86\crt\src\free.c @ 115]
00000000 00000000 00000000 00000000 00000000 libeay32!BN_pseudo_rand+0x1d

If I googled "openssl CPU high 100%", be able to list some links about this.

Do you know if this is a known issue in openssl? Please let me know anything else needed to root cause this issue?

Thanks
Lily


-------------- next part --------------
_______________________________________________
openssl-bugs-mod mailing list
openssl-bugs-mod at openssl.org
https://mta.openssl.org/mailman/listinfo/openssl-bugs-mod


More information about the openssl-dev mailing list