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

Fails to map snapshot on Ampere Altra with 64k page size #56823

Closed
RossComputerGuy opened this issue Sep 30, 2024 · 3 comments
Closed

Fails to map snapshot on Ampere Altra with 64k page size #56823

RossComputerGuy opened this issue Sep 30, 2024 · 3 comments
Labels
area-vm Use area-vm for VM related issues, including code coverage, and the AOT and JIT backends. triage-automation See https://github.com/dart-lang/ecosystem/tree/main/pkgs/sdk_triage_bot. type-bug Incorrect behavior (everything from a crash to more subtle misbehavior)

Comments

@RossComputerGuy
Copy link

RossComputerGuy commented Sep 30, 2024

When building Flutter on my Ampere Altra running NixOS and using a 64k page size, I get this scary abort:

../../runtime/bin/snapshot_utils.cc: 154: error: Failed to memory map snapshot: /nix/store/gjvyzckkyq2s57ajcnxy3682bj06r9gx-flutter-3.22.0-unwrapped/bin/cache/flutter_tools.snapshot


===== CRASH =====
si_signo=Segmentation fault(11), si_code=SEGV_MAPERR(1), si_addr=0x10
Aborting reentrant request for stack trace.
/nix/store/yja2i691gbdxl6v1hd7ccnym3zqgl11i-stdenv-linux/setup: line 1582:   282 Aborted                 (core dumped) $out/bin/flutter config --android-studio-dir $HOME

When I build Flutter applications, I get no errors and no messages to the terminal at all. This seems like Dart isn't set up to handle a 64k page size which my system uses for better compiling performance. Meanwhile, Flutter and Dart compile easily on my MBP running NixOS which is using a 16k page size. In this case, I was building/using Flutter 3.22.0 but it seems every version of Flutter in Nixpkgs has this problem. It's best we get this issue fixed as more hardware which utilizes ARM may be running large page sizes (beyond 4k or even 16k).

To reproduce, use CONFIG_ARM64_64K_PAGES in the kernel config and try building Flutter or try building any Flutter applications.

@dart-github-bot
Copy link
Collaborator

Summary: The user is experiencing a crash when building Flutter on an Ampere Altra system with a 64k page size. The issue appears to be related to Dart's inability to handle large page sizes, resulting in a failure to map the snapshot file.

@dart-github-bot dart-github-bot added area-vm Use area-vm for VM related issues, including code coverage, and the AOT and JIT backends. triage-automation See https://github.com/dart-lang/ecosystem/tree/main/pkgs/sdk_triage_bot. type-bug Incorrect behavior (everything from a crash to more subtle misbehavior) labels Sep 30, 2024
@a-siva
Copy link
Contributor

a-siva commented Sep 30, 2024

//cc @rmacnak-google

@rmacnak-google
Copy link
Contributor

This was fixed in https://dart-review.googlesource.com/c/sdk/+/368525.

Please try Flutter 3.24 or later.

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. triage-automation See https://github.com/dart-lang/ecosystem/tree/main/pkgs/sdk_triage_bot. type-bug Incorrect behavior (everything from a crash to more subtle misbehavior)
Projects
None yet
Development

No branches or pull requests

4 participants