Skip to content

Large flutter test suite can fail with "Failed to load: Too many open files" #34612

Closed

Description

@jmagman

Running large test suites can cause "Failed to load: Too many open files".
ulimit is the default macOS 10.14.5 (256).

Steps to Reproduce

Running all the tests in packages/flutter at the same time demonstrates this problem.

$ cd packages/flutter
$ flutter test

Logs

flutter test --verbose results (with scrubbed directory names):
test_verbose.txt

00:57 +1113 ~25: flutter/packages/flutter/test/cupertino/scaffold_test.dart: Contents have automatic sliver padding between translucent bars                                    [  +18 ms] test 175: error caught during test; sending to test framework
[   +3 ms] test 175: cleaning up...
[        ] test 175: deleting temporary directory
[   +3 ms] test 175: shutting down test harness socket server
00:57 +1113 ~25 -1: loading flutter/packages/flutter/test/cupertino/action_sheet_test.dart [E]                                                                                  
  Failed to load "flutter/packages/flutter/test/cupertino/action_sheet_test.dart":
  Too many open files
    Command: flutter/bin/cache/artifacts/engine/darwin-x64/flutter_tester --disable-observatory --enable-checked-mode --verify-entry-points --enable-software-rendering --skia-deterministic-rendering --enable-dart-profiling --non-interactive --use-test-fonts --packages=flutter/packages/flutter/.packages /var/folders/mv/qlhc4vsj6tqct166rw3zwmth00mfq2/T/flutter_test_listener.Q2tyNY/listener.dart.dill
$ ulimit -n
256
$ flutter doctor
Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel unknown, v1.7.5-pre.17, on Mac OS X 10.14.5 18F203, locale en-US)
 
[✓] Android toolchain - develop for Android devices (Android SDK version 28.0.3)
[✓] Xcode - develop for iOS and macOS (Xcode 10.2.1)
[✓] iOS tools - develop for iOS devices
[✓] Android Studio (version 3.4)
[✓] VS Code (version 1.35.0)
[✓] Connected device (1 available)

• No issues found!

Activity

  1. added
    a: tests"flutter test", flutter_test, or one of our tests
    toolAffects the "flutter" command-line tool. See also t: labels.
    on Jun 18, 2019
  2. jmagman commented on Jun 18, 2019

    @jmagman
    MemberAuthor
    1. Just running packages/flutter/tests/widget/* was enough to hit the open file limit.
    2. Upping my ulimit -n limit to 1024 was enough to stop hitting the open file limit.
  3. jmagman commented on Jun 18, 2019

    @jmagman
    MemberAuthor

    Duplicate of #2976.

  4. github-actions commented on Aug 29, 2021

    @github-actions

    This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of flutter doctor -v and a minimal reproduction of the issue.

  5. locked as resolved and limited conversation to collaborators on Aug 29, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    a: tests"flutter test", flutter_test, or one of our teststoolAffects the "flutter" command-line tool. See also t: labels.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions