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

Sometimes tests fail with "OS Error: Too many open files" #14

Open
fujidaiti opened this issue Sep 9, 2023 · 1 comment
Open

Sometimes tests fail with "OS Error: Too many open files" #14

fujidaiti opened this issue Sep 9, 2023 · 1 comment

Comments

@fujidaiti
Copy link
Owner

Running dart test in the embed/ directory under MacOS sometimes fails with the following error:

$ dart test

00:01 +33 -1: loading test/str/str_embedding_generator_test.dart [E]
  Failed to load "test/str/str_embedding_generator_test.dart": Cannot open file, path = '/Users/daichi/.pub-cache/hosted/pub.dev/analyzer-5.13.0/lib/instrumentation/logger.dart' (OS Error: Too many open files, errno = 24)
  package:build/src/asset/reader.dart 53:13                         AssetReader.digest
  ===== asynchronous gap ===========================
  package:build_resolvers/src/build_asset_uri_resolver.dart 139:20  BuildAssetUriResolver._updateCachedAssetState
  ===== asynchronous gap ===========================
  package:graphs/src/crawl_async.dart 67:19                         _CrawlAsync._crawlFrom
  ===== asynchronous gap ===========================
  package:graphs/src/crawl_async.dart 71:5                          _CrawlAsync._crawlFrom
  ===== asynchronous gap ===========================
  package:graphs/src/crawl_async.dart 71:5                          _CrawlAsync._crawlFrom
  ===== asynchronous gap ===========================
  package:graphs/src/crawl_async.dart 71:5                          _CrawlAsync._crawlFrom
  ===== asynchronous gap ===========================
  package:graphs/src/crawl_async.dart 71:5                          _CrawlAsync._crawlFrom
  ===== asynchronous gap ===========================
  package:graphs/src/crawl_async.dart 71:5                          _CrawlAsync._crawlFrom
  ===== asynchronous gap ===========================
  package:graphs/src/crawl_async.dart 71:5                          _CrawlAsync._crawlFrom
  ===== asynchronous gap ===========================
  package:graphs/src/crawl_async.dart 56:7                          _CrawlAsync.run


To run this test again: /opt/homebrew/Caskroom/flutter/3.0.5/flutter/bin/cache/dart-sdk/bin/dart test test/str/str_embedding_generator_test.dart -p vm --plain-name 'loading test/str/str_embedding_generator_test.dart'
00:01 +33 -2: loading test/binary/binary_embedding_generator_test.dart [E]
  Failed to load "test/binary/binary_embedding_generator_test.dart": Cannot open file, path = '/Users/daichi/.pub-cache/hosted/pub.dev/dart_style-2.3.2/lib/src/chunk.dart' (OS Error: Too many open files, errno = 24)
  package:build_resolvers/src/build_asset_uri_resolver.dart 146:23  BuildAssetUriResolver._updateCachedAssetState
  ===== asynchronous gap ===========================
  package:graphs/src/crawl_async.dart 67:19                         _CrawlAsync._crawlFrom
  ===== asynchronous gap ===========================
  package:graphs/src/crawl_async.dart 71:5                          _CrawlAsync._crawlFrom
  ===== asynchronous gap ===========================
  package:graphs/src/crawl_async.dart 71:5                          _CrawlAsync._crawlFrom
  ===== asynchronous gap ===========================
  package:graphs/src/crawl_async.dart 71:5                          _CrawlAsync._crawlFrom
  ===== asynchronous gap ===========================
  package:graphs/src/crawl_async.dart 71:5                          _CrawlAsync._crawlFrom
  ===== asynchronous gap ===========================
  package:graphs/src/crawl_async.dart 71:5                          _CrawlAsync._crawlFrom
  ===== asynchronous gap ===========================
  package:graphs/src/crawl_async.dart 71:5                          _CrawlAsync._crawlFrom
  ===== asynchronous gap ===========================
  package:graphs/src/crawl_async.dart 56:7                          _CrawlAsync.run


To run this test again: /opt/homebrew/Caskroom/flutter/3.0.5/flutter/bin/cache/dart-sdk/bin/dart test test/binary/binary_embedding_generator_test.dart -p vm --plain-name 'loading test/binary/binary_embedding_generator_test.dart'
00:06 +46 -2: Some tests failed.
@fujidaiti
Copy link
Owner Author

fujidaiti commented Sep 9, 2023

A workaround:

$ ulimit -S -n 2048

This command increases the maximum number of files the system can open at one time. 2048 may vary from machine to machine.

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

No branches or pull requests

1 participant