Tencent / TencentKonaSMSuite

Tencent Kona SM Suite contains a set of Java security providers, which support algorithms SM2, SM3 and SM4, and protocols TLCP/GMSSL, TLS 1.3 (with RFC 8998) and TLS 1.2.
Other
366 stars 73 forks source link

HexDumpEncoder.encodeBuffer()处理耗cpu直接100% #837

Closed hukaiping2008 closed 3 weeks ago

hukaiping2008 commented 3 months ago
`---ts=2024-08-01 21:43:50;thread_name=pool-3-thread-2;id=35;is_daemon=false;priority=5;TCCL=sun.misc.Launcher$AppClassLoader@33909752
    `---[22.971863ms] com.tencent.kona.sun.security.util.HexDumpEncoder:encodeBuffer()
        +---[0.02% 0.005307ms ] com.tencent.kona.sun.security.util.HexDumpEncoder:getBytes() #327
        `---[99.96% 22.961557ms ] com.tencent.kona.sun.security.util.HexDumpEncoder:encodeBuffer() #328
            `---[99.99% 22.958501ms ] com.tencent.kona.sun.security.util.HexDumpEncoder:encodeBuffer()
                `---[99.99% 22.95572ms ] com.tencent.kona.sun.security.util.HexDumpEncoder:encodeBuffer() #299
                    `---[99.99% 22.952697ms ] com.tencent.kona.sun.security.util.HexDumpEncoder:encodeBuffer()
                        +---[0.00% 5.51E-4ms ] com.tencent.kona.sun.security.util.HexDumpEncoder:bytesPerLine() #267
                        +---[0.04% 0.009004ms ] com.tencent.kona.sun.security.util.HexDumpEncoder:encodeBufferPrefix() #269
                        +---[0.81% min=3.36E-4ms,max=0.001662ms,total=0.185695ms,count=513] com.tencent.kona.sun.security.util.HexDumpEncoder:readFully() #272
                        +---[0.93% min=3.84E-4ms,max=0.001024ms,total=0.213321ms,count=512] com.tencent.kona.sun.security.util.HexDumpEncoder:encodeLinePrefix() #276
                        +---[10.27% min=2.57E-4ms,max=0.020131ms,total=2.356224ms,count=8192] com.tencent.kona.sun.security.util.HexDumpEncoder:bytesPerAtom() #278
                        +---[10.37% min=2.58E-4ms,max=0.013381ms,total=2.380315ms,count=8192] com.tencent.kona.sun.security.util.HexDumpEncoder:bytesPerAtom() #279
                        +---[14.63% min=3.56E-4ms,max=0.020403ms,total=3.358253ms,count=8192] com.tencent.kona.sun.security.util.HexDumpEncoder:encodeAtom() #279
                        +---[10.10% min=2.58E-4ms,max=0.013249ms,total=2.317792ms,count=8192] com.tencent.kona.sun.security.util.HexDumpEncoder:bytesPerAtom() #277
                        +---[2.78% min=0.001101ms,max=0.021022ms,total=0.637326ms,count=512] com.tencent.kona.sun.security.util.HexDumpEncoder:encodeLineSuffix() #284
                        `---[0.71% min=2.62E-4ms,max=0.017488ms,total=0.162676ms,count=512] com.tencent.kona.sun.security.util.HexDumpEncoder:bytesPerLine() #285

`---ts=2024-08-01 21:43:50;thread_name=pool-3-thread-2;id=35;is_daemon=false;priority=5;TCCL=sun.misc.Launcher$AppClassLoader@33909752
    `---[23.574437ms] com.tencent.kona.sun.security.util.HexDumpEncoder:encodeBuffer()
        +---[0.00% 5.38E-4ms ] com.tencent.kona.sun.security.util.HexDumpEncoder:bytesPerLine() #267
        +---[0.03% 0.006651ms ] com.tencent.kona.sun.security.util.HexDumpEncoder:encodeBufferPrefix() #269
        +---[0.93% min=3.37E-4ms,max=0.01517ms,total=0.218618ms,count=514] com.tencent.kona.sun.security.util.HexDumpEncoder:readFully() #272
        +---[1.00% min=3.85E-4ms,max=0.016894ms,total=0.236902ms,count=514] com.tencent.kona.sun.security.util.HexDumpEncoder:encodeLinePrefix() #276
        +---[10.33% min=2.59E-4ms,max=0.017962ms,total=2.436141ms,count=8221] com.tencent.kona.sun.security.util.HexDumpEncoder:bytesPerAtom() #278
        +---[10.34% min=2.58E-4ms,max=0.020159ms,total=2.437648ms,count=8221] com.tencent.kona.sun.security.util.HexDumpEncoder:bytesPerAtom() #279
        +---[14.46% min=3.6E-4ms,max=0.020237ms,total=3.409021ms,count=8221] com.tencent.kona.sun.security.util.HexDumpEncoder:encodeAtom() #279
        +---[10.26% min=2.6E-4ms,max=0.017735ms,total=2.419102ms,count=8221] com.tencent.kona.sun.security.util.HexDumpEncoder:bytesPerAtom() #277
        +---[2.34% min=8.26E-4ms,max=0.013995ms,total=0.551646ms,count=514] com.tencent.kona.sun.security.util.HexDumpEncoder:encodeLineSuffix() #284
        `---[0.69% min=2.64E-4ms,max=0.015913ms,total=0.163374ms,count=514] com.tencent.kona.sun.security.util.HexDumpEncoder:bytesPerLine() #285
johnshajiang commented 3 months ago

@hukaiping2008 非常感谢你的问题!

请问,能否提供一个直接重现该问题的测试用例?

johnshajiang commented 3 weeks ago

@hukaiping2008 由于缺乏更多信息,先关闭该issue。 如能进一步提供测试用例或数据,请再打开它。