OpenSolaris

Printable Version Enter a New Search
Bug ID 6691236
Synopsis Swing applications dump core in snv_86 and snv_87 when locale is nn_NO.UTF-8
State 11-Closed:Verified (Closed)
Category:Subcategory xserver:i18n
Keywords xi18n
Responsible Engineer Wei Xue
Reported Against snv_86
Duplicate Of
Introduced In
Commit to Fix snv_91
Fixed In snv_91
Release Fixed solaris_nevada(snv_91)
Related Bugs
Submit Date 20-April-2008
Last Update Date 7-August-2008
Description
After live upgrading a system from snv_84 to snv_87, many Swing applications (for instance NetBeans) started to dump core at seemingly random times during execution. When I changed locale from nn_NO.UTF-8 to en_US.UTF-8, the problem went away. Since both snv_84 and snv_87 contain the same version of JDK6, and the problem seems to be locale dependent, I assume this is related to the I18N changes in the latest Nevada builds. I also tried this on a system running snv_86 and saw the same problems there.

I managed to create a small Swing application that consistently reproduced the core dump in my environment. To reproduce, follow these steps:

1. Check that the locale is nn_NO.UTF-8 and the Java version is 1.6.0_04:

$ locale
LANG=nn_NO.UTF-8
LC_CTYPE=nn_NO.UTF-8
LC_NUMERIC=nn_NO.UTF-8
LC_TIME=nn_NO.UTF-8
LC_COLLATE=nn_NO.UTF-8
LC_MONETARY=nn_NO.UTF-8
LC_MESSAGES=C
LC_ALL=
$ java -version
java version "1.6.0_04"
Java(TM) SE Runtime Environment (build 1.6.0_04-b12)
Java HotSpot(TM) Client VM (build 10.0-b19, mixed mode, sharing)

2. Compile the Swing application:

$ cat CoreDump.java
import java.awt.BorderLayout;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import javax.swing.JButton;
import javax.swing.JFrame;
import javax.swing.JTextField;

public class CoreDump {
    public static void main(String[] args) {
        final JFrame frame = new JFrame("Test");
        JButton btn = new JButton("press me to dump core");
        btn.addActionListener(new ActionListener() {
            public void actionPerformed(ActionEvent e) {
                frame.dispose();
            }
        });
        frame.getContentPane().add(btn, BorderLayout.SOUTH);
        frame.getContentPane().add(new JTextField(""), BorderLayout.CENTER);
        frame.pack();
        frame.setVisible(true);
    }
}
$ javac CoreDump.java

3. Run the Swing application and press the button in the window that pops up:

$ java CoreDump
#
# An unexpected error has been detected by Java Runtime Environment:
#
#  SIGSEGV (0xb) at pc=0xfb940e24, pid=3211, tid=11
#
# Java VM: Java HotSpot(TM) Client VM (10.0-b19 mixed mode, sharing solaris-x86)
# Problematic frame:
# C  0xfb940e24
#
# An error report file with more information is saved as:
# /tmp/repro/hs_err_pid3211.log
#
# If you would like to submit a bug report, please visit:
#   http://java.sun.com/webapps/bugreport/crash.jsp
#
zsh: IOT instruction (core dumped)  java CoreDump
Work Around
N/A
Comments
N/A