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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: activate the uv_loop on incoming IPC messages #19449

Merged
merged 1 commit into from Jul 25, 2019

Conversation

@MarshallOfSound
Copy link
Member

commented Jul 25, 2019

Fixes #19368

I don't completely understand what is happening here but this is what I was seeing.

  • http called Connect on TCPWrap, this queued up a callback with an async ID
  • Our message came in and with async ID 0
  • The callback for TCPWrap got called but never got entered (it was stuck as a pending tick)

For whatever reason in Electron 6 and higher our IPC calls into the renderer in a way that prevents other pending ticks being called. This fixes it and I'd like to ship it in 6.0.0 next week as this issue is unpredictable and incredibly hard to trace.

I believe this is related to the mojo-refactor but even removing the NodeCallbackScope from our ipc server did not fix this issue, with limited time on hand I just threw this fix up 馃憤

Notes: Fixed issue where sometimes asynchronous node.js methods such as http, setImmediate and fs wouldn't call their callbacks for an incredibly long amount of time.

@nornagon
Copy link
Contributor

left a comment

I'm ok with this as a bandaid but i think we should take a serious look at our integration with async_hooks before Electron 7. Can we make a tracking issue for it and set it as blocking for v7?

@MarshallOfSound

This comment has been minimized.

Copy link
Member Author

commented Jul 25, 2019

Can we make a tracking issue for it and set it as blocking for v7?

Done #19466

@MarshallOfSound MarshallOfSound merged commit 8028c57 into master Jul 25, 2019

14 checks passed

Artifact Comparison No Changes
Details
Backportable? - 6-0-x Clean Backport
Details
Semantic Pull Request ready to be squashed
Details
WIP Ready for review
Details
appveyor: win-ia32-testing AppVeyor build succeeded
Details
appveyor: win-ia32-testing-pr AppVeyor build succeeded
Details
appveyor: win-x64-testing AppVeyor build succeeded
Details
appveyor: win-x64-testing-pr AppVeyor build succeeded
Details
build-linux Workflow: build-linux
Details
build-mac Workflow: build-mac
Details
electron-arm-testing Build #20190725.8 succeeded
Details
electron-arm64-testing Build #20190725.8 succeeded
Details
lint Workflow: lint
Details
release-notes Release notes found
@release-clerk

This comment has been minimized.

Copy link

commented Jul 25, 2019

Release Notes Persisted

Fixed issue where sometimes asynchronous node.js methods such as http, setImmediate and fs wouldn't call their callbacks for an incredibly long amount of time.

@MarshallOfSound MarshallOfSound deleted the activate-on-ipc branch Jul 25, 2019

@trop

This comment has been minimized.

Copy link
Contributor

commented Jul 25, 2019

I have automatically backported this PR to "6-0-x", please check out #19467

@trop trop bot added the merged/6-0-x label Jul 26, 2019

zcbenz added a commit that referenced this pull request Aug 13, 2019

MarshallOfSound added a commit that referenced this pull request Aug 13, 2019

trop bot pushed a commit that referenced this pull request Aug 13, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can鈥檛 perform that action at this time.