dart-lang / sdk

The Dart SDK, including the VM, JS and Wasm compilers, analysis, core libraries, and more.
https://dart.dev
BSD 3-Clause "New" or "Revised" License
10.11k stars 1.57k forks source link

pub build failing #22444

Closed DartBot closed 9 years ago

DartBot commented 9 years ago

This issue was originally filed by ch...@lashbrookdesigns.com


What steps will reproduce the problem? 1.added a Timer.run line of code, specifically

Timer.run(() => $["barcodeinput"].focus());

Commenting out this line allows the build to work. (Though it looks like the crash may be related to something in lawndart. ???) Execution of the code in Dartium works just fine.

  1. ran pub build from a command line

What is the expected output? What do you see instead?

Build should complete. Build fails

What version of the product are you using?

Dart SDK version 1.8.5

On what operating system?

Windows 8.1

What browser (if applicable)?

N/A

Please provide any additional information below.

Here is the output from the attempted build:

Loading source assets... Loading polymer/src/build/mirrors_remover, code_transformers/src/delete_file, ob serve and smoke/src/default_transformer transformers... Loading polymer transformers... Building Lashbrook_Sales... [Warning from polymer (Linter) on Lashbrook_Sales|lib/views/app_view/app_view.ht ml]: line 3, column 1 of lib\views\app_view\app_view.html: Invalid URL to reach to an other package: packages/Lashbrook_Sales/views/app_view/rings_view.html. Path rea ching to other packages must first reach up all the way to the packages director y. For example, try changing the URL to: ../../../../packages/Lashbrook_Sales/vi ews/app_view/rings_view.html. See http://goo.gl/5HPeuP#code_transformers_2 for d etails. <link rel="import" href="packages/Lashbrook_Sales/views/app_view/rings_view.html "> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^ [Warning from polymer (Linter) on Lashbrook_Sales|lib/views/app_view/app_view.ht ml]: line 4, column 1 of lib\views\app_view\app_view.html: Invalid URL to reach to an other package: packages/Lashbrook_Sales/views/app_view/login_view.html. Path rea ching to other packages must first reach up all the way to the packages director y. For example, try changing the URL to: ../../../../packages/Lashbrook_Sales/vi ews/app_view/login_view.html. See http://goo.gl/5HPeuP#code_transformers_2 for d etails. <link rel="import" href="packages/Lashbrook_Sales/views/app_view/login_view.html "> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^ [Warning from polymer (Linter) on Lashbrook_Sales|lib/views/app_view/indexdb.htm l]: line 1, column 1 of lib\views\app_view\indexdb.html: (from html5lib) Unexpected non-space characters. Expected DOCTYPE. See http://goo.gl/5HPeuP#polymer_40 for details. import 'dart:indexed_db' as idb; ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [Warning from polymer (Linter) on Lashbrook_Sales|web/signature/PHPMailer-master /examples/contents.html]: line 1, column 1 of web\signature\PHPMailer-master\examples\contents.html: (from  html5lib) Erroneous DOCTYPE. See http://goo.gl/5HPeuP#polymer_40 for details. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.or g/TR/html4/loose.dtd"> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^ [Warning from polymer (Linter) on Lashbrook_Sales|lib/views/app_view/app_view.ht ml]: line 10, column 5 of lib\views\app_view\app_view.html: custom element with name "login-view" not found. See http://goo.gl/5HPeuP#polymer_11 for details. <login-view> ^^^^^^^^^^^^ [Warning from polymer (Linter) on Lashbrook_Sales|lib/views/app_view/app_view.ht ml]: line 13, column 5 of lib\views\app_view\app_view.html: custom element with name "rings-view" not found. See http://goo.gl/5HPeuP#polymer_11 for details. <rings-view> ^^^^^^^^^^^^ [Warning from polymer (BuildFilter) on Lashbrook_Sales|web/signature/PHPMailer-m aster/examples/contents.html]: line 1, column 1 of web\signature\PHPMailer-master\examples\contents.html: (from  html5lib) Erroneous DOCTYPE. See http://goo.gl/5HPeuP#polymer_40 for details. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.or g/TR/html4/loose.dtd"> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^ [Info from Dart2JS]: Compiling Lashbrook_Sales|web/index.html_bootstrap.dart... [Dart2JS on Lashbrook_Sales|web/index.html_bootstrap.dart]: 1 warning(s) suppressed in package:lawndart. Exhausted heap space, trying to allocate 536720 bytes.

The compiler crashed when compiling this element. The compiler is broken.

When compiling the above element, the compiler crashed. It is not possible to tell if this is caused by a problem in your program or not. Regardless, the compiler should not crash.

The Dart team would greatly appreciate if you would take a moment to report this problem at http://dartbug.com/new.

Please include the following information:

* the name and version of your operating system,

* the Dart SDK build number (build number could not be determined), and

* the entire message you see here (including the full stack trace   below as well as the source location above).

Build error: Transform Dart2JS on Lashbrook_Sales|web/index.html_bootstrap.dart threw error: Out of Memory e:\b\build\slave\dart-editor-win-stable\build\dart\pkg\compiler\lib\src\compiler .dart 1162 Compiler.run.<fn> dart:async                                _Future._propagateToListeners.handleError e:\b\build\slave\dart-editor-win-stable\build\dart\pkg\compiler\lib\src\js_emitt er\code_emitter_task.dart 344 CodeEmitterTask.assembleProgram.<fn> .                                ... .                                ... dart:isolate                                _RawReceivePortImpl._handleMessage Build failed.

iposva-google commented 9 years ago

Added Area-Dart2JS, Triaged labels.

DartBot commented 9 years ago

This comment was originally written by charlesdailni...@gmail.com


Update: The timer.run doesn't seem to have any bearing on it whatsoever. The issue seems to occur with the lawndart stuff -- but it is intermittent, apparently.

DartBot commented 9 years ago

This comment was originally written by charlesdailni...@gmail.com


I am now seeing the same issue occur without any of the lawndart code in the build. Which leaves me at a loss as to what's causing it.


[Info from Dart2JS]: Compiling Lashbrook_Sales|web/index.html_bootstrap.dart... Exhausted heap space, trying to allocate 17312 bytes.

The compiler crashed when compiling this element. The compiler is broken.

When compiling the above element, the compiler crashed. It is not possible to tell if this is caused by a problem in your program or not. Regardless, the compiler should not crash.

The Dart team would greatly appreciate if you would take a moment to report this problem at http://dartbug.com/new.

Please include the following information:

* the name and version of your operating system,

* the Dart SDK build number (build number could not be determined), and

* the entire message you see here (including the full stack trace   below as well as the source location above).

Build error: Transform Dart2JS on Lashbrook_Sales|web/index.html_bootstrap.dart threw error: Out of Memory e:\b\build\slave\dart-editor-win-stable\build\dart\pkg\compiler\lib\src\compiler .dart 1162 Compiler.run.<fn> dart:async                       _Future._propagateToListeners.handleError e:\b\build\slave\dart-editor-win-stable\build\dart\pkg\compiler\lib\src\js_backe nd\backend.dart 1216 JavaScriptBackend.assembleProgram .                       ... .                       ... dart:isolate                       _RawReceivePortImpl._handleMessage Build failed.

DartBot commented 9 years ago

This comment was originally written by charlesdailni...@gmail.com


I hope these updates are useful. Here's more data that the build told me to upload on my latest attempt (running pub --trace 'build')

[Info from Dart2JS]: Compiling Lashbrook_Sales|web/index.html_bootstrap.dart... [Info from Dart2JS]: Took 0:00:15.663872 to compile Lashbrook_Sales|web/index.html_bootstrap.dart. Exhausted heap space, trying to allocate 281904 bytes. Out of Memory e:\b\build\slave\dart-editor-win-stable\build\dart\sdk\lib_internal\pub_generat ed\lib\src\command\build.dart 95 BuildCommand.onRunTransformerCommand.<fn>.<fn

dart:async                                    _Future._propagateToListeners.handleError e:\b\build\slave\dart-editor-win-stable\build\dart\sdk\lib_internal\pub_generat ed\lib\src\command\build.dart 122 _writeAsset.<fn>.join0.join1 e:\b\build\slave\dart-editor-win-stable\build\dart\sdk\lib_internal\pub_generat ed\lib\src\command\build.dart 129 _writeAsset.<fn>.join0 e:\b\build\slave\dart-editor-win-stable\build\dart\sdk\lib_internal\pub_generat ed\lib\src\command\build.dart 135 _writeAsset.<fn> dart:isolate                                    _RawReceivePortImpl._handleMessage This is an unexpected error. Please run

    pub --trace 'build'

and include the results in a bug report on http://dartbug.com/new.

F:\Dropbox\wamp\www\Sales>pub --trace 'build' Could not find a command named "'build'".

Available commands:   build Apply transformers to build a package.   cache Work with the system cache.   deps Print package dependencies.   downgrade Downgrade the current package's dependencies to oldest versions.   get Get the current package's dependencies.   global Work with global packages.   help Display help information for Pub.   publish Publish the current package to pub.dartlang.org.   run Run an executable from a package.   serve Run a local web development server.   upgrade Upgrade the current package's dependencies to latest versions.   uploader Manage uploaders for a package on pub.dartlang.org.   version Print pub version.

---- Log transcript ---- FINE: Pub 1.8.5 IO : Spawning "cmd /c ver" in F:\Dropbox\wamp\www\Sales. IO : Finished ver. Exit code 0.     | stdout:     | |     | | Microsoft Windows [Version 6.3.9600]     | Nothing output on stderr. ERR : Could not find a command named "'build'".     |     | Available commands:     | build Apply transformers to build a package.     | cache Work with the system cache.     | deps Print package dependencies.     | downgrade Downgrade the current package's dependencies to oldest versi ons.     | get Get the current package's dependencies.     | global Work with global packages.     | help Display help information for Pub.     | publish Publish the current package to pub.dartlang.org.     | run Run an executable from a package.     | serve Run a local web development server.     | upgrade Upgrade the current package's dependencies to latest version s.     | uploader Manage uploaders for a package on pub.dartlang.org.     | version Print pub version. FINE: Exception type: UsageException FINE: e:\b\build\slave\dart-editor-win-stable\build\dart\sdk\lib_internal\pub_g enerated\lib\src\command.dart 71 PubCommand.usageErrorWithCommands     | e:\b\build\slave\dart-editor-win-stable\build\dart\sdk\lib_internal\pub_g enerated\bin\pub.dart 223 invokeCommand.<fn>.continue0     | e:\b\build\slave\dart-editor-win-stable\build\dart\sdk\lib_internal\pub_g enerated\bin\pub.dart 239 invokeCommand.<fn>     | dart:isolate                                   _RawReceivePortImpl._handleMessage     | ===== asynchronous gap ===========================     | dart:async                            _Completer.completeError     | e:\b\build\slave\dart-editor-win-stable\build\dart\sdk\lib_internal\pub_g enerated\bin\pub.dart 241 invokeCommand.<fn>     | dart:isolate                            _RawReceivePortImpl._handleMessage     | ===== asynchronous gap ===========================     | dart:async                                  scheduleMicrotask     | e:\b\build\slave\dart-editor-win-stable\build\dart\sdk\lib_internal\pub_g enerated\bin\pub.dart 145 invokeCommand     | e:\b\build\slave\dart-editor-win-stable\build\dart\sdk\lib_internal\pub_g enerated\bin\pub.dart 98 runPub.<fn>     | dart:async                                  Future.Future.sync     | e:\b\build\slave\dart-editor-win-stable\build\dart\sdk\lib_internal\pub_g enerated\lib\src\utils.dart 98 captureErrors.<fn>     | package:stack_trace/src/chain.dart 78                                  Chain.capture     | e:\b\build\slave\dart-editor-win-stable\build\dart\sdk\lib_internal\pub_g enerated\lib\src\utils.dart 112 captureErrors     | e:\b\build\slave\dart-editor-win-stable\build\dart\sdk\lib_internal\pub_g enerated\bin\pub.dart 97 runPub     | e:\b\build\slave\dart-editor-win-stable\build\dart\sdk\lib_internal\pub_g enerated\bin\pub.dart 84 main.<fn>     | dart:isolate                                  _RawReceivePortImpl._handleMessage

---- End log transcript ----

DartBot commented 9 years ago

This comment was originally written by charlesdailni...@gmail.com


I should have looked at that last comment before posting it. I did it wrong.

Here is the correct build. However, it didn't tell me to run the trace this time, so I'm not entirely sure the same thing is going on.

F:\Dropbox\wamp\www\Sales>pub --trace build Loading source assets... Loading polymer/src/build/mirrors_remover, code_transformers/src/delete_file, ob serve and smoke/src/default_transformer transformers... Loading polymer transformers... Building Lashbrook_Sales... Exhausted heap space, trying to allocate 544 bytes. Exhausted heap space, trying to allocate 544 bytes. Exhausted heap space, trying to allocate 288 bytes. Exhausted heap space, trying to allocate 48 bytes. Exhausted heap space, trying to allocate 160 bytes. Exhausted heap space, trying to allocate 48 bytes. Exhausted heap space, trying to allocate 64 bytes. Exhausted heap space, trying to allocate 64 bytes. Exhausted heap space, trying to allocate 80 bytes. Out of Memory dart:collection _HashMap&&_LinkedHashMapMixin.forEach . ... . ... dart:isolate _RawReceivePortImpl._handleMessage ===== asynchronous gap =========================== dart:async                                   _Future.catchError e:\b\build\slave\dart-editor-win-stable\build\dart\sdk\lib_internal\pub_generat ed\lib\src\command\build.dart 94 BuildCommand.onRunTransformerCommand.<fn> dart:isolate                                   _RawReceivePortImpl._handleMessage ===== asynchronous gap =========================== dart:async                                     scheduleMicrotask e:\b\build\slave\dart-editor-win-stable\build\dart\sdk\lib_internal\pub_generat ed\lib\src\command\build.dart 52 BuildCommand.onRunTransformerCommand e:\b\build\slave\dart-editor-win-stable\build\dart\sdk\lib_internal\pub_generat ed\lib\src\command\barback.dart 63 onRun dart:async                                     Future.Future.sync e:\b\build\slave\dart-editor-win-stable\build\dart\sdk\lib_internal\pub_generat ed\lib\src\command.dart 206 PubCommand.run e:\b\build\slave\dart-editor-win-stable\build\dart\sdk\lib_internal\pub_generat ed\bin\pub.dart 164 invokeCommand.<fn>.break0.join0 e:\b\build\slave\dart-editor-win-stable\build\dart\sdk\lib_internal\pub_generat ed\bin\pub.dart 177 invokeCommand.<fn>.break0 e:\b\build\slave\dart-editor-win-stable\build\dart\sdk\lib_internal\pub_generat ed\bin\pub.dart 235 invokeCommand.<fn>.continue0 e:\b\build\slave\dart-editor-win-stable\build\dart\sdk\lib_internal\pub_generat ed\bin\pub.dart 239 invokeCommand.<fn> dart:isolate                                     _RawReceivePortImpl._handleMessage ===== asynchronous gap =========================== dart:async                            scheduleMicrotask e:\b\build\slave\dart-editor-win-stable\build\dart\sdk\lib_internal\pub_generat ed\bin\pub.dart 145 invokeCommand e:\b\build\slave\dart-editor-win-stable\build\dart\sdk\lib_internal\pub_generat ed\bin\pub.dart 98 runPub.<fn> dart:async                            Future.Future.sync e:\b\build\slave\dart-editor-win-stable\build\dart\sdk\lib_internal\pub_generat ed\lib\src\utils.dart 98 captureErrors.<fn> package:stack_trace/src/chain.dart 78                            Chain.capture e:\b\build\slave\dart-editor-win-stable\build\dart\sdk\lib_internal\pub_generat ed\lib\src\utils.dart 112 captureErrors e:\b\build\slave\dart-editor-win-stable\build\dart\sdk\lib_internal\pub_generat ed\bin\pub.dart 97 runPub e:\b\build\slave\dart-editor-win-stable\build\dart\sdk\lib_internal\pub_generat ed\bin\pub.dart 84 main.<fn> dart:isolate                            _RawReceivePortImpl._handleMessage

---- Log transcript ---- FINE: Pub 1.8.5 IO : Spawning "cmd /c ver" in F:\Dropbox\wamp\www\Sales. IO : Finished ver. Exit code 0.     | stdout:     | |     | | Microsoft Windows [Version 6.3.9600]     | Nothing output on stderr. FINE: Clean up system cache temp directory C:\Users\Charles\AppData\Roaming\Pub\ Cache_temp. IO : Deleting directory build. FINE: Loading asset environment... FINE: Loading package graph... FINE: Loading package graph finished (0.1s). FINE: Initializing barback... FINE: Serving packages on localhost:0. MSG : Loading source assets... FINE: Providing sources for core_elements|lib. FINE: Providing sources for polymer|lib. FINE: Providing sources for paper_elements|lib. FINE: Providing sources for smoke|lib. FINE: Providing sources for Lashbrook_Sales|lib. FINE: Loading source assets finished (0.5s). FINE: Provided sources. FINE: Loading transformers... FINE: Transformer dependencies:     | polymer: smoke/src/default_transformer     | polymer/src/build/mirrors_remover: -     | code_transformers/src/delete_file: -     | observe: -     | smoke/src/default_transformer: - FINE: Using cached transformer snapshot. MSG : Loading polymer/src/build/mirrors_remover, code_transformers/src/delete_fi le, observe and smoke/src/default_transformer transformers... FINE: Loading transformers from [polymer/src/build/mirrors_remover, code_transfo rmers/src/delete_file, observe, smoke/src/default_transformer] FINE: Spawning isolate from F:\Dropbox\wamp\www\Sales.pub/transformers\transfor mers.snapshot. FINE: Loading polymer/src/build/mirrors_remover, code_transformers/src/delete_fi le, observe and smoke/src/default_transformer transformers finished (0.0s). FINE: Transformers from polymer/src/build/mirrors_remover: {MirrorsRemover} FINE: Transformers from code_transformers/src/delete_file: {DeleteFile} FINE: Transformers from observe: {Observable} FINE: Transformers from smoke/src/default_transformer: {Default} MSG : Loading polymer transformers... FINE: Loading transformers from [polymer] IO : Created temp directory C:\Users\Charles\AppData\Local\Temp\pub_b8c7458e-b7 19-11e4-828b-6c71d9df3438 IO : Writing 176 characters to text file C:\Users\Charles\AppData\Local\Temp\pu b_b8c7458e-b719-11e4-828b-6c71d9df3438\runInIsolate.dart. FINE: [Fine from Default on smoke|lib/src/implementation.dart]:     | Took 0.2s (0.0s awaiting secondary inputs). FINE: [Fine from Observable on polymer|lib/src/instance.dart]:     | Took 0.2s (0.0s awaiting secondary inputs). IO : Deleting directory C:\Users\Charles\AppData\Local\Temp\pub_b8c7458e-b719-1 1e4-828b-6c71d9df3438. FINE: Loading polymer transformers finished (0.8s). FINE: Transformers from polymer: {Instance of 'PolymerTransformerGroup'} FINE: Transformers from polymer: {Instance of 'PolymerTransformerGroup'} FINE: Transformers from polymer: {Instance of 'PolymerTransformerGroup'} FINE: Loading transformers finished (2.4s). FINE: Initializing barback finished (3.0s). FINE: Loading asset environment finished (3.2s). MSG : Building Lashbrook_Sales... FINE: Providing sources for Lashbrook_Sales|web. ERR : Out of Memory FINE: Exception type: OutOfMemoryError ERR : dart:collection _HashMap&&_LinkedHashMapMixin.forEach     | . ...     | . ...     | dart:isolate _RawReceivePortImpl._handleMessage     | ===== asynchronous gap ===========================     | dart:async                                         _Future.catchError     | e:\b\build\slave\dart-editor-win-stable\build\dart\sdk\lib_internal\pub_g enerated\lib\src\command\build.dart 94 BuildCommand.onRunTransformerCommand.<fn

    | dart:isolate                                         _RawReceivePortImpl._handleMessage     | ===== asynchronous gap ===========================     | dart:async                                           scheduleMicrotask     | e:\b\build\slave\dart-editor-win-stable\build\dart\sdk\lib_internal\pub_g enerated\lib\src\command\build.dart 52 BuildCommand.onRunTransformerCommand     | e:\b\build\slave\dart-editor-win-stable\build\dart\sdk\lib_internal\pub_g enerated\lib\src\command\barback.dart 63 onRun     | dart:async                                           Future.Future.sync     | e:\b\build\slave\dart-editor-win-stable\build\dart\sdk\lib_internal\pub_g enerated\lib\src\command.dart 206 PubCommand.run     | e:\b\build\slave\dart-editor-win-stable\build\dart\sdk\lib_internal\pub_g enerated\bin\pub.dart 164 invokeCommand.<fn>.break0.join0     | e:\b\build\slave\dart-editor-win-stable\build\dart\sdk\lib_internal\pub_g enerated\bin\pub.dart 177 invokeCommand.<fn>.break0     | e:\b\build\slave\dart-editor-win-stable\build\dart\sdk\lib_internal\pub_g enerated\bin\pub.dart 235 invokeCommand.<fn>.continue0     | e:\b\build\slave\dart-editor-win-stable\build\dart\sdk\lib_internal\pub_g enerated\bin\pub.dart 239 invokeCommand.<fn>     | dart:isolate                                           _RawReceivePortImpl._handleMessage     | ===== asynchronous gap ===========================     | dart:async                                  scheduleMicrotask     | e:\b\build\slave\dart-editor-win-stable\build\dart\sdk\lib_internal\pub_g enerated\bin\pub.dart 145 invokeCommand     | e:\b\build\slave\dart-editor-win-stable\build\dart\sdk\lib_internal\pub_g enerated\bin\pub.dart 98 runPub.<fn>     | dart:async                                  Future.Future.sync     | e:\b\build\slave\dart-editor-win-stable\build\dart\sdk\lib_internal\pub_g enerated\lib\src\utils.dart 98 captureErrors.<fn>     | package:stack_trace/src/chain.dart 78                                  Chain.capture     | e:\b\build\slave\dart-editor-win-stable\build\dart\sdk\lib_internal\pub_g enerated\lib\src\utils.dart 112 captureErrors     | e:\b\build\slave\dart-editor-win-stable\build\dart\sdk\lib_internal\pub_g enerated\bin\pub.dart 97 runPub     | e:\b\build\slave\dart-editor-win-stable\build\dart\sdk\lib_internal\pub_g enerated\bin\pub.dart 84 main.<fn>     | dart:isolate                                  _RawReceivePortImpl._handleMessage

---- End log transcript ----

floitschG commented 9 years ago

This looks like an out-of-memory issue.

Is the application you try to build big, or do you suspect a memory-leak?

If it's a big app, it might be worth a try to increase the heap-memory. On the command line that would be done by passing the "--old_gen_heap_size=XXX" option to the Dart VM.

I'm not sure how it's done with pub. I CCed a pub dev, who should be able to explain the necessary steps.


cc @munificent.

DartBot commented 9 years ago

This comment was originally written by charlesdailnielso...@gmail.com


As an experiment, I removed all images from the app, then ran a pub build. It ran smoothly and quickly. I'll run a few more this way and see if I can get a crash sans images (which is where any size in my app comes from).

DartBot commented 9 years ago

This comment was originally written by charlesdailnielson...@gmail.com


Okay, I have run 10 builds or so in a row with no issues now with the my images folder removed from the project. The size of this folder is around 2.8gig (project size without it is 15mb), and apparently the build cannot handle that consistently.

For now I'll work around by moving that folder out when I build and then copying it into the build afterwards.

sigmundch commented 9 years ago

Bob/Natalie - is it possible that pub/barback is trying to load all the images upfront for some reason?

@charlesdailnielson - could you share here what your pubspec.yaml looks like?


cc @nex3. Removed Area-Dart2JS label. Added Area-Pkg, Pkg-Barback labels.

DartBot commented 9 years ago

This comment was originally written by charlesdailni...@gmail.com


here's my pubspec.yaml. Pretty straightforward I think.

name: Lashbrook_Sales description: A Polymer Dart application. dependencies:   core_elements: any   intl: any   paper_elements: any   polymer: any   lawndart: any transformers:

munificent commented 9 years ago

The size of this folder is around 2.8gig (project size without it is 15mb)

That's quite large for a web app. :)

Pub shouldn't be reading the contents of those files into memory unless some transformer acts on them. But it will have some metadata for each file. How many images are in there?

DartBot commented 9 years ago

This comment was originally written by charlesdailni...@gmail.com


there are something around 12,000 images. It's inventory/products, and is only likely to grow. Of course, all that isn't loaded into the app. They'll just sit on the server and be available when accessed, etc. I have them in the project for testing purposes, etc., and didn't bother moving them out for the build process, not expecting that the amount of images would affect much of anything in the build process.

munificent commented 9 years ago

12,000 is large, but not outside the bounds of reason. I'd like to know more about where the memory is going.

I don't suppose it would be possible to share your project with one of us privately? We would obviously look at it only for testing this bug and delete it as soon as we were done.

DartBot commented 9 years ago

This comment was originally written by charlesdailni...@gmail.com


Yes, I can share it. As long as you promise not to make fun of my noob coding. :)

However, keep in mind that the pub build crash is intermittent. It has been happening a lot lately, but it is not consistent. Sometimes the builds work fine. Sometimes they don't. And there does not seem to be any rhyme or reason to it, except that without the images it has not crashed yet.

Give me directions to share.

munificent commented 9 years ago

As long as you promise not to make fun of my noob coding. :)

I promise. :)

However, keep in mind that the pub build crash is intermittent.

That's fine. I don't necessarily need it to crash, I just want to see where the memory is being used.

Give me directions to share.

I would:

  1. Zip up the whole package directory.
  2. Put that on Google drive. (You can just open Google Drive in your browser and drag and drop the file onto it.)
  3. Share it with me (rnystrom@google.com).

I'll let you know when I've downloaded it and you can remove it from Drive.

Does that work for you?

DartBot commented 9 years ago

This comment was originally written by charlesdailni...@gmail.com


since it's already in dropbox, it's a race to see if it uploads to google drive or dropbox first. I'll share whichever wins. :) It'll be a bit.

munificent commented 9 years ago

Hey, VM folks!

I tried running pub build on his project with observatory running. In the memory profile of the isolate where most of the work is happening, I see the numbers creep up over time. By the time the build is done, I see:

Old Generation used: 542.3MB of 558.1MB

The biggest offender is Context, which ends up with "Accumulated Size (New)" of 406.8MB.

That seems strange to me. That's code, right? Am I reading these numbers correctly?


cc @iposva-google. cc @johnmccutchan.

iposva-google commented 9 years ago

Context is the context of a closure, meaning all of the captured state such as variables which needs to be available when the closure is called and executes.

The code of closures is shared, which is why you are not seeing that grow.

munificent commented 9 years ago

Ah, thank you. So this means I have lots of closures hanging around in memory. That's probably a lot of async bodies, possibly long future chains.

I can do some more investigation to see if it's possible to do something there. Do you know if Observatory lets me which where (in the source code) these closures are created?

DartBot commented 9 years ago

This issue has been moved to dart-lang/barback#61.