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

fix: dart compiler ran out of memory trying to compile linker? #1644

Closed
eseidel opened this issue Jan 17, 2024 · 2 comments · Fixed by #1645
Closed

fix: dart compiler ran out of memory trying to compile linker? #1644

eseidel opened this issue Jan 17, 2024 · 2 comments · Fixed by #1645
Labels
bug Something isn't working

Comments

@eseidel
Copy link
Contributor

eseidel commented Jan 17, 2024

This actually looks like difficulty compiling the aot-tools.dill, not the linker itself running out of memory:

✗ Failed to link AOT files: Exception: Failed to link: Exhausted heap space, trying to allocate 35232 bytes.
Crash when compiling $HOME/shorebird/bin/cache/artifacts/aot-tools/9472e50354253fde3f2cdb25d8115f7aa6d3c68a/aot-tools:
Out of Memory

#0      _StringBase._concatRangeNative (dart:core-patch/string_patch.dart:962:78)
#1      _JsonStringStringifier.stringify (dart:convert/json.dart:968:19)
#2      SourceLibraryBuilder.addProblem (package:front_end/src/fasta/source/source_library_builder.dart:1868:52)
#3      SourceLoader.tokenize (package:front_end/src/fasta/source/source_loader.dart:949:24)
#4      _rootRunUnary (dart:async/zone.dart:1407:47)
#5      _CustomZone.runUnary (dart:async/zone.dart:1308:19)
#6      _FutureListener.handleValue (dart:async/future_impl.dart:162:18)
#7      Future._propagateToListeners.handleValueCallback (dart:async/future_impl.dart:846:45)
#8      Future._propagateToListeners (dart:async/future_impl.dart:875:13)
#9      Future._completeWithValue (dart:async/future_impl.dart:647:5)
#10     Future._asyncCompleteWithValue.<anonymous closure> (dart:async/future_impl.dart:721:7)
#11     _rootRun (dart:async/zone.dart:1399:13)
#12     _CustomZone.run (dart:async/zone.dart:1301:19)
#13     _CustomZone.bindCallback.<anonymous closure> (dart:async/zone.dart:1233:23)
#14     _microtaskLoop (dart:async/schedule_microtask.dart:40:21)
#15     _startMicrotaskLoop (dart:async/schedule_microtask.dart:49:5)
#16     _runPendingImmediateCallback (dart:isolate-patch/isolate_patch.dart:118:13)
#17     _Timer._runTimers (dart:isolate-patch/timer_impl.dart:405:11)
#18     _Timer._handleMessage (dart:isolate-patch/timer_impl.dart:429:5)
#19     _RawReceivePort._handleMessage (dart:isolate-patch/isolate_patch.dart:184:12)

 (2250.4s)
@eseidel eseidel added the bug Something isn't working label Jan 17, 2024
@eseidel
Copy link
Contributor Author

eseidel commented Jan 17, 2024

I'm confused as to why source_library_builder would be called at all. This should be compiling a .dill file, which is kernel, not source.

@eseidel
Copy link
Contributor Author

eseidel commented Jan 17, 2024

I think what's going on is the customer is trying to release to an older version of Flutter with our newer shorebird client, which is trying to execute a macho file as a .dart file. :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant