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

volano29 limited by os resource on Linux - need better diagnostic message

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Fixed
    • Icon: P4 P4
    • 9
    • hs24, hs25
    • hotspot
    • b04
    • x86
    • linux_2.6

      When running volano29 on Linux, the server dies after client starts.

      The error message in the log is
      [Tue Jul 03 15:40:27 PDT 2012] Unexpected error in MainServer thread. (java.lang.OutOfMemoryError: unable to create new native thread)

      Server log has
      Creating room number 12 ...
      Exception in thread "main" java.lang.OutOfMemoryError: unable to create new native thread
      at java.lang.Thread.start0(Native Method)
      at java.lang.Thread.start(Thread.java:691)
      at COM.volano.e.b(DashoA5383)
      at COM.volano.am.<init>(DashoA5383)
      at COM.volano.ak.a(DashoA5383)
      at COM.volano.ak.a(DashoA5383)
      at COM.volano.Mark.main(DashoA5383)

      This workload needs 2 system limits to be increased for users on Linux: number of open files(max 10240) and number of processes(about 1714 for client and 868 for server). The test script benchscript/volano29/run checkes 'ulimit -Hn' and 'ulimit -Hs' for number of open files. But does not check the processes. The nproc limitation causes JVM not able to create more threads. However the error message is confusing. Suggest to add checking nproc for Linux in the run script and give better diagnotistic message.

      Meanwhile, the error message thrown by JVM
      Exception in thread "main" java.lang.OutOfMemoryError: unable to
      create new native thread

      is confusing. we should have better diagnostic message.
      It is true that Linux returns 11 (EAGAIN) for pthread_create() either out of memory or nproc limitation is reached.

      I agree that we can not tell exactly what is the cause...

      Consulting Dave Keenan for his input...
      comments from David.Keenan

      "Perhaps a OS neutral message isn't possible. If we are not able to determine the cause on linux, provide the information available to us while on linux.

      For example:
      Exception in thread "main" java.lang.OutOfMemoryError: unable to
      create new native thread. Potential causes are out of memory or nproc limitation is reached."
      I think this is a better description as it covers the 2 reasons provided by Linux.

            iklam Ioi Lam
            yuzhang Jenny Zhang (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: