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

Regression: Ctrl-C a large multi-threaded program very slow (Linux)

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: P4
    • Resolution: Fixed
    • Affects Version/s: 1.4.0
    • Fix Version/s: 1.4.1
    • Component/s: hotspot
    • Labels:
    • Subcomponent:
    • Resolved In Build:
      hopper
    • CPU:
      generic
    • OS:
      linux

      Description

      Run an application that creates a lot of threads, and press "Ctrl-C" to stop it.
      e.g. try to "Ctrl-C" the following program:

      class t{
        public static void main(String []args){
          try{
            for(int i=0; i< 800; i++){
              Thread t = new Thread(){
                public void run(){
                  try{
                    System.out.println(getName());
                    sleep(100000);
                  }catch(Exception e){}
                }
              };
              t.start();
            }
          }catch(Throwable t){
            t.printStackTrace();
      // System.exit(1);
          }
          System.out.println("Press Ctrl-C please...");
        }
      }

      On my Linux system (Redhat 7.1 SMP on dual PIII-866), with Merlin b83,
      Ctrl-C takes 29 seconds to finish!

      Handling Ctrl-C should be quick.

      Update:
      It's reasonably fast using JDK-1.3.1 or 1.4-beta (by "reasonably fast",
      I mean up to 5 seconds). 1.4-beta2 needs 20-30 seconds to finish Ctrl-C.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              hhuangsunw Hui Huang (Inactive)
              Reporter:
              hhuangsunw Hui Huang (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:
                Imported:
                Indexed: