dart-lang / http

A composable API for making HTTP requests in Dart.
https://pub.dev/packages/http
BSD 3-Clause "New" or "Revised" License
1.02k stars 354 forks source link

Dart 2 VM runtime errors in transport_test #1353

Closed srawlins closed 6 years ago

srawlins commented 6 years ago

Testing with Dart 2.0.0-dev.56.0, I see that transport_test fails:

$ dart --preview-dart-2 test/transport_test.dart
00:00 +0: transport-test ping
00:00 +1: transport-test terminated-client-ping
00:00 +2: transport-test terminated-server-ping
00:00 +3: transport-test disabled-push
00:00 +4: transport-test enabled-push-100
00:04 +5: transport-test early-shutdown
00:04 +5 -1: transport-test early-shutdown [E]
  HTTP/2 error: Connection error: Connection is being forcefully terminated. (errorCode: 10)
  dart:async/stream_controller.dart 594:43                      _StreamController.addError
  package:http2/src/flowcontrol/stream_queues.dart 245:28       StreamMessageQueueIn.onTerminated
  package:http2/src/error_handler.dart 19:7                     _StreamMessageQueueIn&Object&TerminatableMixin.terminate
  package:http2/src/streams/stream_handler.dart 757:26          StreamHandler._closeStreamAbnormally
  package:http2/src/streams/stream_handler.dart 189:9           StreamHandler.onTerminated.<fn>
...
mkustermann commented 6 years ago

These test failures occured with the intruction of --sync-async to the VM (which starts async functions synchronously):

Without sync-async:

% dart --no-sync-async test/transport_test.dart
00:00 +0: transport-test ping
00:00 +1: transport-test terminated-client-ping
00:00 +2: transport-test terminated-server-ping
00:00 +3: transport-test exhaust-concurrent-stream-limit
00:00 +4: transport-test disabled-push
00:00 +5: transport-test enabled-push-100
00:02 +6: transport-test early-shutdown
00:02 +7: transport-test client-terminates-stream
00:02 +8: transport-test server-terminates-stream
00:02 +9: transport-test client-terminates-stream-after-half-close
00:02 +10: transport-test server-terminates-stream-after-half-close
00:02 +11: transport-test idle-handler
00:02 +12: transport-test flow-control fast-sender-receiver-paused--default-window-size
00:02 +13: transport-test flow-control fast-sender-receiver-paused--10kb-window-size
00:03 +14: All tests passed!

With --sync-async

% dart --sync-async test/transport_test.dart
00:00 +0: transport-test ping
00:00 +1: transport-test terminated-client-ping
00:00 +2: transport-test terminated-server-ping
00:00 +3: transport-test exhaust-concurrent-stream-limit
00:00 +4: transport-test disabled-push
00:00 +5: transport-test enabled-push-100
00:02 +6: transport-test early-shutdown
00:02 +6 -1: transport-test early-shutdown [E]
  HTTP/2 error: Connection error: Connection is being forcefully terminated. (errorCode: 10)
...

00:02 +6 -1: transport-test client-terminates-stream
00:02 +7 -1: transport-test server-terminates-stream
00:02 +8 -1: transport-test client-terminates-stream-after-half-close
00:02 +9 -1: transport-test server-terminates-stream-after-half-close
00:32 +9 -2: transport-test server-terminates-stream-after-half-close [E]
  TimeoutException after 0:00:30.000000: Test timed out after 30 seconds.
 ...

00:32 +9 -2: transport-test idle-handler
00:32 +10 -2: transport-test flow-control fast-sender-receiver-paused--default-window-size
00:33 +11 -2: transport-test flow-control fast-sender-receiver-paused--10kb-window-size
00:33 +12 -2: Some tests failed.

These are probably real bugs in the code.

kevmoo commented 6 years ago

@mkustermann – thoughts on the remaining failures?

https://travis-ci.org/dart-lang/http2/jobs/405082795#L626

mkustermann commented 6 years ago

Right now I don't have the time to look at it, but it's in the queue.

kevmoo commented 6 years ago

thanks

On Fri, Jul 20, 2018 at 1:28 AM Martin Kustermann notifications@github.com wrote:

Right now I don't have the time to look at it, but it's in the queue.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/dart-lang/http/issues/1353, or mute the thread https://github.com/notifications/unsubscribe-auth/AABCivHrNVZuMHntkjTCW4P9aoOLxvrbks5uIZS9gaJpZM4UVzBL .