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.

Symptoms

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(HashMap.java:303)
        at sun.font.SunLayoutEngine.getEngine(SunLayoutEngine.java:115)
        at sun.font.GlyphLayout$EngineRecord.init(GlyphLayout.java:642)
        at sun.font.GlyphLayout.nextEngineRecord(GlyphLayout.java:494)
        at sun.font.GlyphLayout.layout(GlyphLayout.java:426)
        at sun.font.ExtendedTextSourceLabel.createGV(ExtendedTextSourceLabel.java:308)
        at sun.font.ExtendedTextSourceLabel.getGV(ExtendedTextSourceLabel.java:294)
        at sun.font.ExtendedTextSourceLabel.createCharinfo(ExtendedTextSourceLabel.java:563)
        at sun.font.ExtendedTextSourceLabel.getCharinfo(ExtendedTextSourceLabel.java:492)
        at sun.font.ExtendedTextSourceLabel.getLineBreakIndex(ExtendedTextSourceLabel.java:438)
        at java.awt.font.TextMeasurer.calcLineBreak(TextMeasurer.java:308)
        at java.awt.font.TextMeasurer.getLineBreakIndex(TextMeasurer.java:544)
        at java.awt.font.LineBreakMeasurer.nextOffset(LineBreakMeasurer.java:340)
        at java.awt.font.LineBreakMeasurer.nextLayout(LineBreakMeasurer.java:422)
        at java.awt.font.LineBreakMeasurer.nextLayout(LineBreakMeasurer.java:395)
        at jonathan.GlyphBug.run(GlyphBug.java:92)
        at java.lang.Thread.run(Thread.java:619)

 
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(HashMap.java:382)
    at sun/font/SunLayoutEngine.getEngine(SunLayoutEngine.java:115)
    at sun/font/GlyphLayout$EngineRecord.init(GlyphLayout.java:642)
    at sun/font/GlyphLayout.nextEngineRecord(GlyphLayout.java:494)
    at sun/font/GlyphLayout.layout(GlyphLayout.java:426)
    at sun/font/ExtendedTextSourceLabel.createGV(ExtendedTextSourceLabel.java:308)
    at sun/font/ExtendedTextSourceLabel.getGV(ExtendedTextSourceLabel.java:294)
    at sun/font/ExtendedTextSourceLabel.createCharinfo(ExtendedTextSourceLabel.java:563)
    at sun/font/ExtendedTextSourceLabel.getCharinfo(ExtendedTextSourceLabel.java:492)
    at sun/font/ExtendedTextSourceLabel.getLineBreakIndex(ExtendedTextSourceLabel.java:438)
    at java/awt/font/TextMeasurer.calcLineBreak(TextMeasurer.java:308)
    at java/awt/font/TextMeasurer.getLineBreakIndex(TextMeasurer.java:544)
    at java/awt/font/LineBreakMeasurer.nextOffset(LineBreakMeasurer.java:340)
    at java/awt/font/LineBreakMeasurer.nextLayout(LineBreakMeasurer.java:422)
    at java/awt/font/LineBreakMeasurer.nextLayout(LineBreakMeasurer.java:395)
    at jonathan/GlyphBug.run(GlyphBug.java:92)
    at java/lang/Thread.run(Thread.java:662)
    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.

Changes

 

Cause

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