Intermittent High CPU Issue Involving SunLayoutEngine.getEngine and java.util.HashMap.get

(Doc ID 1473441.1)

Last updated on OCTOBER 21, 2016

Applies to:

Java Platform, Standard Edition - Version 5.0 to 7 [Release 5.0 to 7]
Information in this document applies to any platform.


If you are experiencing high CPU load and see a stack trace similar to that which follows...

Spinning thread in an application running with the HotSpot VM:


"GlyphLayout Thread 1" prio=10 tid=0x00000000414c9000 nid=0x1387 runnable [0x00007f5851af4000]
   java.lang.Thread.State: RUNNABLE
        at java.util.HashMap.get(
        at sun.font.SunLayoutEngine.getEngine(
        at sun.font.GlyphLayout$EngineRecord.init(
        at sun.font.GlyphLayout.nextEngineRecord(
        at sun.font.GlyphLayout.layout(
        at sun.font.ExtendedTextSourceLabel.createGV(
        at sun.font.ExtendedTextSourceLabel.getGV(
        at sun.font.ExtendedTextSourceLabel.createCharinfo(
        at sun.font.ExtendedTextSourceLabel.getCharinfo(
        at sun.font.ExtendedTextSourceLabel.getLineBreakIndex(
        at java.awt.font.TextMeasurer.calcLineBreak(
        at java.awt.font.TextMeasurer.getLineBreakIndex(
        at java.awt.font.LineBreakMeasurer.nextOffset(
        at java.awt.font.LineBreakMeasurer.nextLayout(
        at java.awt.font.LineBreakMeasurer.nextLayout(

Spinning thread in an application running with the JRockit VM:


"GlyphLayout Thread 1" id=13 idx=0x38 tid=6044 prio=5 alive, native_blocked
    at java/util/HashMap.get(
    at sun/font/SunLayoutEngine.getEngine(
    at sun/font/GlyphLayout$EngineRecord.init(
    at sun/font/GlyphLayout.nextEngineRecord(
    at sun/font/GlyphLayout.layout(
    at sun/font/ExtendedTextSourceLabel.createGV(
    at sun/font/ExtendedTextSourceLabel.getGV(
    at sun/font/ExtendedTextSourceLabel.createCharinfo(
    at sun/font/ExtendedTextSourceLabel.getCharinfo(
    at sun/font/ExtendedTextSourceLabel.getLineBreakIndex(
    at java/awt/font/TextMeasurer.calcLineBreak(
    at java/awt/font/TextMeasurer.getLineBreakIndex(
    at java/awt/font/LineBreakMeasurer.nextOffset(
    at java/awt/font/LineBreakMeasurer.nextLayout(
    at java/awt/font/LineBreakMeasurer.nextLayout(
    at jonathan/
    at java/lang/
    at jrockit/vm/RNI.c2java(JJJJJ)V(Native Method)
    -- end of trace


You are facing a problem with accessing an HashMap concurrently.  The specific instance cited above is a defect in Java code.




Sign In with your My Oracle Support account

Don't have a My Oracle Support account? Click to get started

My Oracle Support provides customers with access to over a
Million Knowledge Articles and hundreds of Community platforms