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

Language/Libraries_and_Scripts/Scripts/top_level_main_t01.dart is a fork bomb on AOT #1137

Closed
athomas opened this issue Aug 10, 2021 · 3 comments
Assignees

Comments

@athomas
Copy link
Member

athomas commented Aug 10, 2021

The test used Platform.resolvedExecutable with the intention of finding the dart executable but on AOT configurations this will be out.snapshot (the test as AOT compiled executable), so the test starts a process of itself which starts a process of itself...

This causes Windows bots to run out of memory when running the test and Linux bots to timeout the test.

@sgrekhov sgrekhov self-assigned this Aug 11, 2021
@athomas
Copy link
Member Author

athomas commented Aug 11, 2021

@athomas
Copy link
Member Author

athomas commented Aug 11, 2021

simarm64 is also affected by the fork bomb somehow.

dart-bot pushed a commit to dart-lang/sdk that referenced this issue Aug 11, 2021
The top_level_main tests starts themselves via
Platform.resolvedExecutable which causes them to turn into a fork bombs
on AOT. On web, dart:io is not supported.

dart-lang/co19#1137

findProxy tests are timing out on all relevant platforms.

dart-lang/co19#1129

Cq-Include-Trybots: luci.dart.try:vm-kernel-precomp-nnbd-win-release-x64-try
Change-Id: If1e4d0c26d5d40cd60e5e8a8dd4600b85668da5e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/209706
Reviewed-by: William Hesse <whesse@google.com>
dart-bot pushed a commit to dart-lang/sdk that referenced this issue Aug 12, 2021
dart-lang/co19#1137

Change-Id: I32e81daed87ad8943023ad923fddd686b3b2362e
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/209961
Reviewed-by: William Hesse <whesse@google.com>
@sgrekhov
Copy link
Contributor

sgrekhov commented Aug 23, 2021

Problem here was not in use of Platform.resolvedExecutable on AOT configuration but in test itself. Platform.resolvedExecutable in case of AOT is .../sdk/out/ReleaseX64/dart_precompiled_runtime. But the tests tries to run the script in another file top_level_main_t01_lib.dart. To do that it did

String eScript = Platform.script.toString().replaceAll(".dart", "_lib.dart");

And then tried to run eScript. But in case of AOT Platform.script == .../sdk/out/ReleaseX64/generated_compilations/dartkp-strong-linux-release-x64/tests_co19_src_Language_Libraries_and_Scripts_Scripts_top_level_main_t01/out.aotsnapshot, so replacement didn't work and the test run itself once again. And again, and again...

To fix added // OtherResource=top_level_main_t01_lib.dart flag and check for the executable name. If it is not a dart then this is a case of AOT configuration and script and executable names must be adjusted

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants