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

cfe-unittest-asserts-release-mac tests flakily fail with SocketException BrokenPipe error #48840

Open
aam opened this issue Apr 19, 2022 · 10 comments
Labels
area-front-end Use area-front-end for front end / CFE / kernel format related issues. gardening

Comments

@aam
Copy link
Contributor

aam commented Apr 19, 2022

from log

/==================================================================================================================================================================\
| cfe-unittest-asserts-release-mac:pkg/front_end/test/fasta/text_serialization/extension_types/type_variable_in_static_context broke (Pass -> Fail, expected Pass) |
\==================================================================================================================================================================/

0:00:00.000293: Indexed 18 libraries (0 bytes) in 0.292ms, that is,
       0.000 bytes/ms, and
       0.016 ms/libraries.
...


SocketException: Write failed (OS Error: Broken pipe, errno = 32), port = 0

#0      _NativeSocket.write (dart:io-patch/socket_patch.dart:1190:34)
#1      _RawSocket.write (dart:io-patch/socket_patch.dart:1912:15)
#2      _Socket._write (dart:io-patch/socket_patch.dart:2352:18)
#3      _SocketStreamConsumer.write (dart:io-patch/socket_patch.dart:2100:26)
#4      _SocketStreamConsumer.addStream.<anonymous closure> (dart:io-patch/socket_patch.dart:2074:11)
#5      _rootRunUnary (dart:async/zone.dart:1434:47)
#6      _CustomZone.runUnary (dart:async/zone.dart:1335:19)
#7      _CustomZone.runUnaryGuarded (dart:async/zone.dart:1244:7)
#8      _BufferingStreamSubscription._sendData (dart:async/stream_impl.dart:341:11)
#9      _BufferingStreamSubscription._add (dart:async/stream_impl.dart:271:7)
#10     _SyncStreamControllerDispatch._sendData (dart:async/stream_controller.dart:774:19)
#11     _StreamController._add (dart:async/stream_controller.dart:648:7)
#12     _StreamController.add (dart:async/stream_controller.dart:596:5)
#13     _StreamSinkImpl.add (dart:io/io_sink.dart:136:17)
#14     _IOSinkImpl.write (dart:io/io_sink.dart:269:5)
#15     _Socket.write (dart:io-patch/socket_patch.dart:2190:36)
#16     _StdSink.write (dart:io/stdio.dart:315:11)
#17     StdioProcess.run (package:testing/src/stdio_process.dart:68:21)
<asynchronous suspension>
#18     runDiff (file:///opt/s/w/ir/pkg/front_end/test/utils/kernel_chain.dart:522:28)
<asynchronous suspension>
#19     MatchContext.match (file:///opt/s/w/ir/pkg/front_end/test/utils/kernel_chain.dart:100:23)
<asynchronous suspension>
#20     ChainContext.run.doStep.<anonymous closure> (package:testing/src/chain.dart:188:22)
<asynchronous suspension>


To re-run this test, run:

   dart pkg/front_end/test/unit_test_suites.dart -p pkg/front_end/test/fasta/text_serialization/extension_types/type_variable_in_static_context

The test has outcome Crash, but was expected to have outcome(s) {ExpectationFileMismatchSerialized}. You might have to update the status file to the new outcome
There's a status entry looking something like

  extension_types/type_variable_in_static_context: ExpectationFileMismatchSerialized

which should be updated.

The status file is file:///opt/s/w/ir/pkg/front_end/testcases/text_serialization.status.

cc @athomas - possibly flakiness is infra related

@aam aam added the gardening label Apr 19, 2022
@athomas athomas added the area-front-end Use area-front-end for front end / CFE / kernel format related issues. label Apr 20, 2022
@athomas
Copy link
Member

athomas commented Apr 20, 2022

According to @whesse this is flakiness in the CFE or the tests, moving to area-front-end.

@johnniwinther
Copy link
Member

@whesse how can this be a front-end issue?

@aam
Copy link
Contributor Author

aam commented Jun 8, 2022

Failed again https://logs.chromium.org/logs/dart/buildbucket/cr-buildbucket/8811908224943216881/+/u/test_results/new_test_failures__logs_


SocketException: Write failed (OS Error: Broken pipe, errno = 32), port = 0

#0      _NativeSocket.write (dart:io-patch/socket_patch.dart:1190:34)
#1      _RawSocket.write (dart:io-patch/socket_patch.dart:1912:15)
#2      _Socket._write (dart:io-patch/socket_patch.dart:2352:18)
#3      _SocketStreamConsumer.write (dart:io-patch/socket_patch.dart:2100:26)
#4      _SocketStreamConsumer.addStream.<anonymous closure> (dart:io-patch/socket_patch.dart:2074:11)
#5      _rootRunUnary (dart:async/zone.dart:1399:47)
#6      _CustomZone.runUnary (dart:async/zone.dart:1300:19)
#7      _CustomZone.runUnaryGuarded (dart:async/zone.dart:1209:7)
#8      _BufferingStreamSubscription._sendData (dart:async/stream_impl.dart:341:11)
#9      _BufferingStreamSubscription._add (dart:async/stream_impl.dart:271:7)
#10     _SyncStreamControllerDispatch._sendData (dart:async/stream_controller.dart:774:19)
#11     _StreamController._add (dart:async/stream_controller.dart:648:7)
#12     _StreamController.add (dart:async/stream_controller.dart:596:5)
#13     _StreamSinkImpl.add (dart:io/io_sink.dart:136:17)
#14     _IOSinkImpl.write (dart:io/io_sink.dart:269:5)
#15     _Socket.write (dart:io-patch/socket_patch.dart:2190:36)
#16     _StdSink.write (dart:io/stdio.dart:338:11)
#17     StdioProcess.run (package:testing/src/stdio_process.dart:68:21)
<asynchronous suspension>
#18     runDiff (file:///opt/s/w/ir/pkg/front_end/test/utils/kernel_chain.dart:546:28)
<asynchronous suspension>
#19     MatchContext.match (file:///opt/s/w/ir/pkg/front_end/test/utils/kernel_chain.dart:108:23)
<asynchronous suspension>
#20     ChainContext.run.doStep.<anonymous closure> (package:testing/src/chain.dart:188:22)
<asynchronous suspension>


To re-run this test, run:

   dart pkg/front_end/test/unit_test_suites.dart -p pkg/front_end/test/fasta/text_serialization/extension_types/access_setter_as_getter

The test has outcome Crash, but was expected to have outcome(s) {ExpectationFileMismatchSerialized}. You might have to update the status file to the new outcome
There's a status entry looking something like

@johnniwinther
Copy link
Member

@whesse We are seeing this from time to time. Do you have any idea what can cause this?

@aam
Copy link
Contributor Author

aam commented Sep 15, 2022

@whesse
Copy link
Contributor

whesse commented Sep 22, 2022

This failure in random tests is happening in the package testing and pkg/front_end/test/utils/kernel_chain.dart front end testing system.

If the "git diff" command run by Process.run fails or crashes, then the test is shown as a failure.
There could be better handling of a failure of this command to run, perhaps showing the stderr from the process,
and marking the test step as an infra failure, not saying that this single test has failed.

StdioProcess process = await StdioProcess.run(
   "git", <String>["diff", "--no-index", "-u", expected.toFilePath(), "-"],
   input: actual, runInShell: true);
   return process.output;

There is already a workaround on Windows for this subprocess call, because it is flaky on Windows.

https://dart.googlesource.com/sdk/+/refs/heads/main/pkg/front_end/test/utils/kernel_chain.dart#480

@aam
Copy link
Contributor Author

aam commented Nov 10, 2022

another SocketException: Write failed (OS Error: Broken pipe, errno = 32), port = 0 failure

https://logs.chromium.org/logs/dart/buildbucket/cr-buildbucket/8797869262426419329/+/u/test_results/new_test_failures__logs_

@aam
Copy link
Contributor Author

aam commented Jan 27, 2023

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-front-end Use area-front-end for front end / CFE / kernel format related issues. gardening
Projects
None yet
Development

No branches or pull requests

4 participants