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

Failures in NNBD ported dart:io tests #40534

Closed
a-siva opened this issue Feb 7, 2020 · 6 comments
Closed

Failures in NNBD ported dart:io tests #40534

a-siva opened this issue Feb 7, 2020 · 6 comments
Labels
area-vm Use area-vm for VM related issues, including code coverage, and the AOT and JIT backends. crash Process exits with SIGSEGV, SIGABRT, etc. An unhandled exception is not a crash. NNBD Issues related to NNBD Release

Comments

@a-siva
Copy link
Contributor

a-siva commented Feb 7, 2020

The dart:io tests that have been ported for NNBD show some failures after we switch the dart:io and dart:_http libraries to the NNBD versions. This issue is meant to track those failures.

There are three categories of failures

1.Timeouts with no activity being shown in the stack trace

--- Command "vm" (took 02:00.000217s):
DART_CONFIGURATION=DebugX64NNBD out/DebugX64NNBD/dart --enable_asserts --enable-isolate-groups --enable-experiment=non-nullable --ignore-unrecognized-flags --packages=/b/s/w/ir/cache/builder/sdk/.packages /b/s/w/ir/cache/builder/sdk/tests/standalone/io/http_advanced_test.dart

exit code:
null

diagnostics:
Process list including children: [30112]
Trying to capture stack trace for pid 30112
PID 30112 - process
TID 30112:
#0  0x00007f27b723c360 pthread_cond_wait@@GLIBC_2.3.2
#1  0x000055fa603c1254 dart::Monitor::WaitMicros(long)
#2  0x000055fa608ebf6a Dart_RunLoop
#3  0x000055fa5ffd6baa dart::bin::RunMainIsolate(char const*, dart::bin::CommandLineOptions*)
#4  0x000055fa5ffd7a4a dart::bin::main(int, char**)
#5  0x000055fa5ffd86d9 main
#6  0x00007f27b7775830 __libc_start_main
#7  0x000055fa5ffad029 _start
TID 30113:
#0  0x00007f27b785ca13 epoll_wait
#1  0x000055fa5ffdb0c5 dart::bin::EventHandlerImplementation::Poll(unsigned long)
#2  0x000055fa60034635 dart::bin::ThreadStart(void*)
#3  0x00007f27b72366ba start_thread
#4  0x00007f27b785c41d __clone
TID 30114:
#0  0x00007f27b723c360 pthread_cond_wait@@GLIBC_2.3.2
#1  0x000055fa603c1254 dart::Monitor::WaitMicros(long)
#2  0x000055fa60662e0a dart::BackgroundCompiler::Run()
#3  0x000055fa604804ec dart::ThreadPool::Worker::Loop()
#4  0x000055fa60480001 dart::ThreadPool::Worker::Main(unsigned long)
#5  0x000055fa603c0472 dart::ThreadStart(void*)
#6  0x00007f27b72366ba start_thread
#7  0x00007f27b785c41d __clone
  1. RuntimeErrors with Http header parse exceptions
--- Command "vm" (took 08.000580s):
DART_CONFIGURATION=DebugX64NNBD out/DebugX64NNBD/dart --enable_asserts --enable-isolate-groups --enable-experiment=non-nullable --ignore-unrecognized-flags --packages=/b/s/w/ir/cache/builder/sdk/.packages /b/s/w/ir/cache/builder/sdk/tests/standalone/io/http_basic_test.dart

exit code:
255

stderr:
Unhandled exception:
HttpException: Failed to parse HTTP, 71 should be a Hex digit, uri = /echo
#0      _HttpIncoming.listen.<anonymous closure> (dart:_http/http_impl.dart:162:7)
#1      _invokeErrorHandler (dart:async/async_error.dart:16:24)
#2      _HandleErrorStream._handleError (dart:async/stream_pipe.dart:284:9)
#3      _ForwardingStreamSubscription._handleError (dart:async/stream_pipe.dart:163:13)
#4      _RootZone.runBinaryGuarded (dart:async/zone.dart:1340:10)
#5      _BufferingStreamSubscription._sendError.sendError (dart:async/stream_impl.dart:369:15)
#6      _BufferingStreamSubscription._sendError (dart:async/stream_impl.dart:387:16)
#7      _BufferingStreamSubscription._addError (dart:async/stream_impl.dart:289:7)
#8      _SyncStreamControllerDispatch._sendError (dart:async/stream_controller.dart:782:19)
#9      _StreamController._addError (dart:async/stream_controller.dart:657:7)
#10     _StreamController.addError (dart:async/stream_controller.dart:609:5)
#11     _HttpParser._reportBodyError (dart:_http/http_parser.dart:1078:22)
#12     _HttpParser._parse (dart:_http/http_parser.dart:319:9)
#13     _HttpParser._onData (dart:_http/http_parser.dart:818:5)
#14     _RootZone.runUnaryGuarded (dart:async/zone.dart:1328:10)
#15     _BufferingStreamSubscription._sendData (dart:async/stream_impl.dart:350:11)
#16     _BufferingStreamSubscription._add (dart:async/stream_impl.dart:280:7)
#17     _SyncStreamControllerDispatch._sendData (dart:async/stream_controller.dart:778:19)
#18     _StreamController._add (dart:async/stream_controller.dart:649:7)
#19     _StreamController.add (dart:async/stream_controller.dart:596:5)
#20     _Socket._onData (dart:io-patch/socket_patch.dart:1880:41)
#21     _RootZone.runUnaryGuarded (dart:async/zone.dart:1328:10)
#22     _BufferingStreamSubscription._sendData (dart:async/stream_impl.dart:350:11)
#23     _BufferingStreamSubscription._add (dart:async/stream_impl.dart:280:7)
#24     _SyncStreamControllerDispatch._sendData (dart:async/stream_controller.dart:778:19)
#25     _StreamController._add (dart:async/stream_controller.dart:649:7)
#26     _StreamController.add (dart:async/stream_controller.dart:596:5)
#27     new _RawSocket.<anonymous closure> (dart:io-patch/socket_patch.dart:1416:33)
#28     _NativeSocket.issueReadEvent.issue (dart:io-patch/socket_patch.dart:919:14)
#29     _microtaskLoop (dart:async/schedule_microtask.dart:41:21)
#30     _startMicrotaskLoop (dart:async/schedule_microtask.dart:50:5)
#31     _runPendingImmediateCallback (dart:isolate-patch/isolate_patch.dart:117:13)
#32     _RawReceivePortImpl._handleMessage (dart:isolate-patch/isolate_patch.dart:168:5)
Unhandled exception:
HttpException: Connection closed before full header was received, uri = http://127.0.0.1:45311/echo
#0      _rootHandleUncaughtError.<anonymous closure> (dart:async/zone.dart:1118:29)
#1      _microtaskLoop (dart:async/schedule_microtask.dart:41:21)
#2      _startMicrotaskLoop (dart:async/schedule_microtask.dart:50:5)
#3      _runPendingImmediateCallback (dart:isolate-patch/isolate_patch.dart:117:13)
#4      _RawReceivePortImpl._handleMessage (dart:isolate-patch/isolate_patch.dart:168:5)
  1. Unexpected result
--- Command "vm" (took 04.000892s):
DART_CONFIGURATION=DebugX64NNBD out/DebugX64NNBD/dart --enable_asserts --enable-experiment=non-nullable --ignore-unrecognized-flags --packages=/b/s/w/ir/cache/builder/sdk/.packages /b/s/w/ir/cache/builder/sdk/tests/standalone/io/web_socket_compression_test.dart

exit code:
255

stdout:
unittest-suite-wait-for-done

stderr:
Unhandled exception:
Expect.equals(expected: <null>, actual: <>) fails.
#0      Expect._fail (package:expect/expect.dart:666:5)
#1      Expect.equals (package:expect/expect.dart:126:5)
#2      SecurityConfiguration.testClientRequestHeaders.<anonymous closure>.<anonymous closure> (file:///b/s/w/ir/cache/builder/sdk/tests/standalone/io/web_socket_compression_test.dart:268:16)
#3      _RootZone.runUnaryGuarded (dart:async/zone.dart:1328:10)
#4      _BufferingStreamSubscription._sendData (dart:async/stream_impl.dart:350:11)
#5      _BufferingStreamSubscription._add (dart:async/stream_impl.dart:280:7)
#6      _SyncStreamControllerDispatch._sendData (dart:async/stream_controller.dart:778:19)
#7      _StreamController._add (dart:async/stream_controller.dart:649:7)
#8      _StreamController.add (dart:async/stream_controller.dart:596:5)
#9      _HttpServer._handleRequest (dart:_http/http_impl.dart:2832:19)
#10     new _HttpConnection.<anonymous closure> (dart:_http/http_impl.dart:2587:19)
#11     _RootZone.runUnaryGuarded (dart:async/zone.dart:1328:10)
#12     _BufferingStreamSubscription._sendData (dart:async/stream_impl.dart:350:11)
#13     _BufferingStreamSubscription._add (dart:async/stream_impl.dart:280:7)
#14     _SyncStreamControllerDispatch._sendData (dart:async/stream_controller.dart:778:19)
#15     _StreamController._add (dart:async/stream_controller.dart:649:7)
#16     _StreamController.add (dart:async/stream_controller.dart:596:5)
#17     _HttpParser._headersEnd (dart:_http/http_parser.dart:365:19)
#18     _HttpParser._doParse (dart:_http/http_parser.dart:707:15)
#19     _HttpParser._parse (dart:_http/http_parser.dart:315:7)
#20     _HttpParser._onData (dart:_http/http_parser.dart:818:5)
#21     _RootZone.runUnaryGuarded (dart:async/zone.dart:1328:10)
#22     _BufferingStreamSubscription._sendData (dart:async/stream_impl.dart:350:11)
#23     _BufferingStreamSubscription._add (dart:async/stream_impl.dart:280:7)
#24     _SyncStreamControllerDispatch._sendData (dart:async/stream_controller.dart:778:19)
#25     _StreamController._add (dart:async/stream_controller.dart:649:7)
#26     _StreamController.add (dart:async/stream_controller.dart:596:5)
#27     _Socket._onData (dart:io-patch/socket_patch.dart:1880:41)
#28     _RootZone.runUnaryGuarded (dart:async/zone.dart:1328:10)
#29     _BufferingStreamSubscription._sendData (dart:async/stream_impl.dart:350:11)
#30     _BufferingStreamSubscription._add (dart:async/stream_impl.dart:280:7)
#31     _SyncStreamControllerDispatch._sendData (dart:async/stream_controller.dart:778:19)
#32     _StreamController._add (dart:async/stream_controller.dart:649:7)
#33     _StreamController.add (dart:async/stream_controller.dart:596:5)
#34     new _RawSocket.<anonymous closure> (dart:io-patch/socket_patch.dart:1416:33)
#35     _NativeSocket.issueReadEvent.issue (dart:io-patch/socket_patch.dart:919:14)
#36     _microtaskLoop (dart:async/schedule_microtask.dart:41:21)
#37     _startMicrotaskLoop (dart:async/schedule_microtask.dart:50:5)
#38     _runPendingImmediateCallback (dart:isolate-patch/isolate_patch.dart:117:13)
#39     _RawReceivePortImpl._handleMessage (dart:isolate-patch/isolate_patch.dart:168:5)

@a-siva a-siva added area-core-library SDK core library issues (core, async, ...); use area-vm or area-web for platform specific libraries. library-io NNBD Issues related to NNBD Release labels Feb 7, 2020
@a-siva
Copy link
Contributor Author

a-siva commented Feb 7, 2020

/cc @sortie @zichangg

@a-siva
Copy link
Contributor Author

a-siva commented Feb 7, 2020

https://ci.chromium.org/p/dart/builders/try/vm-kernel-nnbd-linux-debug-x64-try/192 can be used for the actual failure logs.

dart-bot pushed a commit that referenced this issue Feb 12, 2020
There are some tests failed after switching to NNBD. This is supposed to fix HttpException: Connection closed while receiving data.

It reduced the number of failure from 300 to 70.

The root cause is that HttpHeaders write {Transfer-Encoding: chunked} into _header field once user set it to true. However, when user tried to flip the bit,
remove() function didn't remove the content. This leads to an additional property in header. Parser alarmed when parsing it.

This is inconsistency on how others handle chunked transfer encoding. Looking at add(), set() and remove() implementation, all of them will only set _chunkedTransferEncoding instead of actually touching _header.

Bug: #40534
Change-Id: I80d76f3a6da01022fdb8e755e0def8a630ca376a
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/135353
Commit-Queue: Zichang Guo <zichangguo@google.com>
Reviewed-by: Lasse R.H. Nielsen <lrn@google.com>
@sortie
Copy link
Contributor

sortie commented Feb 20, 2020

tests/standalone/io/web_socket_compression_test.dart is fixed along with the backport of the breaking change in https://dart-review.googlesource.com/c/sdk/+/136620.

@sortie
Copy link
Contributor

sortie commented Apr 22, 2020

standalone/io/http_advanced_test and standalone/io/web_socket_compression_test.dart are fixed by now.

standalone/io/http_basic_test.dart appears to be crashing on kernel reload. That doesn't appear to be a dart:io issue. Perhaps that's an existing problem and not related to the test at all.

@sortie sortie added area-vm Use area-vm for VM related issues, including code coverage, and the AOT and JIT backends. crash Process exits with SIGSEGV, SIGABRT, etc. An unhandled exception is not a crash. and removed area-core-library SDK core library issues (core, async, ...); use area-vm or area-web for platform specific libraries. library-io labels Apr 22, 2020
@a-siva
Copy link
Contributor Author

a-siva commented May 11, 2020

@zichangg is this still a problem ?

@zichangg
Copy link
Contributor

I Looked at database. There are no IO tests approved, so I think all tests are fixed by now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-vm Use area-vm for VM related issues, including code coverage, and the AOT and JIT backends. crash Process exits with SIGSEGV, SIGABRT, etc. An unhandled exception is not a crash. NNBD Issues related to NNBD Release
Projects
None yet
Development

No branches or pull requests

3 participants