Skip to content

[VM] Intermittent failure to bind to an ephemeral port #47806

Closed
dart-lang/http
#2025

Description

@annagrin

We have seen flakes in flutter web tests recently due to failure to bind to an ephemeral port that is supposed to be free as chosen by the VM/OS.

See discussion in dart-lang/webdev#1451
See the parent flutter issue for details (flutter/flutter#93256). The stack trace:

[  +92 ms] SocketException: Failed to create server socket (OS Error: The shared flag to bind() needs to be `true` if binding multiple times on the same (address, port) combination.), address = ::1, port = 42919
     #0      _NativeSocket.bind (dart:io-patch/socket_patch.dart:988:7)
     <asynchronous suspension>
     #1      HttpMultiServer._loopback (package:http_multi_server/http_multi_server.dart:183:22)
     <asynchronous suspension>
     #2      ExtensionBackend.start (package:dwds/src/servers/extension_backend.dart:57:18)
     <asynchronous suspension>
     #3      Dwds.start (package:dwds/dwds.dart:138:26)
     <asynchronous suspension>
     #4      WebAssetServer.start (package:flutter_tools/src/isolated/devfs_web.dart:274:23)
     <asynchronous suspension>
     #5      WebDevFS.create (package:flutter_tools/src/isolated/devfs_web.dart:727:22)
     <asynchronous suspension>
     #6      ResidentWebRunner.run.<anonymous closure> (package:flutter_tools/src/isolated/resident_web_runner.dart:285:25)
     <asynchronous suspension>
     #7      asyncGuard.<anonymous closure> (package:flutter_tools/src/base/async_guard.dart:111:24)
     <asynchronous suspension>

Activity

  1. added
    area-core-librarySDK core library issues (core, async, ...); use area-vm or area-web for platform specific libraries.
    on Nov 30, 2021
  2. added
    area-vmUse area-vm for VM related issues, including code coverage, and the AOT and JIT backends.
    and removed
    area-core-librarySDK core library issues (core, async, ...); use area-vm or area-web for platform specific libraries.
    on Apr 21, 2024
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

    area-vmUse area-vm for VM related issues, including code coverage, and the AOT and JIT backends.library-io

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions