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

Getting fstat error since latest release when running JS code on Windows #1845

Open
johnridesabike opened this issue Feb 28, 2025 · 1 comment

Comments

@johnridesabike
Copy link
Contributor

I recently started getting test failures on a Github Actions job using Windows and JSOO-generated code. I don't have a Windows machine directly available, so I apologize for being unable to provide a minimal reproducible example.

The exact error is this (link):

node:fs:1644
  handleErrorFromBinding(ctx);
  ^

Error: EINVAL: invalid argument, fstat
    at Object.fstatSync (node:fs:1644:3)
    at new AB (D:\a\acutis\acutis\_build\.sandbox\e437599ddd7afc5fce4ce1a65f7b45e0\default\main.cjs:661:12)
    at XO (D:\a\acutis\acutis\_build\.sandbox\e437599ddd7afc5fce4ce1a65f7b45e0\default\main.cjs:852:29)
    at y9 (D:\a\acutis\acutis\_build\.sandbox\e437599ddd7afc5fce4ce1a65f7b45e0\default\main.cjs:880:21)
    at D:\a\acutis\acutis\_build\.sandbox\e437599ddd7afc5fce4ce1a65f7b45e0\default\main.cjs:881:14
    at D:\a\acutis\acutis\_build\.sandbox\e437599ddd7afc5fce4ce1a65f7b45e0\default\main.cjs:881:202
    at Object.<anonymous> (D:\a\acutis\acutis\_build\.sandbox\e437599ddd7afc5fce4ce1a65f7b45e0\default\main.cjs:4927:119)
    at Module._compile (node:internal/modules/cjs/loader:1364:14)
    at Module._extensions..js (node:internal/modules/cjs/loader:1422:10)
    at Module.load (node:internal/modules/cjs/loader:1203:32) {
  fd: 0,
  errno: -4071,
  syscall: 'fstat',
  code: 'EINVAL'
 }

Node.js v18.20.6

The line number in the error message seems to point to this code from the JSOO runtime source:

var stats = this.fs.fstatSync(fd);

Some notes:

  • I don't believe the JSOO program in my tests calls any IO functions directly.
  • I didn't modify anything in the test before the test started breaking (the only commits were non-code).
  • This does not happen on MacOS or Linux tests.
@vouillon
Copy link
Member

Thanks a lot for your bug report.
This is certainly due to commit 1d7f690. It seems stdout and/or stderr are not available or are misdetected by node/libuv. I think we should just catch the exception and ignore it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants