Jetty
  1. Jetty
  2. JETTY-256

continuation may cause 100%cpu occasionally!

    Details

    • Type: Bug Bug
    • Status: Resolved Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 6.0.0beta8, 6.0.0beta9, 6.0.0beta10, 6.0.0beta11, 6.0.0beta12, 6.0.0beta14, 6.0.0beta15, 6.0.0beta16, 6.0.0beta17, 6.0.0beta18, 6.0.0RC0, 6.0.0rc1, 6.0.0rc2, 6.0.0rc3, 6.0.0rc4, 6.0.0, 6.0.1, 6.0.2, 6.0.3, 6.1.0pre0, 6.1.0pre1, 6.1.0pre2, 6.1.0pre3, 6.1.0rc0, 6.1.0rc1, 6.1.0rc2, 6.1.0rc3, 6.1.0, 6.1.1rc0, 6.1.1rc1, 6.1.1, 6.1.2rc0
    • Fix Version/s: 6.1.2rc2
    • Component/s: Continuations
    • Labels:
      None
    • Environment:
      jdk1.5 gentoo-linux
    • Number of attachments :
      1

      Description

      continuation may cause 100%cpu occasionally.

      sun.nio.ch.SelectorImpl.select(long) invoked 314658 times in 16889ms ! (see the YourKit snapshot )

      may be the blocking Selector.select method stop blocking occasionally.
      CODE SelectorManager.doSelect [
      if (wait > 0)
      _selector.select(wait); <====================== may return immediately.
      else if (wait == 0)
      _selector.selectNow();
      else
      _selector.select();
      ]

      suggest code [
      if (wait > 0)

      { int ret = _selector.select(wait); if (ret == 0) Thread.sleep(1000); //do something }

      else if (wait == 0)
      _selector.selectNow();
      else
      _selector.select();

      ]

        Activity

          People

          • Assignee:
            Greg Wilkins
            Reporter:
            Boyce Lee
          • Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: