Jetty
  1. Jetty
  2. JETTY-1478

High CPU usage because of infinite loop when using WebSockets

    Details

    • Type: Bug Bug
    • Status: Closed Closed
    • Priority: Major Major
    • Resolution: Duplicate
    • Affects Version/s: 7.5.4
    • Fix Version/s: 7.6.0, 8.1.0
    • Component/s: Hightide
    • Labels:
    • Environment:
      Ubuntu 10.04, SUN JVM 6
    • Number of attachments :
      0

      Description

      In the handle method of WebsocketConnectionD00 class, it is using _endp.fill method to get the bytes from the ChannelEndPoint. ChannelEndPoint is using SocketChannel's read method to read bytes from the buffer. Potentially read method can return 0 bytes and that is not being checked in _endp.fill. As a result this is leading to an infinite loop in the handle method of WebsocketConnectionD00. This issue might also be related to an old issue http://jira.codehaus.org/browse/JETTY-1270, though the thread dumps do not seem to match.

        Activity

        Hide
        Joakim Erdfelt added a comment -

        Duplicate of bug https://bugs.eclipse.org/bugs/show_bug.cgi?id=367435
        Fixed in Jetty 7.6.0 and 8.1.0 already.

        Show
        Joakim Erdfelt added a comment - Duplicate of bug https://bugs.eclipse.org/bugs/show_bug.cgi?id=367435 Fixed in Jetty 7.6.0 and 8.1.0 already.

          People

          • Assignee:
            Joakim Erdfelt
            Reporter:
            Manveer Chawla
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: