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

race condition error, while counting files #375

Open
yegor256 opened this issue Nov 10, 2024 · 0 comments · May be fixed by #400
Open

race condition error, while counting files #375

yegor256 opened this issue Nov 10, 2024 · 0 comments · May be fixed by #400
Labels
bug Something isn't working good first issue Good for newcomers help wanted Extra attention is needed

Comments

@yegor256
Copy link
Member

I got this error, while running eoc compile:

node:fs:1658
  const stats = binding.stat(
                        ^

Error: ENOENT: no such file or directory, stat '.eoc/classes/EOorg/EOeolang/EOnan$EOtimes.class'
    at Object.statSync (node:fs:1658:25)
    at count (/opt/homebrew/lib/node_modules/eolang/src/mvnw.js:170:16)
    at count (/opt/homebrew/lib/node_modules/eolang/src/mvnw.js:171:18)
    at count (/opt/homebrew/lib/node_modules/eolang/src/mvnw.js:171:18)
    at count (/opt/homebrew/lib/node_modules/eolang/src/mvnw.js:171:18)
    at print (/opt/homebrew/lib/node_modules/eolang/src/mvnw.js:188:45)
    at Timeout.check [as _onTimeout] (/opt/homebrew/lib/node_modules/eolang/src/mvnw.js:140:7)
    at listOnTimeout (node:internal/timers:594:17)
    at process.processTimers (node:internal/timers:529:7) {
  errno: -2,
  code: 'ENOENT',
  syscall: 'stat',
  path: '.eoc/classes/EOorg/EOeolang/EOnan$EOtimes.class'
}

Node.js v22.8.0

I can't reproduced it though. It seems to be a race condition problem: one "thread" is running mvn, while another "thread" is trying to count files in the directory. At some point of time, one file gets deleted, which leads to runtime error in another thread (which is counting).

@yegor256 yegor256 added bug Something isn't working good first issue Good for newcomers help wanted Extra attention is needed labels Nov 10, 2024
trapvpack added a commit to trapvpack/eoc that referenced this issue Nov 28, 2024
trapvpack added a commit to trapvpack/eoc that referenced this issue Nov 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working good first issue Good for newcomers help wanted Extra attention is needed
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant