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

Extension host test wait now 6 seconds to exit #154515

Closed
dbaeumer opened this issue Jul 8, 2022 · 13 comments
Closed

Extension host test wait now 6 seconds to exit #154515

dbaeumer opened this issue Jul 8, 2022 · 13 comments
Assignees
Labels
author-verification-requested Issues potentially verifiable by issue author bug Issue identified by VS Code Team member as probable bug debt Code quality issues extension-host Extension host issues sandbox Running VSCode in a node-free environment verified Verification succeeded
Milestone

Comments

@dbaeumer
Copy link
Member

dbaeumer commented Jul 8, 2022

I see this now when running my extension host tests:

[main 2022-07-08T14:39:50.017Z] UtilityProcess<1>: Waiting for extension host with pid 31365 to exit.

[main 2022-07-08T14:39:56.017Z] UtilityProcess<1>: Extension host with pid 31365 did not exit within 6000ms, will kill it now.

[main 2022-07-08T14:39:56.025Z] UtilityProcess<1>: received exit event with code 0.

[main 2022-07-08T14:39:56.025Z] Extension host with pid 31365 exited with code: 0, signal: .

Exit code:   0
Done

Is there something I need to do in my tests. This didn't happen before.

@deepak1556 deepak1556 added bug Issue identified by VS Code Team member as probable bug extension-host Extension host issues sandbox Running VSCode in a node-free environment labels Jul 8, 2022
@deepak1556 deepak1556 added this to the July 2022 milestone Jul 8, 2022
@bpasero
Copy link
Member

bpasero commented Jul 14, 2022

Is this on Windows? Does not seem to happen in our CI with integration tests:

https://monacotools.visualstudio.com/DefaultCollection/Monaco/_build/results?buildId=178104&view=logs&j=672276a2-8d3a-5fab-615d-090c51352f92&t=316b23c8-21ca-5aab-3515-3225235af7bb&l=655

Maybe related to a specific test?

@deepak1556
Copy link
Collaborator

@dbaeumer can you provide some steps to repro the issue, thanks!

@deepak1556 deepak1556 added the info-needed Issue requires more information from poster label Jul 14, 2022
@dbaeumer
Copy link
Member Author

Repository: https://github.com/microsoft/vscode-languageserver-node.git

  • npm run install
  • npm run symlink
  • npm run compile
  • npm run test

@deepak1556 deepak1556 added confirmation-pending and removed info-needed Issue requires more information from poster labels Jul 18, 2022
@deepak1556
Copy link
Collaborator

Unable to repro the issue on my machine

OS: Windows_NT x64 10.0.22000
  166 passing (5s)

[main 2022-07-18T15:07:09.588Z] UtilityProcess<1>: Waiting for extension host with pid 17316 to exit.

[main 2022-07-18T15:07:09.758Z] UtilityProcess<1>: received exit event with code 0.

[main 2022-07-18T15:07:09.758Z] Extension host with pid 17316 exited with code: 0, signal: .

Exit code:   0
Done

@deepak1556 deepak1556 added info-needed Issue requires more information from poster and removed confirmation-pending labels Jul 18, 2022
@deepak1556
Copy link
Collaborator

@dbaeumer can you try again, latest insiders contain some fix for the utility process so it might be fixed with it. Also, fwiw I couldn't repro the issue with older insiders version as well.

@deepak1556 deepak1556 removed this from the July 2022 milestone Jul 26, 2022
@alexdima alexdima removed the bug Issue identified by VS Code Team member as probable bug label Jul 29, 2022
@dbaeumer
Copy link
Member Author

dbaeumer commented Aug 4, 2022

Tested it today and it still shows up.

What I forgot to mention is that I see this using WSL2 under Windows.

@dbaeumer
Copy link
Member Author

dbaeumer commented Aug 4, 2022

@deepak1556 if you want we can have a look together on my machine.

@VSCodeTriageBot
Copy link
Collaborator

This issue has been closed automatically because it needs more information and has not had recent activity. See also our issue reporting guidelines.

Happy Coding!

@VSCodeTriageBot VSCodeTriageBot closed this as not planned Won't fix, can't repro, duplicate, stale Aug 12, 2022
@deepak1556 deepak1556 reopened this Aug 12, 2022
@deepak1556 deepak1556 removed the info-needed Issue requires more information from poster label Aug 12, 2022
@deepak1556
Copy link
Collaborator

