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

Unrecoverable exception writing to socket closed from the other side #35995

Open
tejainece opened this issue Feb 20, 2019 · 1 comment
Open
Labels
area-core-library SDK core library issues (core, async, ...); use area-vm or area-web for platform specific libraries. library-io P2 A bug or feature request we're likely to work on type-bug Incorrect behavior (everything from a crash to more subtle misbehavior)

Comments

@tejainece
Copy link

I am using Dart VM version: 2.1.0 (Tue Nov 13 18:22:02 2018 +0100) on "windows_x64".

When socket.write is called on RawSocket after the other side has closed the connection (which we dont know about yet), the Dart SDK crashes with an unrecoverable exception.

Here is the message it outputs before it crashes:

Unhandled exception:
SocketException: Write failed (OS Error: Broken pipe, errno = 32), address = database.example.com, port = 62372
#0      _rootHandleUncaughtError.<anonymous closure> (dart:async/zone.dart:1112:29)
#1      _microtaskLoop (dart:async/schedule_microtask.dart:41:21)
#2      _startMicrotaskLoop (dart:async/schedule_microtask.dart:50:5)
#3      _runPendingImmediateCallback (dart:isolate/runtime/libisolate_patch.dart:115:13)
#4      _RawReceivePortImpl._handleMessage (dart:isolate/runtime/libisolate_patch.dart:172:5)

It however calls onError callback of listen method with the error before it crashes.

This is probably related to an old issue: #17468

There are also occurrences of the same issue in other packages: dartist/redis_client#67

@sortie
Copy link
Contributor

sortie commented Feb 27, 2019

Thanks for the report. I couldn't reproduce it on Linux with a simple program. I'll fire up a Windows environment and see if I can reproduce it there. Can you help me by sharing a small program that reproduces the issue?

@sortie sortie added P2 A bug or feature request we're likely to work on type-bug Incorrect behavior (everything from a crash to more subtle misbehavior) labels Feb 27, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-core-library SDK core library issues (core, async, ...); use area-vm or area-web for platform specific libraries. library-io P2 A bug or feature request we're likely to work on type-bug Incorrect behavior (everything from a crash to more subtle misbehavior)
Projects
None yet
Development

No branches or pull requests

3 participants