streetsidesoftware / cspell

A Spell Checker for Code!
https://cspell.org
MIT License
1.16k stars 84 forks source link

[Bug]: failed with 'time-out' #5825

Open sungh0lim opened 2 days ago

sungh0lim commented 2 days ago

Kind of Issue

Crash / Error

Tool or Library

cspell/eslint-plugin

Version

8.9.1

Supporting Library

Other

OS

Linux

OS Version

ubuntu-22.04

Description

With "@cspell/eslint-plugin": "^8.9.1" often the github action fails with a message like the following:

Oops! Something went wrong! :(

ESLint: 8.57.0

Error: Internal error: Atomics.wait() failed: timed-out
Occurred while linting /home/runner/work/admin/admin/apps/newsyo/src/components/common-components/moleclues/RegionSelection.tsx:1
Rule: "@cspell/spellchecker"
    at syncFn (/home/runner/work/admin/admin/node_modules/.pnpm/synckit@0.9.0/node_modules/synckit/lib/index.cjs:345:13)
    at checkProgram (/home/runner/work/admin/admin/node_modules/.pnpm/@cspell+eslint-plugin@8.9.1_eslint@8.57.0/node_modules/@cspell/eslint-plugin/dist/plugin/cspell-eslint-plugin.cjs:[91](https://github.com/yogiyo/admin/actions/runs/9709866692/job/26799388423?pr=780#step:5:95):36)
    at ruleErrorHandler (/home/runner/work/admin/admin/node_modules/.pnpm/eslint@8.57.0/node_modules/eslint/lib/linter/linter.js:1076:28)
    at /home/runner/work/admin/admin/node_modules/.pnpm/eslint@8.57.0/node_modules/eslint/lib/linter/safe-emitter.js:45:58
    at Array.forEach (<anonymous>)
    at Object.emit (/home/runner/work/admin/admin/node_modules/.pnpm/eslint@8.57.0/node_modules/eslint/lib/linter/safe-emitter.js:45:38)
    at NodeEventGenerator.applySelector (/home/runner/work/admin/admin/node_modules/.pnpm/eslint@8.57.0/node_modules/eslint/lib/linter/node-event-generator.js:297:26)
    at NodeEventGenerator.applySelectors (/home/runner/work/admin/admin/node_modules/.pnpm/eslint@8.57.0/node_modules/eslint/lib/linter/node-event-generator.js:326:22)
    at NodeEventGenerator.enterNode (/home/runner/work/admin/admin/node_modules/.pnpm/eslint@8.57.0/node_modules/eslint/lib/linter/node-event-generator.js:340:14)
    at CodePathAnalyzer.enterNode (/home/runner/work/admin/admin/node_modules/.pnpm/eslint@8.57.0/node_modules/eslint/lib/linter/code-path-analysis/code-path-analyzer.js:803:23)
 ELIFECYCLE  Command failed with exit code 2.

Can you tell me the reason for this message? What should I fix?

Steps to Reproduce

No response

Expected Behavior

No response

Additional Information

No response

cspell.json

No response

cspell.config.yaml

No response

Example Repository

No response

Code of Conduct

Jason3S commented 2 days ago

@sungh0lim,

Do you know the version of Node being used?

The extension is trying to start a worker_thread to process the file. Maybe it is taking too long to complete.

Jason3S commented 2 days ago

@sungh0lim,

The environment variable SYNCKIT_TIMEOUT can impact the eslint plugin and can cause a timeout. Would you check to see if it is being set as part of the CI/CD runner?

sungh0lim commented 2 days ago

@Jason3S , Thank you for help.

Resolved .nvmrc as 18.19
Attempting to download 18.19...
Acquiring 18.19.1 - x64 from https://github.com/actions/node-versions/releases/download/18.19.1-7910925895/node-18.19.1-linux-x64.tar.gz

I am using ubuntu-latest in github action.

jobs:
  build-and-test:
    runs-on: ubuntu-latest

https://learn.microsoft.com/en-us/azure/devops/pipelines/agents/hosted?view=azure-devops&tabs=yaml#use-a-microsoft-hosted-agent

SYNCKIT_TIMEOUT is not set.

Jason3S commented 1 day ago

@sungh0lim,

Does it always happen or only sometimes?

sungh0lim commented 20 hours ago

@Jason3S

Yes. There are about 15 apps in my monorepo, each of which runs eslint. At this point one or more usually fail.