Skip to content

v20.9.3 hogs system resources #3527

Closed
Closed

Description

@shinenelson

Description

The latest release 20.9.3 that rolled into my Firefox Developer Edition ( v81.0b5 ) on an Ubuntu 20.04.1 LTS machine earlier today started hogging all of my system resources whenever a github page was loaded.

Steps to Reproduce

Optional : create a fresh profile on Firefox

  1. Install Refined Github extension from addons.mozilla.org
  2. Open a Github page

Expected Behavior

The page loads without issues.

Actual Behaviour

  1. Firefox warns that the extension is slowing the page down.
    Screenshot from 2020-09-04 05-58-13
  2. CPU hits 100% ( on all cores ) and the fans start spinning very loudly
  3. RAM starts to fill up until none is left.

Clicking the 'Stop it' button in the browser warning does not take immediate effect because the whole browser process is in some kind of a hung state. The only 2 ways ( that I could figure was ) to stop it is to either disable the add-on from the Add-ons Manager ( if the tab is already open; new tabs don't load the pages within the DOM ) or to kill the whole browser process.

Test Environment

Operating System : Ubuntu 20.04.1 LTS
Browser Version : Firefox 80.0, Firefox Developer Edition ( 81.0b5 )
Extension Version : 20.9.3

Activity

  1. fregante commented on Sep 4, 2020

    @fregante
    Member

    Thanks for the detailed report, but does this happen on any page? If not, please leave a link where it happens.

    There have been some changes lately that might cause this, but we had just hoped they wouldn't — #3084

  2. fregante commented on Sep 4, 2020

    @fregante
    Member
  3. fregante commented on Sep 4, 2020

    @fregante
    Member

    Also, more helpfully, can you try clicking on "Debug script" to see where it stops? This might take a minute to stop, but it will provide information about what's causing it.

  4. njibhu commented on Sep 4, 2020

    @njibhu

    Same issue here on ArchLinux, FF 80.0.1
    Actually as soon as I interact with the yellow bar, either to disable the addon on the page, stop the script or debug the whole Firefox UI stops responding and only solution is to kill Firefox.
    I'll have to disable the extension for the time being.
    I think the issue might have caused by the 20.9.3 update. Before this update everything was working perfectly on my side.

    If there's any other way to give helpful information I'd be happy to provide them.

  5. swt30 commented on Sep 4, 2020

    @swt30

    Same here on OSX Catalina, Firefox 81.0b4, Refined Github 20.9.3, on any github repo. I hit debug but no luck, the page just hangs.

  6. noaione commented on Sep 4, 2020

    @noaione

    Same problem, it only occured on repository page.
    I'm using version 20.9.3 on Chrome 85.0.4183.83

    Looking at the dev console, the problem is because this line of code https://github.com/sindresorhus/refined-github/blob/master/source/features/cleanup-repo-filelist-actions.tsx#L38

    refined-github.js:9621 Uncaught TypeError: Cannot read property 'nextSibling' of null

    Line 9621 on the packaged(?) script

            Object(select_dom["a"])(".octicon-download", downloadButton).nextSibling.remove();
  7. shinenelson commented on Sep 4, 2020

    @shinenelson
    ContributorAuthor

    That would probably explain why this 'hang' happens only on the "Code" tab and doesn't happen on "Issues" or "Pull requests" tabs.

    I was looking at the changes that went into this release - it wasn't much but I found #3517 and somehow felt that the observe block and the onetime(init) could be the source of the problem; though I couldn't connect it to the selector-observer and https://bugzil.la/1422522

  8. changed the title [-]latest release hogs system resources - Firefox on Ubuntu 20.04[/-] [+]latest release hogs system resources on Firefox[/+] on Sep 4, 2020
  9. yakov116 commented on Sep 4, 2020

    @yakov116
    Member

    I just tried to reproduce I did a fresh install (brand new computer) and I am not seeing the issue.
    Note I am on windows.

  10. yakov116 commented on Sep 4, 2020

    @yakov116
  11. shinenelson commented on Sep 4, 2020

    @shinenelson
    Author
  12. changed the title [-]latest release hogs system resources on Firefox[/-] [+]latest release hogs system resources[/+] on Sep 4, 2020
  13. yakov116 commented on Sep 4, 2020

    @yakov116
  14. shinenelson commented on Sep 4, 2020

    @shinenelson
    Author
  15. 11 remaining items

  16. fregante commented on Sep 4, 2020

    @fregante
    Member

    the download button that uses download-directory.github.io is present

    That button isn't affected, the selector is very specifically get-repo details which only appears on the root (get-repo being the custom dropdown element with the "clone/download" links)

  17. autra commented on Sep 4, 2020

    @autra

    Aaaaannd I can't reproduce any more. I'm pretty sure it's an interaction with another addon, possibly octotree, because disabling and enabling it made the problem go away for me.

  18. shinenelson commented on Sep 4, 2020

    @shinenelson
    ContributorAuthor

    @autra : can you check whether your add-on got updated to v20.9.4? it was published a little earlier reverting #3517.

  19. kidonng commented on Sep 4, 2020

    @kidonng
    Member

    @autra I have Octotree as well and cannot reproduce (on Chrome 86.0.4240.22, though I believe this doesn't affect Chrome)
    @fregante I can reproduce it on Firefox 80 with a fresh install

  20. shinenelson commented on Sep 4, 2020

    @shinenelson
    ContributorAuthor

    That button isn't affected, the selector is very specifically get-repo details which only appears on the root (get-repo being the custom dropdown element with the "clone/download" links)

    @fregante is right. that was the change in #3517. my bad 🙏

    so, all the root repository pages then? I think I had it reproduce on josh/selector-observer too during my initial hangs and tests ( before I went hard-core debugging the issue )

  21. fregante commented on Sep 4, 2020

    @fregante
    Member

    The error in #3527 (comment) suggests that get-repo details .octicon-download doesn't exist. That's really strange because we don't remove it.

    I made it crash by doing this in the console:

    1. Remove download icon
    2. Rename details tag to whatever
    3. Rename it back to details, it immediately hangs

    So indeed this loops inside the add function, probably because of the error. This is kinda of a new problem with selector-observer; if that happens every time GitHub changes the DOM we're screwed.

    My guess: https://github.com/josh/selector-observer/issues/30

  22. shinenelson commented on Sep 4, 2020

    @shinenelson
    ContributorAuthor

    I don't know if this will be of much help

    image

    The .octicon-download button is there though.

  23. kidonng commented on Sep 4, 2020

    @kidonng
    Member

    This is really strange, I can reproduce it when I didn't login into GitHub, but cannot when I logged in (both without setting token, Firefox 80)

  24. kidonng commented on Sep 4, 2020

    @kidonng
    Member

    @fregante Maybe just

    - select('.octicon-download', downloadButton)!.nextSibling!.remove();
    + select('.octicon-download', downloadButton)?.nextSibling!.remove();

    Or the good old way:

    -	observe('get-repo details', {
    +	observe('get-repo details:not(.rgh-cleanup-repo-filelist-actions)', {
    		add(downloadButton) {
    -			downloadButton.classList.add('tooltipped', 'tooltipped-ne');
    +			downloadButton.classList.add('tooltipped', 'tooltipped-ne', 'rgh-cleanup-repo-filelist-actions');
  25. fregante commented on Sep 4, 2020

    @fregante
    Member

    Maybe just

    - select('.octicon-download', downloadButton)!.nextSibling!.remove();
    + select('.octicon-download', downloadButton)?.nextSibling!.remove();

    That just hides the error, we don't do that. We can however change the original selector to point directly to the SVG, which would fix this specific issue for the time being.

  26. kidonng commented on Sep 4, 2020

    @kidonng
  27. autra commented on Sep 4, 2020

    @autra

    @autra : can you check whether your add-on got updated to v20.9.4? it was published a little earlier reverting #3517.

    I'm still on v20.9.3

  28. fregante commented on Sep 5, 2020

    @fregante
    Member

    @kidonng probably just observe the download button directly:

    observe('get-repo details .octicon-download', {............})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions