question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Integration tests stalled in Emmet tests

See original GitHub issue

Refs https://dev.azure.com/monacotools/Monaco/_build/results?buildId=187079&view=results

2022-09-28T22:46:42.9418800Z   Tests for Expand Abbreviations (HTML)
2022-09-28T22:46:49.4683010Z [perf] Renderer reported VERY LONG TASK (2036ms), starting auto profiling session 'd3084e04-0003-4aa9-981d-e0f0c05fa75d'
2022-09-28T22:46:49.4856210Z [main 2022-09-28T22:46:49.479Z] UtilityProcess<1>: Enabling inspect port on extension host with pid 50077.
2022-09-28T22:46:49.5367540Z [main 2022-09-28T22:46:49.529Z] UtilityProcess<1>: Enabling inspect port on extension host with pid 50077.
2022-09-28T22:46:50.3958730Z [main 2022-09-28T22:46:50.386Z] [perf] started to EXPECT frequent heartbeat d3084e04-0003-4aa9-981d-e0f0c05fa75d
2022-09-28T22:46:50.9614880Z UNRESPONSIVE extension host: received responsive event and cancelling profiling session
2022-09-28T22:46:50.9724740Z [main 2022-09-28T22:46:50.954Z] [perf] MISSED heartbeat, trying to profile renderer d3084e04-0003-4aa9-981d-e0f0c05fa75d
2022-09-28T22:47:06.1583430Z [main 2022-09-28T22:47:06.156Z] [perf] profiling STARTED d3084e04-0003-4aa9-981d-e0f0c05fa75d
2022-09-28T22:47:07.4028550Z UNRESPONSIVE extension host: starting to profile NOW
2022-09-28T22:47:08.1738560Z     ✔ Expand snippets (HTML) (25192ms)
2022-09-28T22:47:09.6954890Z     ✔ Expand snippets in completion list (HTML) (1023ms)
2022-09-28T22:47:11.0071160Z [perf] STOPPING to send heartbeat
2022-09-28T22:47:12.4051350Z [main 2022-09-28T22:47:12.396Z] [perf] profiling DONE d3084e04-0003-4aa9-981d-e0f0c05fa75d
2022-09-28T22:47:12.9398800Z [main 2022-09-28T22:47:12.934Z] [perf] stored profile to DISK d3084e04-0003-4aa9-981d-e0f0c05fa75d /var/folders/24/8k48jl6d249_n_qfxwsl6xvm0000gn/T/renderer-profile-1664405232398.cpuprofile
2022-09-28T22:47:13.0658290Z {
2022-09-28T22:47:13.0768040Z   sessionId: 'd3084e04-0003-4aa9-981d-e0f0c05fa75d',
2022-09-28T22:47:13.0879820Z   selfTime: 750.746,
2022-09-28T22:47:13.0989190Z   totalTime: 750.746,
2022-09-28T22:47:13.1093680Z   functionName: '(program)',
2022-09-28T22:47:13.1199470Z   callstack: '#(program)@-1:-1\n#(root)@-1:-1'
2022-09-28T22:47:13.1298670Z }
2022-09-28T22:47:13.1402610Z {
2022-09-28T22:47:13.1509000Z   sessionId: 'd3084e04-0003-4aa9-981d-e0f0c05fa75d',
2022-09-28T22:47:13.1609770Z   selfTime: 581.076,
2022-09-28T22:47:13.1713690Z   totalTime: 581.076,
2022-09-28T22:47:13.1825720Z   functionName: '(garbage collector)',
2022-09-28T22:47:13.1830630Z   callstack: '#(garbage collector)@-1:-1\n#(root)@-1:-1'
2022-09-28T22:47:13.1932380Z }
2022-09-28T22:47:13.2036110Z {
2022-09-28T22:47:13.2144180Z   sessionId: 'd3084e04-0003-4aa9-981d-e0f0c05fa75d',
2022-09-28T22:47:13.2243610Z   selfTime: 213.143,
2022-09-28T22:47:13.2347760Z   totalTime: 213.143,
2022-09-28T22:47:13.2453790Z   functionName: '(idle)',
2022-09-28T22:47:13.2560090Z   callstack: '#(idle)@-1:-1\n#(root)@-1:-1'
2022-09-28T22:47:13.2664270Z }
2022-09-28T22:47:13.2772190Z {
2022-09-28T22:47:13.2878330Z   sessionId: 'd3084e04-0003-4aa9-981d-e0f0c05fa75d',
2022-09-28T22:47:13.2982680Z   selfTime: 206.304,
2022-09-28T22:47:13.3086850Z   totalTime: 206.304,
2022-09-28T22:47:13.3201990Z   functionName: '_reveal',
2022-09-28T22:47:13.3317790Z   callstack: 'piiRemoved/workbench.desktop.main.js#_reveal@137:1137\n' +
2022-09-28T22:47:13.3425990Z     'piiRemoved/workbench.desktop.main.js#reveal@137:1070\n' +
2022-09-28T22:47:13.3532960Z     'piiRemoved/workbench.desktop.main.js#G@2142:38723\n' +
2022-09-28T22:47:13.3639620Z     'piiRemoved/workbench.desktop.main.js#invoke@82:126\n' +
2022-09-28T22:47:13.3740620Z     'piiRemoved/workbench.desktop.main.js#deliver@82:2193\n' +
2022-09-28T22:47:13.3842060Z     'piiRemoved/workbench.desktop.main.js#fire@82:1637\n' +
2022-09-28T22:47:13.3847090Z     'piiRemoved/workbench.desktop.main.js#@1985:16026\n' +
2022-09-28T22:47:13.3953650Z     'piiRemoved/workbench.desktop.main.js#invoke@82:126\n' +
2022-09-28T22:47:13.4134390Z     'piiRemoved/workbench.desktop.main.js#deliver@82:2193\n' +
2022-09-28T22:47:13.4246450Z     'piiRemoved/workbench.desktop.main.js#fire@82:1637\n' +
2022-09-28T22:47:13.4359590Z     'piiRemoved/workbench.desktop.main.js#_setOutlineModel@1985:23052\n' +
2022-09-28T22:47:13.4364420Z     'piiRemoved/workbench.desktop.main.js#_createOutline@1985:20534\n' +
2022-09-28T22:47:13.4461760Z     '#(root)@-1:-1'
2022-09-28T22:47:13.4571230Z }
2022-09-28T22:47:13.4673140Z {
2022-09-28T22:47:13.4785480Z   sessionId: 'd3084e04-0003-4aa9-981d-e0f0c05fa75d',
2022-09-28T22:47:13.4888270Z   selfTime: 154.696,
2022-09-28T22:47:13.4989310Z   totalTime: 154.696,
2022-09-28T22:47:13.5133970Z   functionName: '_reveal',
2022-09-28T22:47:13.5235160Z   callstack: 'piiRemoved/workbench.desktop.main.js#_reveal@137:1137\n' +
2022-09-28T22:47:13.5291850Z     'piiRemoved/workbench.desktop.main.js#reveal@137:1070\n' +
2022-09-28T22:47:13.5406550Z     'piiRemoved/workbench.desktop.main.js#G@2142:38723\n' +
2022-09-28T22:47:13.5525560Z     'piiRemoved/workbench.desktop.main.js#update@2142:37963\n' +
2022-09-28T22:47:13.5634640Z     'piiRemoved/workbench.desktop.main.js#handleOpenedEditors@2870:11265\n' +
2022-09-28T22:47:13.5744010Z     'piiRemoved/workbench.desktop.main.js#openEditor@2870:11173\n' +
2022-09-28T22:47:13.5854390Z     'piiRemoved/workbench.desktop.main.js#doShowEditor@2963:16746\n' +
2022-09-28T22:47:13.5970880Z     'piiRemoved/workbench.desktop.main.js#doOpenEditor@2963:15427\n' +
2022-09-28T22:47:13.6079600Z     'piiRemoved/workbench.desktop.main.js#openEditor@2963:15329\n' +
2022-09-28T22:47:13.6186940Z     'piiRemoved/workbench.desktop.main.js#openEditor@2769:24043\n' +
2022-09-28T22:47:13.6293190Z     '#(root)@-1:-1'
2022-09-28T22:47:13.6397870Z }
2022-09-28T22:47:13.6422670Z [main 2022-09-28T22:47:13.072Z] [perf] STOPPING to monitor renderer d3084e04-0003-4aa9-981d-e0f0c05fa75d