I will first try your repro under WSL and if I cannot repro, we can debug on your machine.

@bpasero
Copy link
Member

bpasero commented Aug 15, 2022

Interestingly, scanning some smoke test logs, I often come across this message from the main.log:

Extension host with pid 47478 did not exit within 6000ms, will kill it now.

Full log:

[2022-08-15 15:11:17.068] [main] [info] update#ctor - updates are disabled by the environment
[2022-08-15 15:11:21.108] [main] [info] UtilityProcess<1>: Creating new...
[2022-08-15 15:11:21.114] [main] [info] UtilityProcess<1>: received spawn event.
[2022-08-15 15:11:22.609] [main] [info] Keytar is disabled. Using in-memory credential store instead.
[2022-08-15 15:11:28.759] [main] [info] UtilityProcess<1>: received exit event with code 0.
[2022-08-15 15:11:28.759] [main] [info] Extension host with pid 46674 exited with code: 0, signal: .
[2022-08-15 15:11:32.231] [main] [info] update#ctor - updates are disabled by the environment
[2022-08-15 15:11:35.893] [main] [info] UtilityProcess<1>: Creating new...
[2022-08-15 15:11:35.903] [main] [info] UtilityProcess<1>: received spawn event.
[2022-08-15 15:11:38.198] [main] [info] Keytar is disabled. Using in-memory credential store instead.
[2022-08-15 15:11:39.103] [main] [info] UtilityProcess<1>: Waiting for extension host with pid 47478 to exit.
[2022-08-15 15:11:45.701] [main] [info] UtilityProcess<1>: Extension host with pid 47478 did not exit within 6000ms, will kill it now.
[2022-08-15 15:11:45.711] [main] [info] UtilityProcess<1>: received exit event with code 0.
[2022-08-15 15:11:45.711] [main] [info] Extension host with pid 47478 exited with code: 0, signal: .

I wonder how we can figure out what the condition is that triggers it and maybe add more logging?

@bpasero
Copy link
Member

bpasero commented Aug 18, 2022

I can reproduce locally that on Linux running smoke tests shows the 6000ms warning and I can also see how the window closes only after.

Steps to reproduce:

  • be on Linux (e.g. Ubuntu 20)
  • download a new insiders build zip
  • you can open test/smoke/src/areas/workbench/data-loss.test.ts and make the first describe a describe.only to get results only from this suite
  • run yarn smoketest --build <path to insiders>, e.g. yarn smoketest --build /home/parallels/Downloads/code-insider-arm64-1660800067/VSCode-linux-arm64/
  • wait until finished

You can then cd into .build/logs$ cd smoke-tests-electron and open that folder in VSCode. When you open smoke-test-runner.log and search for 6000ms you should see a few entries.

I cannot reproduce this on macOS, so I suspect a Linux only issue. Interestingly when I test on Linux against stable I can see one instance of test hanging on shutdown as well, somewhat 6 seconds, but I see no log message. So maybe we only log this message when utility process is enabled and we actually had this issue already previously?

@dbaeumer
Copy link
Member Author

dbaeumer commented Oct 6, 2022

Any progress on this. Still seeing this when running my tests.

@alexdima alexdima added debt Code quality issues bug Issue identified by VS Code Team member as probable bug labels Oct 24, 2022
@alexdima alexdima added this to the November 2022 milestone Oct 24, 2022
@alexdima alexdima modified the milestones: November 2022, December 2022 Nov 28, 2022
@deepak1556
Copy link
Collaborator

Addressed in #164882.

Verified #154515 (comment) and #154515 (comment) in respective setups.

@deepak1556 deepak1556 added the author-verification-requested Issues potentially verifiable by issue author label Nov 28, 2022
@connor4312 connor4312 added the verified Verification succeeded label Dec 1, 2022
@github-actions github-actions bot locked and limited conversation to collaborators Jan 12, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
author-verification-requested Issues potentially verifiable by issue author bug Issue identified by VS Code Team member as probable bug debt Code quality issues extension-host Extension host issues sandbox Running VSCode in a node-free environment verified Verification succeeded
Projects
None yet
Development

No branches or pull requests

6 participants