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

Improvements related to: Failed to start thread - pthread_create failed (EAGAIN)

    XMLWordPrintable

    Details

    • Type: Enhancement
    • Status: Resolved
    • Priority: P4
    • Resolution: Fixed
    • Affects Version/s: 18
    • Fix Version/s: 18
    • Component/s: hotspot
    • Labels:
      None
    • Subcomponent:
    • Resolved In Build:
      b07

      Description

      Extracted from https://bugs.openjdk.java.net/browse/JDK-8268605

      The current warning message:
      [11.028s][warning][os,thread] Failed to start thread - pthread_create failed (EAGAIN) for attributes: stacksize: 2048k, guardsize: 0k, detached.

      is quite unhelpful and does not give an idea which thread failed to be created.
      It would be a useful addition to show if this is a GC thread, a compiler thread, an application thread, etc.

      > One more thing, do you think it would be reasonable to retry (e.g. 1-2 times) pthread_create() if it returns EAGAIN?

      That is not unreasonable, but may not help depending on exactly why the failure is occurring. If we have hit the ulimit process/thread limit for example, then it won't self-correct unless a thread/process has terminated since the first call. So in a tight loop it may just fail continually.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              dholmes David Holmes
              Reporter:
              bdaloze Benoit Daloze
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: