Skip to content

[tool_crash] SocketException (Error event raised in event handler : error condition has been reset, port = 0) in _NativeSocket.multiplex #192935

Closed

Description

@bkonyi

Description

In Flutter 3.47.3 crash telemetry, low-level socket reset errors on Linux caused unhandled SocketException crashes (27 crashes in the first 7 days post-release).

Stack Trace

_NativeSocket.multiplex at dart:io-patch/socket_patch.dart:1767
_RawReceivePort._handleMessage at dart:isolate-patch/isolate_patch.dart:192

Error message:

SocketException: Error event raised in event handler : error condition has been reset, port = 0

Cause

During resident runner, daemon, or recompile socket multiplexing on Linux, a socket reset event (ECONNRESET or similar) handled in _NativeSocket.multiplex raises an unhandled error into the Dart Zone if the enclosing stream or socket controller is not guarding error events.

Proposed Fix

Investigate socket error listeners across the resident runner and VM service connection to ensure socket reset error events on Linux are caught and handled cleanly.

Activity

  1. added
    toolAffects the "flutter" command-line tool. See also t: labels.
    team-toolOwned by Flutter Tool team
    P1High-priority issues at the top of the work list
    triaged-toolTriaged by Flutter Tool team
    on Sep 17, 2026
  2. self-assigned this
    on Sep 17, 2026
  3. mraleph commented on Sep 17, 2026

    @mraleph
    Member

    Note: the error message is confusing. Event handler notifies Dart layer about an error on the socket, but then when Dart layer wants to retrieve an error via getsockopt(fd, SOL_SOCKET, SO_ERROR, ...) it gets nothing useful back. So instead of a meaningful error you get back "error condition has been reset" - which is actually trying to say "there was an error, but something cleared actual error value from the socket (or never set one), so I don't know what to report here"

  4. bkonyi commented on Sep 21, 2026

    @bkonyi
    ContributorAuthor

    That makes sense. I think that, at least in most scenarios within the tool, we only encounter these sorts of errors when sockets close unexpectedly or we encounter an error when attempting to perform socket operations. These scenarios, while fatal, should be treated as handled with respect to crash reporting to reduce the noise in our analytics.

  5. github-actions commented on Oct 13, 2026

    @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.

  6. locked as resolved and limited conversation to collaborators on Oct 13, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

P1High-priority issues at the top of the work listteam-toolOwned by Flutter Tool teamtoolAffects the "flutter" command-line tool. See also t: labels.triaged-toolTriaged by Flutter Tool team

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions