Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-4954944

Java VM crash after frame.dispose()

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Cannot Reproduce
    • Icon: P4 P4
    • None
    • 1.3.1_07, 1.3.1_09, 1.3.1_15
    • client-libs
    • generic, sparc
    • solaris_8

      Customer detects sporadic crashes with both 1.3.1_07 and 1.3.1_09:

      As it is a production box, we currently only have full data from 1.3.1_07:

      An unexpected exception has been detected in native code outside the VM.
      Unexpected Signal : 10 occurred at PC=0xadc4223c
      Function name=_XimpLocalOpenIM
      Library=/usr/openwin/lib/locale/common/ximlocal.so.2

      Current Java thread:
              at sun.awt.motif.MWindowPeer.pDispose(Native Method)
              at sun.awt.motif.MComponentPeer.disposeImpl(MComponentPeer.java:409)
              at sun.awt.motif.MWindowPeer.disposeImpl(MWindowPeer.java:116)
              at sun.awt.motif.MFramePeer.disposeImpl(MFramePeer.java:61)
              at sun.awt.motif.MComponentPeer.dispose(MComponentPeer.java:423)
              at java.awt.Component.removeNotify(Component.java:4099)
              at java.awt.Container.removeNotify(Container.java:1598)
              at java.awt.Frame.removeNotify(Frame.java:576)
              at java.awt.Window$1$DisposeAction.run(Window.java:476)
              at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:142)
              at java.awt.EventQueue.dispatchEvent(EventQueue.java:332)
              at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:126)
              at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:93)
              at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:88)
              at java.awt.EventDispatchThread.run(EventDispatchThread.java:80)

      Dynamic libraries:
      0x10000 /opt/j2sdk1_3_1_07/usr/bin/../java/bin/../bin/sparc/native_threads/java
      0xff370000 /usr/lib/lwp/libthread.so.1
      0xff3a0000 /usr/lib/libdl.so.1
      0xff280000 /usr/lib/libc.so.1
      0xff350000 /usr/platform/SUNW,Sun-Fire-280R/lib/libc_psr.so.1
      0xfee80000 /opt/j2sdk1_3_1_07/usr/j2se/jre/lib/sparc/hotspot/libjvm.so
      0xff220000 /usr/lib/libCrun.so.1
      0xfee60000 /usr/lib/libsocket.so.1
      0xfed80000 /usr/lib/libnsl.so.1
      0xfed50000 /usr/lib/libm.so.1
      0xff250000 /usr/lib/libw.so.1
      0xfed30000 /usr/lib/libmp.so.2
      0xfed00000 /opt/j2sdk1_3_1_07/usr/j2se/jre/lib/sparc/native_threads/libhpi.so
      0xfecd0000 /opt/j2sdk1_3_1_07/usr/j2se/jre/lib/sparc/libverify.so
      0xfec90000 /opt/j2sdk1_3_1_07/usr/j2se/jre/lib/sparc/libjava.so
      0xfec50000 /opt/j2sdk1_3_1_07/usr/j2se/jre/lib/sparc/libzip.so
      0xfeb10000 /usr/lib/locale/en_US.ISO8859-1/en_US.ISO8859-1.so.2
      0xb2e10000 /opt/j2sdk1_3_1_07/usr/j2se/jre/lib/sparc/libnet.so
      0xaf7b0000 /usr/lib/nss_files.so.1
      0xaf790000 /opt/weblogic6.1/wlserver6.1/lib/solaris/libmuxer.so
      0xaf4e0000 /usr/ucblib/libucb.so.1
      0xaf490000 /usr/lib/libresolv.so.2
      0xaebc0000 /usr/lib/libelf.so.1
      0xae960000 /opt/j2sdk1_3_1_07/usr/j2se/jre/lib/sparc/libawt.so
      0xa9680000 /opt/j2sdk1_3_1_07/usr/j2se/jre/lib/sparc/motif21/libmawt.so
      0xae330000 /opt/j2sdk1_3_1_07/usr/bin/../java/bin/../jre/lib/sparc/libmlib_image.so
      0xa9400000 /usr/dt/lib/libXm.so.4
      0xae210000 /usr/openwin/lib/libXt.so.4
      0xae750000 /usr/openwin/lib/libXext.so.0
      0xae560000 /usr/openwin/lib/libXtst.so.1
      0xa9300000 /usr/openwin/lib/libX11.so.4
      0xae310000 /usr/openwin/lib/libSM.so.6
      0xae150000 /usr/openwin/lib/libICE.so.6
      0xa9200000 /opt/j2sdk1_3_1_07/usr/j2se/jre/lib/sparc/libfontmanager.so
      0xadd20000 /usr/openwin/lib/libdps.so.5
      0xae540000 /usr/openwin/lib/locale/common/xlibi18n.so.2
      0xadc30000 /usr/openwin/lib/locale/common/ximlocal.so.2
      0xae130000 /opt/j2sdk1_3_1_07/usr/bin/../java/bin/../jre/lib/sparc/libsunwjdga.so
      0xadb50000 /usr/openwin/lib/libdga.so.1
      0xadf60000 /opt/j2sdk1_3_1_07/usr/bin/../java/bin/../jre/lib/sparc/libxinerama.so
      0xadb10000 /opt/j2sdk1_3_1_07/usr/j2se/jre/lib/sparc/libjpeg.so

      Local Time = Fri Nov 14 08:43:05 2003
      Elapsed Time = 23327
      #
      # The exception above was detected in native code outside the VM
      #
      # Java VM: Java HotSpot(TM) Client VM (1.3.1_07-b02 mixed mode)
      #

      cat pstack_core.out
      core '200311140844.core' of 22118: /opt/j2sdk1_3_1_07/usr/bin/../java/bin/../bin/sparc/native_threads/jav
      ----------------- lwp# 73 / thread# 73 --------------------
       ff31f020 _lwp_kill (6, 0, 0, ffffffff, ff3403bc, 0) + 8
       ff2b595c abort (ff33c000, a917e0b0, 0, 4, 0, a917e0d1) + 100
       ff105ddc __1cCosFabort6Fl_v_ (1, ff1bc000, 1, a917e130, 0, adc4223c) + b8
       ff104ff0 __1cCosbBhandle_unexpected_exception6FpnGThread_ipCpv_v_ (ff3402ac, ff1f8ffc, ff1ced68, ff182abc, ff1bc000, a917e150) + 254
       ff1084e0 JVM_handle_solaris_signal (0, f44f80, a917ec00, ff1bc000, a, a917eeb8) + 894
       ff385c18 __sighndlr (a, a917eeb8, a917ec00, ff106d24, 0, 0) + c
       ff37f8b0 call_user_handler (b3114a00, 49, ff399680, a917ec00, a917eeb8, a) + 254
       ff37fa7c sigacthandler (b3114a00, a917eeb8, a917ec00, ff398000, a917eeb8, a) + 64
       --- called from signal handler with signal -1290712576 (SIG Unknown) ---
       adc4223c SWITCH_CloseIM (bf37d0, 0, bf37d0, 0, 6ec750, 7ff) + 174
       adc3e2a4 _Ximp_Local_CloseIM (bf37d0, eaed7c, fffffffd, a917f054, a939a000, 6ec750) + c
       a935e3c4 XCloseIM (bf37d0, f456d8, bf37d0, a95f0000, d50808, 6ec750) + 14
       a95656d8 XmImCloseXIM (6ec750, 0, a9601f14, a95f0000, d50808, 6ec750) + 180
       a956926c Destroy (9626b0, a95f0000, 6ec750, 3b, ec, 3c) + 240
       ae242cd8 Phase2Destroy (a956902c, 6ec750, ae275c94, ae275c90, a9601ea4, ae272000) + 16c
       ae242a38 XtPhase2Destroy (6ec750, ae272000, 0, 0, 0, 0) + 344
       ae2426b4 _XtDoPhase2Destroy (0, 0, 0, ebde00, ae242548, 54b130) + b8
       ae242448 XtDestroyWidget (ebde00, ae272000, ebde00, 6ec750, 6ec750, 0) + 1c8
       a96ad3fc Java_sun_awt_motif_MWindowPeer_pDispose (962b78, a9799928, a9799948, a9781a78, a917f414, f4500c) + 10c
       000e1af0 ???????? (b9f7c2a8, a917f490, a917f494, ea328, ff1bc000, 0)
       000dec54 ???????? (b9f7c2a8, a917f510, a917f514, ea130, ff1bc000, 0)
       000dec54 ???????? (b9f7c2a8, a917f590, a917f594, ea284, ff1bc000, 0)
       000dec54 ???????? (b9f7c2a8, a917f598, a917f598, ea284, b9f7c2a8, 0)
       000dec54 ???????? (b9f7c2a8, e0ca0, a917fc48, ea130, ff1bc000, 0)
       000deefc ???????? (b9f7bfd0, 1, 1, ea3bc, ff1bc000, 0)
       000dec54 ???????? (b9f7bfd0, f44f80, a917fc48, ea284, b9f7c1c8, 0)
       000dec54 ???????? (b9f7bfd0, a917f820, a917f820, ea284, b9f7c1c8, 0)
       000dec54 ???????? (ba1639e0, e0ca0, a917f944, ea130, ff1bc000, 0)
       000deefc ???????? (ba163e08, e0ca0, a917f9c8, ea3bc, a917f9dc, 0)
       000deefc ???????? (c3bc3d68, a917fa54, a917fa58, ea3bc, b6, 0)
       000dec54 ???????? (c3b9a658, e0ca0, f44f80, ea130, b6, f487c7e0)
       000dec98 ???????? (ba9095f0, a917fc48, f44f80, ea130, b6, f487c7c0)
       000dec54 ???????? (ba9095f0, a917fc48, f44f80, e7f2c, b6, f487c7b0)
       000dec54 ???????? (0, 1, ff1c9698, e8004, 1e, e)
       ff1f2bb4 __1cMStubRoutinesG_code1_ (a917fc68, a917fea0, a, f487c080, e0ca0, a917fdec) + 3f4
       fef832c0 __1cJJavaCallsLcall_helper6FpnJJavaValue_pnMmethodHandle_pnRJavaCallArguments_pnGThread__v_ (a917fe98, ff1bc000, a917fde4, f44f80, e0ca0, a917fea0) + 308
       fef91a8c __1cJJavaCallsMcall_virtual6FpnJJavaValue_nLKlassHandle_nMsymbolHandle_4pnRJavaCallArguments_pnGThread__v_ (f487c518, a917fdd0, a917fdd4, ff1bc000, a917fe98, a917fde4) + 150
       fef9191c __1cJJavaCallsMcall_virtual6FpnJJavaValue_nGHandle_nLKlassHandle_nMsymbolHandle_5pnGThread__v_ (a917fe98, a917fe94, a917fe90, a917fe84, a917fe7c, f44f80) + 60
       fef918a4 __1cMthread_entry6FpnKJavaThread_pnGThread__v_ (f34173e0, f44f80, ff1bc000, a917ffa0, 1e, e) + 120
       fef916b0 __1cKJavaThreadDrun6M_v_ (a9100000, ff1c6c08, ff1bc000, 80000, f44f80, 80000) + 3d8
       fef819a0 _start (ff1bc000, b3114a00, 0, 0, 0, 0) + 20
       ff3858c0 _lwp_start (0, 0, 0, 0, 0, 0)


      Customer's source snippet:

      component = new java.awt.Frame();
       ..........
       ..........
      component.setVisible(false);
      component.removeNotify();
      g.dispose();
      return image;


      Full data can be found here:
      # ls -la /net/cores.east/cores/dir6/63818287/nov15-2
      total 2460560
      drwxrwxrwx 3 mendoza staff 512 Nov 16 09:23 ./
      drwxrwxrwt 7 smantha sun 1024 Nov 15 23:41 ../
      -rwxrwxrwx 1 mendoza staff 1242227656 Nov 15 23:49 200311140844.core*
      -rw-r--r-- 1 jl74092 staff 123 Nov 16 09:29 .dbxrc
      -rwxrwxrwx 1 mendoza staff 3547 Nov 15 23:42 hs_err_pid22118.log*
      drwxr-xr-x 4 jl74092 staff 512 Nov 15 16:49 libs/
      -rwxr-xr-x 1 jl74092 staff 16504320 Nov 16 09:12 libs.tar*
      -rwxrwxrwx 1 mendoza staff 125771 Nov 15 23:49 pstack_core.out*
      -rwxrwxrwx 1 mendoza staff 275431 Nov 15 23:54 weblogic.20031114_021418.log.gz*

      and here
      ls -la /net/cores.central/cores/63818287/*.java

      ls -la *.java
      -rw-r--r-- 1 nobody staff 5988 Nov 13 04:21 AuditingPieChart.java
      -rwxrwxrwx 1 vk119745 staff 7523 Nov 13 05:09 AuditingStatBarChart.java*
      -rw-r--r-- 1 nobody staff 6091 Nov 13 04:21 GenericGraphServlet.java
      -rw-r--r-- 1 nobody staff 19338 Nov 13 04:21 GraphServlet.java
      -rwxrwxrwx 1 vk119745 staff 7465 Nov 13 05:10 TrackingStatBarChart.java*


      What the customer is seeing is most likely a race condition. The frame.dispose() method causes the underlying Motif widget to be destroyed. Later on when the GC tries to collect the Java object, the underlying native Motif widget is already gone which causes this bad reference. The reason why you do not see the problem always is within the Solaris OS. Even if the Motif widget is marked as disposable by Frame.dispose(), it is still there in memory for some time.

            dav Andrei Dmitriev (Inactive)
            jloefflm Johann Löfflmann (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: