Uploaded image for project: 'OpenNMS'
  1. OpenNMS
  2. NMS-7829

Refresh loop possible in setOffset() -> refresh() ->setOffset() in onmsList code

    Details

    • Type: Bug
    • Status: Resolved (View Workflow)
    • Priority: Critical
    • Resolution: Fixed
    • Affects Version/s: 17.0.0
    • Fix Version/s: 19.1.0
    • Component/s: Web UI - General
    • Security Level: Default (Default Security Scheme)
    • Labels:
      None

      Description

      In the new Angular onmsList module pages (Minion and monitoring location lists), if you click too quickly on the "Next" button on the list and you have a large list of items then the page can get caught in an infinite refresh loop where it is trying to change the offset of the list to two separate values.

      The symptom of this problem is that the list on the page and offset= in the address bar will oscillate between two sets of items and the browser will consume 100% of your CPU.

      This is caused because the Next button calls setOffset() which triggers a refresh(). However, refresh() can call setOffset() in boundry conditions and if two overlapping calls happen:

      A: setOffset() [Next button]
      A: refresh()
      B: setOffset() [Next button]
      A: setOffset()
      B: refresh()
      B: setOffset()
      A: refresh()
      ...
      

      then you get an infinite loop.

        Attachments

          Activity

            People

            • Assignee:
              seth Seth Leger
              Reporter:
              seth Seth Leger
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: