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

Incorrect JNI field id used to access DataFlavor.atom in Solaris DnD code

XMLWordPrintable

    • 1.2.2
    • generic, sparc
    • generic, solaris_2.5.1, solaris_2.6

      Run the regression test test/java/awt/Clipboard/ClipRWTest using java_g.
      e.g. java_g ClipRWTest

      The following error will appear:

      FATAL ERROR in native method: Wrong field ID passed to JNI
              at sun.awt.motif.X11Selection.registerTargetForFlavor(Native Method)
              at sun.awt.motif.X11Selection.<clinit>(X11Selection.java:49)
              at sun.awt.motif.X11Clipboard.<init>(Compiled Code)
              at sun.awt.motif.MToolkit.getSystemClipboard(Compiled Code)
              at ClipFrame.<init>(Compiled Code)
              at ClipRWTest.runTest(Compiled Code)
              at ClipRWTest.main(Compiled Code)
      SIGABRT 6* abort (generated by abort(3) routine)
          si_signo [6]: SIGABRT 6* abort (generated by abort(3) routine)

      *** panic: "../../../../../src/solaris/hpi/green_threads/src/mutex_md.c", line 244: assertion failure


      *** panic: "../../../../../src/solaris/hpi/green_threads/src/mutex_md.c", line 244: assertion failure


      *** panic: "../../../../../src/solaris/hpi/green_threads/src/mutex_md.c", line 252: assertion failure


      *** panic: "../../../../../src/solaris/hpi/green_threads/src/mutex_md.c", line 252: assertion failure

          si_errno [0]: Error 0
          si_code [0]: SI_USER [pid: 18514, uid: 74587]
              stackpointer=efffd398

      *** panic: "../../../../../src/solaris/hpi/green_threads/src/mutex_md.c", line 244: assertion failure


      *** panic: "../../../../../src/solaris/hpi/green_threads/src/mutex_md.c", line 252: assertion failure


      *** panic: "../../../../../src/solaris/hpi/green_threads/src/mutex_md.c", line 244: assertion failure


      *** panic: "../../../../../src/solaris/hpi/green_threads/src/mutex_md.c", line 252: assertion failure


      Full thread dump Classic VM (robi:10.08.98-20:35, green threads):
          "AWT-Motif" (TID:0xebc82c18, sys_thread_t:0x235c28, state:CW) prio=5
              at sun.awt.motif.MToolkit.run(Native Method)
              at java.lang.Thread.run(Compiled Code)
          "SunToolkit.PostEventQueue-0" (TID:0xebc82920, sys_thread_t:0x216d30, state:CW) prio=5
              at java.lang.Object.wait(Native Method)
              at java.lang.Object.wait(Compiled Code)
              at sun.awt.PostEventQueue.run(Compiled Code)
          "AWT-EventQueue-0" (TID:0xebc82950, sys_thread_t:0x216bf8, state:CW) prio=6
              at java.lang.Object.wait(Native Method)
              at java.lang.Object.wait(Compiled Code)
              at java.awt.EventQueue.getNextEvent(Compiled Code)
              at java.awt.EventDispatchThread.run(Compiled Code)
          "Finalizer" (TID:0xebc98328, sys_thread_t:0x5f728, state:CW) prio=8
              at java.lang.Object.wait(Native Method)
              at java.lang.ref.ReferenceQueue.remove(Compiled Code)
              at java.lang.ref.ReferenceQueue.remove(Compiled Code)
              at java.lang.ref.Finalizer$FinalizerThread.run(Finalizer.java:174)
          "Reference Handler" (TID:0xebc983b8, sys_thread_t:0x5cff8, state:CW) prio=10
              at java.lang.Object.wait(Native Method)
              at java.lang.Object.wait(Compiled Code)
              at java.lang.ref.Reference$ReferenceHandler.run(Reference.java:114)
          "Signal dispatcher" (TID:0xebc983e8, sys_thread_t:0x541c8, state:CW) prio=5
          "main" (TID:0xebc981e8, sys_thread_t:0x26590, state:R) prio=5
              at sun.awt.motif.X11Selection.registerTargetForFlavor(Native Method)
              at sun.awt.motif.X11Selection.<clinit>(X11Selection.java:49)
              at sun.awt.motif.X11Clipboard.<init>(Compiled Code)
              at sun.awt.motif.MToolkit.getSystemClipboard(Compiled Code)
              at ClipFrame.<init>(Compiled Code)
              at ClipRWTest.runTest(Compiled Code)
              at ClipRWTest.main(Compiled Code)
      Monitor Cache Dump:
          sun.awt.PostEventQueue@EBC82920/EBF5AD80: <unowned>
              Waiting to be notified:
                  "SunToolkit.PostEventQueue-0" (0x216d30)
          java.awt.EventQueue@EBC826D8/EBF5AA98: <unowned>
              Waiting to be notified:
                  "AWT-EventQueue-0" (0x216bf8)
          java.lang.ref.ReferenceQueue$Lock@EBC98340/EBCCE4C0: <unowned>
              Waiting to be notified:
                  "Finalizer" (0x5f728)
          java.lang.Class@EBCB9BC0/EBECFDD8: owner "main" (0x26590) 1 entry
          java.lang.ref.Reference$Lock@EBC983C8/EBCCDF58: <unowned>
              Waiting to be notified:
                  "Reference Handler" (0x5cff8)
      Registered Monitor Dump:
          PCMap lock: <unowned>
          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" (0x26590) 1 entry
          Dynamic loading lock: <unowned>
          Monitor IO lock: <unowned>
          User signal monitor: <unowned>
              Waiting to be notified:
                  "Signal dispatcher" (0x541c8)
          Child death monitor: <unowned>
          I/O monitor: <unowned>
              Waiting to be notified:
                  "AWT-Motif" (0x235c28)
          Alarm monitor: <unowned>
              Waiting to be notified:
                  <unknown thread> (0x2b880)
          Thread queue lock: owner "main" (0x26590) 1 entry
          Monitor registry: owner "main" (0x26590) 1 entry


      *** panic: "../../../../../src/solaris/hpi/green_threads/src/mutex_md.c", line 244: assertion failure


      *** panic: "../../../../../src/solaris/hpi/green_threads/src/mutex_md.c", line 252: assertion failure

      Abort


      Examination of awt_Selection.c shows that the JNI code in registerTargetForFlavor is using the JNI field id for X11Selection.atom to attempt to access DataFlavor.atom. This occurs several places in the code.

      I'm not sure what the implications are in the production build.

      robi.khan@eng 1998-10-08

            jmelvin James Melvin (Inactive)
            rkhansunw Robi Khan (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: