-
Notifications
You must be signed in to change notification settings - Fork 15k
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: destroy message port backend when JS env exits #39335
Conversation
@deepak1556 is there a consistent repro for this? if yes it'd be nice to add a test, but definitely not blocking! |
@codebytere I don't have a repro for this, validated the fix based on the crash reports in our reporting server. |
Release Notes Persisted
|
I have automatically backported this PR to "25-x-y", please check out #39345 |
I have automatically backported this PR to "26-x-y", please check out #39346 |
v27.2.1 This version still has the same problem, and it doesn't seem to be fixed. `Operating system: Windows NT GPU: UNKNOWN Crash reason: EXCEPTION_BREAKPOINT Thread 0 (crashed) Thread 1 Thread 2 Thread 3 Thread 4 Thread 5 Thread 6 Thread 7 Thread 8 Thread 9 Thread 10 Thread 11 Loaded modules: |
Description of Change
Fixes the following two crashes we have seen in our releases with utility process
Crash 1
Crash 2
Currently
MessagePort
class in the utility process will outlive the Javascript environment and if there are pending messages while the process is being destroyed, when the chromium event loop flushes the messages it will cause UAF if theMessagePort
class tries to call into JS. The change ensuresthat the
MessagePort
class gets destroyed when the Javascript environment is destroyed.Release Notes
Notes: fix crash in message ports when utility process exits.