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

xxh32 leaves open handle #658

Open
urugator opened this issue Feb 7, 2023 · 0 comments
Open

xxh32 leaves open handle #658

urugator opened this issue Feb 7, 2023 · 0 comments

Comments

@urugator
Copy link

urugator commented Feb 7, 2023

Hi, xxh32 (not sure if specifically this function or the lib in general) seems to be leaking some resources. When used as part of jest tests, it randomly causes:
"Jest did not exit one second after the test run has completed."
When executed with --detectOpenHandles:

Jest has detected the following 1 open handle potentially keeping Jest from exiting:


    > 1 | import { xxh32 } from '@node-rs/xxhash';
        | ^
      2 | xxh32('foobarbaz');
      3 |

      at Runtime._loadModule (../../node_modules/jest-runtime/build/index.js:1218:29)
      at Object.<anonymous> (../../node_modules/@node-rs/xxhash/index.js:64:29)
      at Object.<anonymous> (test/foo.spec.ts:1:1)

This issue was originally reported as part of @nestjs repo:
nestjs/nest#11072

While at it, hope it's ok if I mention another issue that prevents adoption by the same lib, which deals with cross-platform development: nestjs/nest#11071
Could you perhaps clarify if this is expected behavior? Is the generated lockfile platform specific? Is this workflow possible/supported? What would be the correct/intended way to handle such situation? Thank you.

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

1 participant