Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 31 Jul 2002 01:00:21 +0800
From:      Huang wen hui <hwh@mail.gddsn.org.cn>
To:        freebsd-java@freebsd.org
Subject:   Ugly fix patchset7 + XIM server (was: patchset 7 crash under -CURRENT + chinese XIM Server.)
Message-ID:  <3D46C625.5080500@mail.gddsn.org.cn>
References:  <3D433A93.9000302@mail.gddsn.org.cn>

next in thread | previous in thread | raw e-mail | index | archive | help
Huang wen hui дµÀ:

>Hi,
>I install JDK1.3.1-p7 + hostspot( compiler1) under -CURRENT(2002/07/27).
>and use chinput as XIM Server. jdk works fine under
>-STABLE or -CURRENT without starting XIM Server. but crash quickly under
>-CURRENT + chinese XIM Server. hotspot vm also crash.
>I recompile open-motif before build jdk.
>
>
>%java_g -jar /usr/local/jdk1.3.1/demo/jfc/Notepad/Notepad.jar
>SIGBUS 10* bus error
>
>Full thread dump Classic VM (1.3.1-p7-root-020727-22:30, green threads):
>"AWT-Motif" (TID:0x28eecfa0, sys_thread_t:0x8407080, state:MW) prio=6
>at sun.awt.motif.MToolkit.run(Native Method)
>at java.lang.Thread.run(Thread.java:484)
>"SunToolkit.PostEventQueue-0" (TID:0x28eecb90, sys_thread_t:0x83d9680,
>state:CW) prio=6
>at java.lang.Object.wait(Native Method)
>at java.lang.Object.wait(Object.java:420)
>at sun.awt.PostEventQueue.run(SunToolkit.java:491)
>"AWT-EventQueue-0" (TID:0x28eecbb8, sys_thread_t:0x83d9480, state:CW) prio=6
>at java.lang.Object.wait(Native Method)
>at java.lang.Object.wait(Object.java:420)
>at java.awt.EventQueue.getNextEvent(EventQueue.java:260)
>at
>java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:106)
>at
>java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:98)
>at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93)
>at java.awt.EventDispatchThread.run(EventDispatchThread.java:85)
>"Finalizer" (TID:0x28ebf530, sys_thread_t:0x80d9080, state:CW) prio=8
>at java.lang.Object.wait(Native Method)
>at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:108)
>at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:123)
>at java.lang.ref.Finalizer$FinalizerThread.run(Finalizer.java:162)
>"Reference Handler" (TID:0x28ebf308, sys_thread_t:0x8096480, state:CW)
>prio=10
>at java.lang.Object.wait(Native Method)
>at java.lang.Object.wait(Object.java:420)
>at java.lang.ref.Reference$ReferenceHandler.run(Reference.java:110)
>"Signal dispatcher" (TID:0x28ebf338, sys_thread_t:0x8096280, state:CW)
>prio=5
>"main" (TID:0x28ebf2f0, sys_thread_t:0x8054080, state:R) prio=5
>at sun.awt.motif.MToolkit.loadSystemColors(Native Method)
>at java.awt.SystemColor.updateSystemColors(SystemColor.java:342)
>at java.awt.SystemColor.<clinit>(SystemColor.java:335)
>at sun.awt.motif.MWindowPeer.init(MWindowPeer.java:109)
>at sun.awt.motif.MFramePeer.<init>(MFramePeer.java:53)
>at sun.awt.motif.MToolkit.createFrame(MToolkit.java:138)
>at java.awt.Frame.addNotify(Frame.java:353)
>at javax.swing.plaf.metal.BumpBuffer.createComponent(MetalBumps.java:209)
>at javax.swing.plaf.metal.BumpBuffer.<init>(MetalBumps.java:147)
>at javax.swing.plaf.metal.MetalBumps.createBuffer(MetalBumps.java:61)
>at javax.swing.plaf.metal.MetalBumps.setBumpColors(MetalBumps.java:96)
>at javax.swing.plaf.metal.MetalBumps.<init>(MetalBumps.java:53)
>at
>javax.swing.plaf.metal.MetalScrollBarUI.installDefaults(MetalScrollBarUI.java:80)
>at
>javax.swing.plaf.basic.BasicScrollBarUI.installUI(BasicScrollBarUI.java:98)
>at javax.swing.JComponent.setUI(JComponent.java:322)
>at javax.swing.JScrollBar.updateUI(JScrollBar.java:189)
>at javax.swing.JScrollBar.<init>(JScrollBar.java:140)
>at javax.swing.JScrollBar.<init>(JScrollBar.java:155)
>at javax.swing.JScrollPane$ScrollBar.<init>(JScrollPane.java:635)
>at javax.swing.JScrollPane.createVerticalScrollBar(JScrollPane.java:780)
>at javax.swing.JScrollPane.<init>(JScrollPane.java:242)
>at javax.swing.JScrollPane.<init>(JScrollPane.java:290)
>at Notepad.<init>(Notepad.java:95)
>at Notepad.main(Notepad.java:128)
>Monitor Cache Dump:
>sun.awt.PostEventQueue@28EECB90/29059548: <unowned>
>Waiting to be notified:
>"SunToolkit.PostEventQueue-0" (0x83d9680)
>java.lang.Class@28ED7258/28F350B0: owner "main" (0x8054080) 1 entry
>Waiting to enter:
>"AWT-Motif" (0x8407080)
>java.lang.ref.Reference$Lock@28EBF318/28EF53F8: <unowned>
>Waiting to be notified:
>"Reference Handler" (0x8096480)
>java.awt.EventQueue@28EECC58/290590C8: <unowned>
>Waiting to be notified:
>"AWT-EventQueue-0" (0x83d9480)
>java.lang.ref.ReferenceQueue$Lock@28EBF5B8/28EF5948: <unowned>
>Waiting to be notified:
>"Finalizer" (0x80d9080)
>java.awt.Component$AWTTreeLock@28ECA2E0/28F41470: owner "main"
>(0x8054080) 1 entry
>Registered Monitor Dump:
>utf8 hash table: <unowned>
>JNI pinning lock: <unowned>
>JNI global reference lock: <unowned>
>BinClass lock: <unowned>
>Class linking lock: <unowned>
>System class loader lock: <unowned>
>Code rewrite lock: <unowned>
>Heap lock: <unowned>
>Monitor cache lock: owner "main" (0x8054080) 1 entry
>Dynamic loading lock: <unowned>
>Monitor IO lock: <unowned>
>User signal monitor: <unowned>
>Waiting to be notified:
>"Signal dispatcher" (0x8096280)
>Child death monitor: <unowned>
>I/O monitor: <unowned>
>Alarm monitor: <unowned>
>Waiting to be notified:
><unknown thread> (0x8054280)
>Thread queue lock: owner "main" (0x8054080) 1 entry
>Monitor registry: owner "main" (0x8054080) 1 entry
>
>SIGABRT 6* abort (generated by abort(3) routine)
>
>Full thread dump Classic VM (1.3.1-p7-root-020727-22:30, green threads):
>"AWT-Motif" (TID:0x28eecfa0, sys_thread_t:0x8407080, state:MW) prio=6
>at sun.awt.motif.MToolkit.run(Native Method)
>at java.lang.Thread.run(Thread.java:484)
>"SunToolkit.PostEventQueue-0" (TID:0x28eecb90, sys_thread_t:0x83d9680,
>state:CW) prio=6
>at java.lang.Object.wait(Native Method)
>at java.lang.Object.wait(Object.java:420)
>at sun.awt.PostEventQueue.run(SunToolkit.java:491)
>"AWT-EventQueue-0" (TID:0x28eecbb8, sys_thread_t:0x83d9480, state:CW) prio=6
>at java.lang.Object.wait(Native Method)
>at java.lang.Object.wait(Object.java:420)
>at java.awt.EventQueue.getNextEvent(EventQueue.java:260)
>at
>java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:106)
>at
>java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:98)
>at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93)
>at java.awt.EventDispatchThread.run(EventDispatchThread.java:85)
>"Finalizer" (TID:0x28ebf530, sys_thread_t:0x80d9080, state:CW) prio=8
>at java.lang.Object.wait(Native Method)
>at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:108)
>at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:123)
>at java.lang.ref.Finalizer$FinalizerThread.run(Finalizer.java:162)
>"Reference Handler" (TID:0x28ebf308, sys_thread_t:0x8096480, state:CW)
>prio=10
>at java.lang.Object.wait(Native Method)
>at java.lang.Object.wait(Object.java:420)
>at java.lang.ref.Reference$ReferenceHandler.run(Reference.java:110)
>"Signal dispatcher" (TID:0x28ebf338, sys_thread_t:0x8096280, state:CW)
>prio=5
>"main" (TID:0x28ebf2f0, sys_thread_t:0x8054080, state:R) prio=5
>at sun.awt.motif.MToolkit.loadSystemColors(Native Method)
>at java.awt.SystemColor.updateSystemColors(SystemColor.java:342)
>at java.awt.SystemColor.<clinit>(SystemColor.java:335)
>at sun.awt.motif.MWindowPeer.init(MWindowPeer.java:109)
>at sun.awt.motif.MFramePeer.<init>(MFramePeer.java:53)
>at sun.awt.motif.MToolkit.createFrame(MToolkit.java:138)
>at java.awt.Frame.addNotify(Frame.java:353)
>at javax.swing.plaf.metal.BumpBuffer.createComponent(MetalBumps.java:209)
>at javax.swing.plaf.metal.BumpBuffer.<init>(MetalBumps.java:147)
>at javax.swing.plaf.metal.MetalBumps.createBuffer(MetalBumps.java:61)
>at javax.swing.plaf.metal.MetalBumps.setBumpColors(MetalBumps.java:96)
>at javax.swing.plaf.metal.MetalBumps.<init>(MetalBumps.java:53)
>at
>javax.swing.plaf.metal.MetalScrollBarUI.installDefaults(MetalScrollBarUI.java:80)
>at
>javax.swing.plaf.basic.BasicScrollBarUI.installUI(BasicScrollBarUI.java:98)
>at javax.swing.JComponent.setUI(JComponent.java:322)
>at javax.swing.JScrollBar.updateUI(JScrollBar.java:189)
>at javax.swing.JScrollBar.<init>(JScrollBar.java:140)
>at javax.swing.JScrollBar.<init>(JScrollBar.java:155)
>at javax.swing.JScrollPane$ScrollBar.<init>(JScrollPane.java:635)
>at javax.swing.JScrollPane.createVerticalScrollBar(JScrollPane.java:780)
>at javax.swing.JScrollPane.<init>(JScrollPane.java:242)
>at javax.swing.JScrollPane.<init>(JScrollPane.java:290)
>at Notepad.<init>(Notepad.java:95)
>at Notepad.main(Notepad.java:128)
>Monitor Cache Dump:
>sun.awt.PostEventQueue@28EECB90/29059548: <unowned>
>Waiting to be notified:
>"SunToolkit.PostEventQueue-0" (0x83d9680)
>java.lang.Class@28ED7258/28F350B0: owner "main" (0x8054080) 1 entry
>Waiting to enter:
>"AWT-Motif" (0x8407080)
>java.lang.ref.Reference$Lock@28EBF318/28EF53F8: <unowned>
>Waiting to be notified:
>"Reference Handler" (0x8096480)
>java.awt.EventQueue@28EECC58/290590C8: <unowned>
>Waiting to be notified:
>"AWT-EventQueue-0" (0x83d9480)
>java.lang.ref.ReferenceQueue$Lock@28EBF5B8/28EF5948: <unowned>
>Waiting to be notified:
>"Finalizer" (0x80d9080)
>java.awt.Component$AWTTreeLock@28ECA2E0/28F41470: owner "main"
>(0x8054080) 1 entry
>Registered Monitor Dump:
>utf8 hash table: <unowned>
>JNI pinning lock: <unowned>
>JNI global reference lock: <unowned>
>BinClass lock: <unowned>
>Class linking lock: <unowned>
>System class loader lock: <unowned>
>Code rewrite lock: <unowned>
>Heap lock: <unowned>
>Monitor cache lock: owner "main" (0x8054080) 1 entry
>Dynamic loading lock: <unowned>
>Monitor IO lock: <unowned>
>User signal monitor: <unowned>
>Waiting to be notified:
>"Signal dispatcher" (0x8096280)
>Child death monitor: <unowned>
>I/O monitor: <unowned>
>Alarm monitor: <unowned>
>Waiting to be notified:
><unknown thread> (0x8054280)
>Thread queue lock: owner "main" (0x8054080) 1 entry
>Monitor registry: owner "main" (0x8054080) 1 entry
>
>Abort (core dumped)
>
>%gdb -core java_g.core /usr/local/jdk1.3.1/bin/i386/green_threads/java_g
>GNU gdb 5.2.0 (FreeBSD) 20020627
>Copyright 2002 Free Software Foundation, Inc.
>GDB is free software, covered by the GNU General Public License, and you are
>welcome to change it and/or distribute copies of it under certain
>conditions.
>Type "show copying" to see the conditions.
>There is absolutely no warranty for GDB. Type "show warranty" for details.
>This GDB was configured as "i386-undermydesk-freebsd"...
>Core was generated by `java_g'.
>Program terminated with signal 6, Aborted.
>Reading symbols from
>/usr/local/jdk1.3.1/jre/lib/i386/green_threads/libhpi_g.so...done.
>Loaded symbols for
>/usr/local/jdk1.3.1/jre/lib/i386/green_threads/libhpi_g.so
>Reading symbols from /usr/lib/libc.so.5...done.
>Loaded symbols for /usr/lib/libc.so.5
>Reading symbols from /usr/lib/libm.so.2...done.
>Loaded symbols for /usr/lib/libm.so.2
>Reading symbols from
>/usr/local/jdk1.3.1/jre/lib/i386/classic/libjvm_g.so...done.
>Loaded symbols for /usr/local/jdk1.3.1/jre/lib/i386/classic/libjvm_g.so
>Reading symbols from /usr/local/jdk1.3.1/jre/lib/i386/libverify_g.so...done.
>Loaded symbols for /usr/local/jdk1.3.1/jre/lib/i386/libverify_g.so
>Reading symbols from /usr/local/jdk1.3.1/jre/lib/i386/libjava_g.so...done.
>Loaded symbols for /usr/local/jdk1.3.1/jre/lib/i386/libjava_g.so
>Reading symbols from /usr/local/jdk1.3.1/jre/lib/i386/libzip_g.so...done.
>Loaded symbols for /usr/local/jdk1.3.1/jre/lib/i386/libzip_g.so
>Reading symbols from /usr/local/jdk1.3.1/jre/lib/i386/libawt_g.so...done.
>Loaded symbols for /usr/local/jdk1.3.1/jre/lib/i386/libawt_g.so
>Reading symbols from
>/usr/local/jdk1.3.1/jre/lib/i386/libmlib_image_g.so...done.
>Loaded symbols for /usr/local/jdk1.3.1/jre/lib/i386/libmlib_image_g.so
>Reading symbols from /usr/X11R6/lib/libXm.so.2...done.
>Loaded symbols for /usr/X11R6/lib/libXm.so.2
>Reading symbols from /usr/X11R6/lib/libXp.so.6...done.
>Loaded symbols for /usr/X11R6/lib/libXp.so.6
>Reading symbols from /usr/X11R6/lib/libXt.so.6...done.
>Loaded symbols for /usr/X11R6/lib/libXt.so.6
>Reading symbols from /usr/X11R6/lib/libXext.so.6...done.
>Loaded symbols for /usr/X11R6/lib/libXext.so.6
>Reading symbols from /usr/X11R6/lib/libSM.so.6...done.
>Loaded symbols for /usr/X11R6/lib/libSM.so.6
>Reading symbols from /usr/X11R6/lib/libICE.so.6...done.
>Loaded symbols for /usr/X11R6/lib/libICE.so.6
>Reading symbols from /usr/X11R6/lib/libXtst.so.6...done.
>Loaded symbols for /usr/X11R6/lib/libXtst.so.6
>Reading symbols from /usr/X11R6/lib/libX11.so.6...done.
>Loaded symbols for /usr/X11R6/lib/libX11.so.6
>Reading symbols from /usr/X11R6/lib/libXThrStub.so.6...done.
>Loaded symbols for /usr/X11R6/lib/libXThrStub.so.6
>Reading symbols from
>/usr/local/jdk1.3.1/jre/lib/i386/libfontmanager_g.so...done.
>Loaded symbols for /usr/local/jdk1.3.1/jre/lib/i386/libfontmanager_g.so
>Reading symbols from /usr/lib/libstdc++.so.4...done.
>Loaded symbols for /usr/lib/libstdc++.so.4
>Reading symbols from /usr/X11R6/lib/X11/locale/common/xlocale.so.2...done.
>Loaded symbols for /usr/X11R6/lib/X11/locale/common/xlocale.so.2
>Reading symbols from /usr/X11R6/lib/X11/locale/common/xlibi18n.so.2...done.
>Loaded symbols for /usr/X11R6/lib/X11/locale/common/xlibi18n.so.2
>Reading symbols from
>/usr/X11R6/lib/X11/locale/common/xomGeneric.so.2...done.
>Loaded symbols for /usr/X11R6/lib/X11/locale/common/xomGeneric.so.2
>Reading symbols from /usr/X11R6/lib/X11/locale/common/ximcp.so.2...done.
>Loaded symbols for /usr/X11R6/lib/X11/locale/common/ximcp.so.2
>Reading symbols from /usr/libexec/ld-elf.so.1...done.
>Loaded symbols for /usr/libexec/ld-elf.so.1
>#0 0x280bd4d7 in kill () from /usr/lib/libc.so.5
>(gdb) bt
>#0 0x280bd4d7 in kill () from /usr/lib/libc.so.5
>#1 0x2810eec2 in abort () from /usr/lib/libc.so.5
>#2 0x28190bee in Abort () at
>../../../src/share/javavm/runtime/interpreter.c:1449
>#3 0x281d4702 in panicHandler (sig=10, siginfo=0xbfbfdf24,
>uc=0xbfbfdde0) at ../../../src/solaris/javavm/runtime/signals_md.c:454
>#4 0x2807ca99 in userSignalHandler (sig=10, info=0xbfbfdf24,
>uc=0xbfbfdde0, arg=0x281d4674) at
>../../../../src/solaris/hpi/src/interrupt.c:125
>#5 0x2807ca44 in intrDispatch (interrupt=10, siginfo=0xbfbfdf24,
>context=0xbfbfdde0) at ../../../../src/solaris/hpi/src/interrupt.c:111
>#6 0x28072ebe in intrDispatchMD (sig=10, info=0xbfbfdf24, uc=0xbfbfdde0)
>at ../../../../src/solaris/hpi/green_threads/src/interrupt_md.c:138
>#7 <signal handler called>
>#8 0x2d75a4c2 in XtWidgetToApplicationContext () from
>/usr/X11R6/lib/libXt.so.6
>#9 0x2d759044 in XtDestroyWidget () from /usr/X11R6/lib/libXt.so.6
>#10 0x2d6a7c10 in _XmImFreeShellData () from /usr/X11R6/lib/libXm.so.2
>#11 0x2d6b033b in Destroy () from /usr/X11R6/lib/libXm.so.2
>#12 0x2d758bf5 in Phase2Destroy () from /usr/X11R6/lib/libXt.so.6
>#13 0x2d758a0d in Recursive () from /usr/X11R6/lib/libXt.so.6
>#14 0x2d758f21 in XtPhase2Destroy () from /usr/X11R6/lib/libXt.so.6
>#15 0x2d75900c in _XtDoPhase2Destroy () from /usr/X11R6/lib/libXt.so.6
>#16 0x2d759159 in XtDestroyWidget () from /usr/X11R6/lib/libXt.so.6
>#17 0x2d40cc79 in Java_sun_awt_motif_MToolkit_loadSystemColors
>(env=0x8054004, this=0xbfbfe2f0, systemColors=0x80595f4)
>at ../../../src/solaris/native/sun/awt/awt_MToolkit.c:1947
>#18 0x2819158b in invoke_O_V (o=0x28eecaa0, mb=0x83e8cc0, args_size=2,
>ee=0x8054004) at
>../../../build/bsd-i386/tmp/java/java.lang/jvm/obj_g/invokers.c:292
>#19 0x281825f6 in invokeLazyNativeMethod (o=0x28eecaa0, mb=0x83e8cc0,
>args_size=2, ee=0x8054004) at
>../../../src/share/javavm/runtime/classruntime.c:680
>#20 0x2819c8a9 in ExecuteJava_C (initial_pc=0xbfbfe914 "\x{00D9}",
>ee=0x8054004) at ../../../src/share/javavm/runtime/executeJava.c:1579
>#21 0x2818f093 in do_execute_java_method_vararg (ee=0x8054004,
>obj=0x28eedb88, method_name=0x804d6c8 "<clinit>",
>method_signature=0x8055258 "()V", mb=0x843fa8c,
>isStaticCall=TRUE, args=0xbfbfe9a8
>"\x{00C8}¨¦\x{00BF}\x{00BF}\236-\030(\200@\005\b", otherBits=0x0,
>shortFloats=FALSE) at ../../../src/share/javavm/runtime/interpreter.c:573
>#22 0x2818ec69 in do_execute_java_method (ee=0x8054004, obj=0x28eedb88,
>method_name=0x0, signature=0x0, mb=0x843fa8c, isStaticCall=TRUE)
>at ../../../src/share/javavm/runtime/interpreter.c:427
>#23 0x28183046 in RunStaticInitializers (cb=0x28eedb88) at
>../../../src/share/javavm/runtime/classruntime.c:1001
>#24 0x28183230 in InitClass (cb=0x28eedb88) at
>../../../src/share/javavm/runtime/classruntime.c:1076
>#25 0x28190a97 in ResolveClassConstantFromPC (pc=0x841a663 "\x{00B2}",
>opcode=178 '\x{00B2}', constant_pool=0x8419000, ee=0x8054004, mask=512)
>at ../../../src/share/javavm/runtime/interpreter.c:1380
>#26 0x2819a041 in ExecuteJava_C (initial_pc=0xbfbff010 "\x{00D9}",
>ee=0x8054004) at ../../../src/share/javavm/runtime/executeJava.c:1027
>#27 0x281a0e2c in jni_Invoke (env=0x8054004, self=0x8059074,
>methodID=0x81cee0c, pushArguments=0x281a07d0 <jni_PushArgumentsVararg>,
>args=0xbfbff0ac, info=778)
>at ../../../src/share/javavm/runtime/jni.c:774
>#28 0x281a3c61 in jni_CallStaticVoidMethodV (env=0x8054004,
>clazz=0x8059074, methodID=0x81cee0c, args=0xbfbff0ec "|\220\005\bT")
>at ../../../src/share/javavm/runtime/jni.c:1947
>#29 0x281ae05e in checked_jni_CallStaticVoidMethod (env=0x8054004,
>cls=0x8059074, methodID=0x81cee0c) at
>../../../src/share/javavm/runtime/check_jni.c:741
>#30 0x0804933a in main (argc=0, argv=0xbfbff9c4) at
>../../../../src/share/bin/java.c:323
>#31 0x08048bb5 in _start ()
>(gdb) quit
>
>  
>
nobody hit this problem ;(

I just comment XtDestroyWidget in
src/solaris/native/sun/awt/awt_MToolkit.c:1947
and I can input chinese in java program! Everything is ok. Can anyone
explain it ?

I know it will cause memory leak. Java progam usualy do not offen
loadSystemColors.
so It is not big problem.

--hwh







To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-java" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?3D46C625.5080500>