Looks like there are two items that need investigation,

  1. The long tasks reported by the auto profiler
  2. Does the profiler output interact negatively with integration tests
  3. Unrelated: should the auto profiler be enabled in CI ? Will it create noise in the telemetry ? If we want to keep the profiler enabled in CI should we then store the generated cpuprofile as pipeline artifacts.

Issue Analytics

  • State:open
  • Created a year ago
  • Comments:9 (9 by maintainers)

github_iconTop GitHub Comments

1reaction
SimonSiefkecommented, Nov 24, 2022

@bpasero I believe the EPIPE error is happening because console.log/console.warn/console.error is writing to a closed stdout or a closed stderr stream.

I was having a similar error in my application (write EIO) and solved it by attaching error listeners to process.stdout and process.stderr:

const { createWriteStream } = require('fs')
const { tmpdir } = require('os')

let logger

const getOrCreateLogger = () => {
  if (!logger) {
    const tmpDir = tmpdir()
    logger = createWriteStream(`${tmpDir}/log.txt`)
  }
  return logger
}

process.stdout.on('error', (error) => {
  const logger = getOrCreateLogger()
  logger.write(`[main-process] stdout error: ${error.stack}`)
})

process.stderr.on('error', (error) => {
  const logger = getOrCreateLogger()
  logger.write(`[main-process] stderr error: ${error.stack}`)
})

This NodeJS issue helped me track down the problem: https://github.com/nodejs/node/issues/831.

1reaction
jriekencommented, Sep 30, 2022

sorry, my PR to disable profiling go stuck in the pipeline (https://github.com/microsoft/vscode/pull/162307). Second attempt is on its way

Read more comments on GitHub >

github_iconTop Results From Across the Web

Failing at Integration Testing: Common Mistakes - TestQuality
Your tests may not be badly designed, yet they may nevertheless run poorly on testing infrastructure. Other times, you might not have considered ......
Read more >
Getting Integration Testing Right - Semaphore CI
With the right tools and CI/CD environments, integration testing can become as straightforward as unit testing. Read more.
Read more >
Integration tests timing out in Azure Devops - stuck on Writing ...
I'm having an issue running integration tests in Azure Devops. All the tests run locally in a matter of seconds (via dotnet test...
Read more >
Hobbs & Shaw (2021) Google. Réservez des vols pas chers ...
Emmet Otter's Jug Band Christmas (Jim Henson Associates, 1977). ... an easy-to-use option thanks to its simple interface and integration with Google Docs....
Read more >
How to tell if you have gypsy blood
Dec 08, 2007 · Only get this test if you are open minded, and realise the genealogy you have ... Gypsy-like persons evincing...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found