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

segmentation violation when using rsh

    XMLWordPrintable

Details

    • generic
    • solaris_2.6

    Description


      tushar.patel@West 1998-09-04
      The test case crashes on start up with a
      segmentation violation when I run it on a Sun remotely using rsh, from an IRIX
      computer, but works fine when run on the Sun machine directly. Our LAI
      application also crashes using rsh from an IRIX computer.

      The testcase is enclosed below.

      I found a 'may be' related bug (bug 4112070: Regression in 1.1.6, user cannot display frames/windows on remote X server). Just FYI.

      I always get a segmentation violation from Solaris. Here is the terminal
      output:

      /usr/people/amodla/test: run
      Native threads
      SIGSEGV 11* segmentation violation
          si_signo [11]: SIGSEGV 11* segmentation violation
          si_errno [0]: Error 0
          si_code [1]: SEGV_MAPERR [addr: 0xed3df2dc]

              stackbase=EFFFF678, stackpointer=EFFFC7BC

      Full thread dump:
          "AWT-Motif" (TID:0xed4055e0, sys_thread_t:0xf6a48, state:R, thread_t: t@7,
      sp:0x0 threadID:0xee7c3de0, stack_base:0xee7c3d74, stack_size:0x22000) prio=5
              java.lang.Thread.run(Compiled Code)
          "AWT-EventQueue-0" (TID:0xed4055f0, sys_thread_t:0xe0598, state:CW,
      thread_t: t@6, sp:0x0 threadID:0xee7f3de0, stack_base:0xee7f3d74,
      stack_size:0x22000) prio=5
              java.lang.Object.wait(Compiled Code)
              java.awt.EventQueue.getNextEvent(Compiled Code)
              java.awt.EventDispatchThread.run(Compiled Code)
          "SIGQUIT handler" (TID:0xed400298, sys_thread_t:0x3b028, state:R, thread_t:
      t@5, sp:0x0 threadID:0xef343de0, stack_base:0xef343d74, stack_size:0x22000)
      prio=0
          "Finalizer thread" (TID:0xed400088, sys_thread_t:0x3af98, state:CW,
      thread_t: t@4, sp:0x0 threadID:0xef373de0, stack_base:0xef373d74,
      stack_size:0x22000) prio=1
          "main" (TID:0xed4000b0, sys_thread_t:0x43348, state:R, thread_t: t@1,
      sp:0x0 threadID:0x23788, stack_base:0xeffff678, stack_size:0x800000) prio=5
      *current thread*
              sun.awt.motif.MMenuBarPeer.<init>(Compiled Code)
              sun.awt.motif.MToolkit.createMenuBar(Compiled Code)
              java.awt.MenuBar.addNotify(Compiled Code)
              java.awt.Frame.addNotify(Compiled Code)
              java.awt.Window.pack(Compiled Code)
              ModalDialogTest.<init>(Compiled Code)
              ModalDialogTest.main(Compiled Code)
      Monitor Cache Dump:
          java.lang.Object@ED403F98/ED74F668: owner "main" (0x43348, 2 entries)
          sun.awt.motif.MToolkit@ED4056A0/ED7556F8: owner "main" (0x43348, 1 entry)
          java.awt.EventQueue@ED405640/ED755868: <unowned>
              Waiting to be notified:
                  "AWT-EventQueue-0" (0xe0598)
      Registered Monitor Dump:
          PCMap lock: <unowned>
          Thread queue lock: <unowned>
          Name and type hash table lock: <unowned>
          String intern lock: <unowned>
          JNI pinning lock: <unowned>
          JNI global reference lock: <unowned>
          BinClass lock: <unowned>
          Class loading lock: <unowned>
          Java stack lock: <unowned>
          Code rewrite lock: <unowned>
          Heap lock: <unowned>
          Has finalization queue lock: <unowned>
          Finalize me queue lock: <unowned>
              Waiting to be notified:
                  "Finalizer thread" (0x3af98)
          Monitor registry: owner "main" (0x43348, 1 entry)



      The ModalDialogTest program crashes when executed
      remotely using rsh,
      under jre 1.1.6-03 solaris 2.6

      ===
      The ModalDialogTest program :

      Here is the test program with tear-off menus added:


      /*
       * ModalDialogTest.java
       * Dialog created with modality parameter set to true is not modal on
       * Solaris
       *
       */

      import java.awt.*;
      import java.awt.event.*;

      public class ModalDialogTest extends Panel implements ActionListener {
          Dialog dialog = new Dialog(new Frame(), "Modal Dialog", true);

          public static void main( String[] argv ) {
              new ModalDialogTest();
          }

          public ModalDialogTest() {
          Frame frame = new Frame("Modal Dialog Test");
          Panel controlPanel = new Panel();
          Panel infoPanel = new Panel();
          Button showButton = new Button("Show Modal Dialog");
          Button testButton = new Button("Test");

          frame.setLayout(new BorderLayout());
          infoPanel.setLayout(new GridLayout(0,1));
      // showButton.setOpaque(true);
          showButton.setBackground(Color.yellow);
      // testButton.setOpaque(true);
          testButton.setBackground(Color.pink);
          controlPanel.add(showButton);
          controlPanel.add(testButton);
          infoPanel.add(new Label("Click the \"Show Modal Dialog\" button to display
      a modal Dialog."));
          infoPanel.add(new Label("Click the \"Test\" button to verify dialog
      modality."));
          frame.add(BorderLayout.NORTH, controlPanel);
          frame.add(BorderLayout.SOUTH, infoPanel);

          // tear-off menu
          MenuBar mbar = new MenuBar();
          Menu toff = new Menu("Tearoff", true);
          Menu toff2 = new Menu("Tearoff2", true);
          MenuItem mi1 = new MenuItem("first");
          mi1.addActionListener(new AL());
          toff.add(mi1);
          MenuItem mi2 = new MenuItem("second");
          mi2.addActionListener(new AL());
          toff.add(mi2);

          toff2.add("1st");
          toff2.add("2nd");
          mbar.add(toff);
          mbar.add(toff2);
          frame.setMenuBar(mbar);

          dialog.setSize(200,200);

          showButton.addActionListener(this);
          testButton.addActionListener(this);

          frame.addWindowListener(new WindowAdapter() {
          public void windowClosing(WindowEvent e) {System.exit(0);}
          public void windowClosed(WindowEvent e) {System.exit(0);}
          });

          frame.pack();
          frame.setSize(450, 120);
          frame.setVisible(true);
                            }

          public void actionPerformed(ActionEvent evt) {
              String command = evt.getActionCommand();

              if (command == "Show Modal Dialog") {
                   System.out.println("*** Invoking JDialog.show() ***");
                   dialog.setLocation(200,200);
                   dialog.show();
              }
              else if (command == "Test") {
                   System.out.println("*** Test ***");
              }
          }

      class AL implements ActionListener
      {
      public void actionPerformed(ActionEvent e)
      {
      System.out.println("selected");
      }
      }

      }

      ====
      It is believed that this problem has been fixed. Can you please verify that this is true.

      lara.bunni@Eng 1998-10-13

      Attachments

        Issue Links

          Activity

            People

              rraysunw Richard Ray (Inactive)
              duke J. Duke
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:
                Imported:
                Indexed: