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

fix: stale renderer process on quit #32888

Merged
merged 1 commit into from Feb 18, 2022
Merged

Conversation

deermichel
Copy link
Contributor

@deermichel deermichel commented Feb 14, 2022

Description of Change

Closes #32884.

In the mentioned Chromium roll I observed the following:

If I replace QuitClosure() with QuitWhenIdleClosure(), all processes terminate properly as it was the case before the Chromium roll. Since this is Electron code, it would explain why Chromium doesn't suffer from the same issue.

Because I lack context of what exactly this code does, please double-check that this change is fine :). But apparently, regressions were anticipated according to this commit message. cc @MarshallOfSound @ckerr

cc @miniak @deepak1556 @zarubond @dsanders11

Checklist

Release Notes

Notes: Fixed stale renderer process when application is quit while renderer is busy.

@deermichel deermichel added semver/patch backwards-compatible bug fixes target/14-x-y labels Feb 14, 2022
@electron-cation electron-cation bot added the new-pr 🌱 PR opened in the last 24 hours label Feb 14, 2022
@deermichel
Copy link
Contributor Author

@dsanders11 this would probably mean you can revert the upstream commit you made 😆 . But first, please confirm that this change works :)

@deermichel deermichel requested a review from a team February 14, 2022 14:45
@electron-cation electron-cation bot removed the new-pr 🌱 PR opened in the last 24 hours label Feb 15, 2022
Copy link
Member

@nornagon nornagon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@dsanders11
Copy link
Member

@deermichel, I've tested this on the machine where I see reproductions, and there's good news and bad news.

Good news, your gist in the issue readily reproduces when using v19 nightlies, and I can confirm that the change in this PR stops it from reproducing with your gist.

Bad news, I still see the issue reproduce just by running and stopping Fiddle manually with the default fiddle. I can't seem to replicate it with app.exit in the fiddle itself, at least not so far, so it could be related to the SIGTERM. However, old versions of Electron don't reproduce that way, and it's gotten significantly worse since the latest Chromium roll, I can reproduce consistently with a few run/stops.

So I think this PR is valid and a step in the right direction, but I don't think it fully solves the issue, unfortunately.

@deermichel
Copy link
Contributor Author

deermichel commented Feb 16, 2022

Ok, that's a bummer - but yeah then it's most likely related to the "arbitrary killing" of the operating system. Nonetheless, once this lands I at least want to check if that solves the user-facing issue we have in Skype (and I'm pretty optimistic it does).

@dsanders11
Copy link
Member

I've played with it further, and seems the only spot where it still reproduces is with 'Stop' in Fiddle. Oddly it doesn't reproduce with an 'End Process' from Task Manager. 🤔 While that's annoying since you can trip it while running Fiddle, it's not a production concern.

LGTM

Copy link
Member

@deepak1556 deepak1556 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@deepak1556
Copy link
Member

Failing tests are unrelated, merging.

@deepak1556 deepak1556 merged commit b1463d2 into main Feb 18, 2022
@deepak1556 deepak1556 deleted the deermichel/fix-stale-process branch February 18, 2022 05:02
@release-clerk
Copy link

release-clerk bot commented Feb 18, 2022

Release Notes Persisted

Fixed stale renderer process when application is quit while renderer is busy.

@trop
Copy link
Contributor

trop bot commented Feb 18, 2022

I have automatically backported this PR to "15-x-y", please check out #32967

@trop
Copy link
Contributor

trop bot commented Feb 18, 2022

I have automatically backported this PR to "14-x-y", please check out #32968

@trop
Copy link
Contributor

trop bot commented Feb 18, 2022

I have automatically backported this PR to "16-x-y", please check out #32969

@trop
Copy link
Contributor

trop bot commented Feb 18, 2022

I have automatically backported this PR to "17-x-y", please check out #32970

@trop
Copy link
Contributor

trop bot commented Feb 18, 2022

I have automatically backported this PR to "18-x-y", please check out #32971

@indutny-signal
Copy link
Contributor

Just discovered this. Fantastic work everyone!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
semver/patch backwards-compatible bug fixes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Bug]: stale process with high cpu usage on windows
6 participants