Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug: MacOS "usernoted" process eats all RAM #5583

Closed
vjcagay opened this issue Feb 16, 2018 · 15 comments
Closed

Bug: MacOS "usernoted" process eats all RAM #5583

vjcagay opened this issue Feb 16, 2018 · 15 comments

Comments

@vjcagay
Copy link

vjcagay commented Feb 16, 2018

Do you want to request a feature or report a bug?
Bug

What is the current behavior?
When Jest is ran on watch mode and notify option is turned on and there are failing tests, MacOS' usernoted process consumes too much RAM.

screen shot 2018-02-16 at 15 53 56

What is the expected behavior?
There should not be any memory leaks.

Please provide your exact Jest configuration and mention your Jest, node,
yarn/npm version and operating system.

"jest": {
    "coveragePathIgnorePatterns": [
      "<rootDir>/node_modules",
      "<rootDir>/release"
    ],
    "modulePathIgnorePatterns": [
      "<rootDir>/node_modules",
      "<rootDir>/release"
    ],
    "transform": {
      "^.+\\.tsx?$": "ts-jest"
    },
    "testRegex": "(/__tests__/.*|(\\.|/)(test))\\.(tsx?)$",
    "moduleFileExtensions": [
      "ts",
      "tsx",
      "js",
      "jsx",
      "json",
      "node"
    ],
    "mapCoverage": true,
    "coverageThreshold": {
      "global": {
        "branches": 100,
        "functions": 100,
        "lines": 100,
        "statements": 100
      }
    },
    "notify": true
  }
  • Jest 22.3.0
  • NPM 5.6.0
  • MacOS 10.13.3

I saw that there has been the memory issue on terminal-notifier but since this is a different process I am posting it as a separate issue.

@SimenB
Copy link
Member

SimenB commented Feb 16, 2018

@mikaelbr ideas?

@mikaelbr
Copy link
Contributor

This one is new for me, haven't seen or heard about it before. Seems like it's an issue with underlying process in macOS. Might be triggered by some error in terminal-notifier, but I'm not sure. There are some comments on the a similar issue and how to "fix" it: https://apple.stackexchange.com/questions/212970/what-is-usernoted-and-why-is-it-eating-my-cpu

@rickhanlonii
Copy link
Member

Cannot reproduce on:

Jest 22.3.0
NPM 5.6.0
macOS 10.13.1

@SimenB
Copy link
Member

SimenB commented Sep 30, 2018

I cannot reproduce either. And I doubt it's Jest's fault either way. Happy to reopen if proven wrong!

@SimenB SimenB closed this as completed Sep 30, 2018
@lp741
Copy link

lp741 commented Oct 27, 2018

I still have same problem with jest 23.6.0

@vroudge
Copy link

vroudge commented Nov 1, 2018

I have the same issue with jest @23.6.0 on Mac OSX 10.14 (18A391) running in iTerm if that's of any help.

node @ 8.12
npm @ 5.6

@yct21
Copy link

yct21 commented Nov 9, 2018

Similar problem happens to me.

  • MAC OSX 10.13.6 (17G65)
  • node 8.12
  • jest 23.6
  • npm 6.4.1

And after closing iterm2 it still runs until reboot.

image

Can't reproduce afterwards.

@christopher-francisco
Copy link

Experiencing this on a brand new macOS High Sierra 10.13.6. It ate up to 30 GB of RAM (so almost all the RAM?). I had to force quit usernoted.

Jest 23.6.0, react-scripts@2.1.1

@AnalyzePlatypus
Copy link

I'm getting this on Mojave 10.14

usernotesd is casually using 58GB (!!!) of RAM on my 16GB MacBook Pro.
Pore over this screenshot!
Aren't the numbers beautiful?

screen shot 2018-12-12 at 9 37 07 pm

@AndyOGo
Copy link

AndyOGo commented Feb 26, 2019

32GB of RAM on my machine are full 😲

@AndyOGo
Copy link

AndyOGo commented Feb 26, 2019

@AndyOGo
Copy link

AndyOGo commented Apr 25, 2019

@SimenB
I disagree with closing this bug report, even if it's an issue with any of the dependencies used.
Because I use awesome Jest, and therefore get this problem 😞

@ericsoco
Copy link

Also seeing this with jest@24.8.0 on macOS Mojave 10.14.5. Unlike OP, I'm running --watch but not --notify. Specifically, I'm running:
jest some/path --silent --watch

killall usernoted does the trick, but stopping the Jest watch process does not.

Jest team: any idea which dep you're using might hook into usernoted? Makes sense to think it could be whatever system notifications dep is used by --notify, but like I said I'm not even passing that flag. This could be a Jest issue if multiple instances of the system notifications dep are being created, or it could be downstream in that dep.

@Guuz
Copy link

Guuz commented Apr 17, 2020

Still an issue in 2020...

@github-actions
Copy link

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.
Please note this issue tracker is not a help forum. We recommend using StackOverflow or our discord channel for questions.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 11, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests