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

Bundler freezes since 1.8.0 #1331

Closed
jpergler opened this issue May 9, 2018 · 61 comments
Closed

Bundler freezes since 1.8.0 #1331

jpergler opened this issue May 9, 2018 · 61 comments

Comments

@jpergler
Copy link

jpergler commented May 9, 2018

🐛 Bug report

🤔 Expected Behavior

The bundler should finish the process.

😯 Current Behavior

Bundler freezes on build and does not finish at all. Previously I had version 1.7.0 and sometimes it was frozen as well but that was only several times and when restarted it mostly worked. After upgrade to version 1.8.1 I tried to build approx. 20 times but it did not finish at all. No changes in project. I tried version 1.8.0 and it did not work either.

🔦 Context

My project is just index.html with references scripts. Typescript is used in project. App based on React and Bootstrap.

🌍 Your Environment

Software Version(s)
Parcel ^1.8.0
Node 9.11.1
npm 5.6.0
Operating System Windows 10
@DeMoorJasper
Copy link
Member

Could you provide an example repository for this?
Would be easier if we could reproduce it

@jpergler
Copy link
Author

jpergler commented May 9, 2018

@DeMoorJasper Well I cannot offer you the specific source code I am working on so I try to create similar project but it is not certain that it will reproduce as well.

Another interesting thing is that currently I am working with version 1.7.1 and just now I added some more files (specifically two .tsx files and one partial .scss file) and from now on the buid with parcel freezes significantly more often.

@jpergler
Copy link
Author

jpergler commented May 9, 2018

@DeMoorJasper Hmm I don't have the repo for reproduce but it seems to be machine related rather than project related.

I run the same project on my second computer and everything works fine. On my "broken" computer there was actually one more thing - when I changed something in some partial _partial.scss file than it did not recompile. That works on the second computer - either with 1.7.1 or 1.8.1.

So I checked the versions of tooling and I got Node in version 8.9.4 on the second computer. So I went to the "broken" computer, uninstalled Node and installed the same version 8.9.4. Now it works just fine.

I also then updated Parcel to latest (1.8.1) and it works just fine as well, really fast.

So it seems to be problem with Node version 9.11.1 or maybe 9.*.

@DeMoorJasper
Copy link
Member

That's strange glad you figured it out though :)

I guess I can close this off if it's a node.js bug?

@jpergler
Copy link
Author

jpergler commented May 9, 2018

For the matter of the original issue yes you can close it, downgrade to Node.js version 8.9.4 resolved the problem. The rest depends on whether you want to investigate or somehow solve the issue for Node.js 9.

@Hammster
Copy link
Contributor

Hammster commented May 9, 2018

My bundle also froze today on node 8.9.3, i was not able to pin down the reason before i left the office and i'm on vacation until monday.

@megalithic
Copy link

Chiming in, on node 8.11.1, and a clean install of parcel-bundler 1.8.1 via yarn. it freezes during building with parcel app/javascript/application.js -d public/parcels --public-url /parcels; we are running inside of a rails project using parcel-rails (to be completely transparent, not sure if that is the cause or not). Parcel 1.6.2 (where we were previous to this) builds fine.

@benhutton
Copy link

I think I'm seeing this too, on node 8.11.1 and parcel 1.8.1. It does build a few files successfully, then sits at "Building styles.scss..."

@DeMoorJasper I'm gonna drop some logging statements in the source and see if I can give ya'll something more precise to look into.

@benhutton
Copy link

@DeMoorJasper I'll keep digging, but it looks like this line is never completing: https://github.com/parcel-bundler/parcel/blob/master/src/Asset.js#L181

It's also notable that we have a bunch of files all named styles.scss (in different directories), and it seems to "freeze" on a bunch of those all being processed in parallel by the worker farm.

Does this idea of files with the same name bring anything to mind?

@Hammster
Copy link
Contributor

Hammster commented May 10, 2018

@benhutton since you mention this. For me it happened on a section where all components got compiled. All of them are named index.vue

@mririgoyen
Copy link

mririgoyen commented May 11, 2018

We are also seeing this behavior.
Parcel 1.8.1
Node 10.1.0
yarn 1.6.0
macOS

Parcel will just freeze "Building something..." and never finish. Killing the process and restarting doesn't help. Very infrequently, it will finish.

@megalithic
Copy link

@benhutton / @Hammster just to confirm, we have similar file structures setup where we have a lot of files named the same, under different folders, index.tsx for us for react/typescript files.

@benhutton
Copy link

To add another wrinkle (which @goyney hints at): if we kill and re-run it enough times, eventually it will finish (so things are getting put into cache and that keeps them from breaking it?)

@DeMoorJasper
Copy link
Member

DeMoorJasper commented May 11, 2018

Would love to dig into this if anyone could provide a test repository.

@benhutton
Copy link

It's interesting that we all seem to be hanging on different file types. For me, it's scss. For @Hammster, it's vue. For @megalithic, it's tsx. Does that tell us anything @DeMoorJasper?

@DeMoorJasper
Copy link
Member

That tells us it's not related to a specific compiler, but not much more.
I originally thought it was a node 8 issue, but apparently it also happens on node 10.

@benhutton
Copy link

@DeMoorJasper I've just narrowed my problems down to this line never finishing: https://github.com/parcel-bundler/parcel/blob/master/src/assets/SASSAsset.js#L57

Looks like I've got 4 styles.scss files hung at the same time. Here's what opts looks like for those 4 files, right as things freeze.:

{ includePaths: [ '/home/ben/projects/dg/app/components/daily_email' ],                                   
  data: '@import "../../client/styles/_settings/_legacy_settings";\n@import "../../client/styles/_mixins/_text";\n\n.daily-email {\n  background-color: whitesmoke;\n  padding-top: 60px;\n  overflow: hidden;\n  color: #333333;\n}\n\n.daily-email__inner {\n  display: flex;\n  flex-direction: row;\n  flex-wrap: wrap;\n  justify-content: center;\n  align-items: center;\n}\n\n.daily-email__proposition,\n.daily-email__device-holder {\n  box-sizing: border-box;\n  display: flex;\n  flex-direction: column;\n  width: 50%;\n}\n\n.daily-email__proposition {\n  text-align: right;\n  padding-right: 50px;\n  padding-left: calc(50% - 450px);\n}\n\n.daily-email__proposition .error-message {\n  margin-top: 12px;\n  margin-bottom: -12px;\n}\n\n.daily-email__proposition .error-message > em {\n  background-color: #ffff66;\n  font-size: 13px;\n}\n\n.daily-email h1 {\n  @include text($size: 42px, $weight: bold);\n  margin-bottom: 12px;\n}\n\n.daily-email p {\n  @include text($size: 18px);\n}\n\n.daily-email__inputs {\n  display: flex;\n  flex-direction: row;\n  padding: 24px 0;\n  justify-content: flex-end;\n}\n\n.daily-email__field {\n  -webkit-appearance: none;\n  -moz-appearance: none;\n  appearance: none;\n  box-shadow: none;\n  outline: none;\n  border-radius: 0;\n  box-sizing: border-box;\n  font-size: 13px;\n  width: 60%;\n  background-color: #ffffff;\n  border: 1px solid rgba(0,0,0,.3);\n  border-right: 0;\n  margin: 0;\n  padding: 0 12px;\n  line-height: 40px;\n}\n\n.daily-email__button {\n  box-sizing: border-box;\n  font-size: 13px;\n  width: 30%;\n  border: 0;\n  outline: none;\n  padding: 0;\n  margin: 0;\n  line-height: 40px;\n  padding: 0 12px;\n  background: $dg-red;\n  border: 1px solid $dg-red;\n  text-align: center;\n  color: #ffffff;\n  cursor: pointer;\n\n  /* Fixes rounded corners bug in Chrome */\n  -webkit-appearance: none;\n  -webkit-border-radius: 0;\n}\n\n.daily-email__device-holder {\n  padding-left: 50px;\n  padding-right: 50px;\n}\n\n.daily-email__device {\n  background-image: url(\'../../assets/images/daily_email_device.svg\');\n  background-repeat: no-repeat;\n  background-size: 100% auto;\n  box-sizing: border-box;\n  display: block;\n  height: 450px;\n  width: 360px;\n  border-radius: 55px 55px 0 0;\n  box-shadow: 30px 20px 6px rgba(0,0,0,.2);\n  padding-top: 90px;\n  padding-left: 23px;\n  padding-right: 23px;\n  padding-bottom: 0;\n\n  .daily-email__example {\n    overflow: scroll;\n    -webkit-overflow-scrolling: touch;\n    height: 100%;\n    -ms-overflow-style: none;\n\n    > img {\n      width: 100%;\n      margin: 0;\n      padding: 0;\n    }\n  }\n}\n\n\n@media screen and (max-width: 1024px) {\n\n  .daily-email__proposition {\n    padding-right: 0px;\n  }\n}\n\n\n@media screen and (max-width: 980px) {\n\n  .daily-email {\n    padding-top: 30px;\n  }\n\n  .daily-email h1 {\n    @include text($size: 36px);\n  }\n\n  .daily-email p {\n    @include text($size: 18px);\n  }\n\n  .daily-email__inner {\n    flex-direction: column;\n  }\n\n  .daily-email__inputs {\n    justify-content: center;\n    margin-left: auto;\n    margin-right: auto;\n    width: 70%;\n  }\n\n  .daily-email__device {\n    height: 300px;\n    width: 260px;\n    border-radius: 40px 40px 0 0;\n    box-shadow: 18px 10px 6px rgba(0,0,0,.2);\n    padding-top: 65px;\n    padding-left: 17px;\n    padding-right: 17px;\n  }\n\n  .daily-email__proposition {\n    width: auto;\n    text-align: center;\n    padding: 30px 0;\n    padding-right: 0px;\n  }\n\n  .daily-email__device-holder {\n    padding-left: 0;\n    padding-right: 0;\n    width: auto;\n  }\n}\n\n\n@media screen and (max-width: 620px) {\n\n  .home .daily-email {\n    padding-top: 0;\n    border-bottom: 1px solid #dcdcdc;\n    background-color: #ffffff;\n    margin-bottom: 30px;\n  }\n\n  .daily-email__inputs {\n    width: auto;\n  }\n\n  .daily-email h1 {\n    @include text($size: 30px, $weight: bold);\n    margin-left: 30px;\n    margin-right: 30px;\n    margin-bottom: 12px;\n  }\n\n  .daily-email p {\n    @include text($size: 16px);\n  }\n\n  .daily-email__inputs {\n    margin: 0 auto;\n    width: 100%;\n    padding-bottom: 0;\n  }\n}\n',                                                                                                             
  indentedSyntax: false,                                                                                  
  functions: { url: [Function: url] },                                                                    
  importer: [Function] }                                                                                  

{ includePaths: [ '/home/ben/projects/dg/app/components/explore_index' ],                                 
  data: '@import "../../client/styles/_settings/_legacy_settings";\n@import "../../client/styles/_mixins/_legacy_mixins";\n@import "../../client/styles/_mixins/_grid";\n@import "../../client/styles/_mixins/_text";\n\n.explore-indexes {\n  padding-top: 30px;\n  padding-bottom: 40px;\n  overflow: hidden;\n  clear: both;\n  @include grid-breakpoint(m) {\n    padding-bottom: 30px;\n    padding-top: 10px;\n  }\n}\n.explore-index {\n  margin-bottom: 10px;\n  padding: 15px 5px 10px;\n  border: 1px solid #dddddd;\n  @include grid-breakpoint(m, 10px) {\n    @include span(3, 6);\n    border: 0;\n  }\n  @include grid-breakpoint(l, 0) {\n    @include span(3);\n  }\n  @include grid-breakpoint(xl, 0) {\n    @include span(3);\n  }\n}\n.explore-index__heading {\n  @include text(resource-item-title);\n  padding: 0 5%;\n  .svg { @include transition(); }\n  svg {\n    margin: 3px 0 0 3px;\n    path { fill: map-get($text-colors, ultra-light); }\n  }\n  &:hover {\n    .svg { margin-left: 5px; }\n    svg  path { fill: $text-default-color; }\n  }\n}\n\n.explore-index__list {\n  padding-left: 5%;\n  dt {\n    @include text(label);\n    padding: 10px 0;\n  }\n  a {\n    @include transition();\n    @include text($size: xs);\n    color: map-get($text-colors, inline-link);\n    border-bottom: 1px solid transparent;\n    &:hover {\n      border-bottom: 1px solid $text-default-color;\n      color: $text-default-color;\n    }\n  }\n  dd {\n    padding-bottom: 6px;\n    overflow: hidden;\n    white-space: nowrap;\n    text-overflow: ellipsis;\n    font-size: 12px;\n    line-height: 13px;\n    color: #9fa2a6;\n  }\n}\n\n\n// Styles for explore indexes requiring multiple columns\n.overflow--top {\n  .explore-index {\n    border-bottom: none;\n    margin-bottom: 0;\n    padding-bottom: 0;\n    @include grid-breakpoint(m, 0) {\n      margin-bottom: 10px;\n      padding-bottom: 5px;\n    }\n  }\n}\n\n.overflow--bottom {\n  .explore-index {\n    border-top: none;\n    padding-top: 0;\n    @include grid-breakpoint(m, 0) {\n      padding-top: 5px;\n    }\n  }\n  .explore-index__heading,\n  .explore-index__list dt {\n    display: none;\n    @include grid-breakpoint(m, 0) {\n      display: block;\n      visibility: hidden;\n    }\n  }\n}\n',                                                                                                        
  indentedSyntax: false,                                                                                  
  functions: { url: [Function: url] },                                                                    
  importer: [Function] }                                                                                  

{ includePaths: [ '/home/ben/projects/dg/app/components/explore_list' ],                                  
  data: '@import "../../client/styles/_settings/_legacy_settings";\n@import "../../client/styles/_mixins/_legacy_mixins";\n@import "../../client/styles/_mixins/_grid";\n@import "../../client/styles/_mixins/_text";\n\n.explore-list {\n  margin-top: 50px;\n  @media(max-width: 619px) {\n    padding: 0 6px;\n  }\n}\n\n.explore-list__label { @include text(resource-item-title-small, $size: 16px, $line-height: 21px); }\n\n.explore-list__list {\n  @include clearfix();\n  padding: 0;\n  list-style: none;\n}\n\n.explore-list__list-item {\n  box-sizing: border-box;\n  display: block;\n  margin-top: -1px;\n  width: calc(50% + 15px);\n  border: 1px solid transparent;\n  float: left;\n  &:nth-child(odd) { margin-left: -15px; }\n  &:nth-child(even) { margin-right: -15px; }\n  @media(min-width: 1270px) {\n    &:nth-last-child(2) a { border-bottom: 1px solid transparent; }\n  }\n  &:last-child a { border-bottom: 1px solid transparent; }\n\n  &:hover {\n    border: 1px solid #d0d0d0;\n    background: #ffffff;\n  }\n\n  &:hover a {\n    padding: 10px 15px;\n    width: 100%;\n    border-bottom: 1px solid transparent;\n  }\n  @media(max-width: 1269px) {\n    width: calc(100% + 30px);\n    margin-left: -15px !important;\n    margin-right: -15px !important;\n  }\n}\n\n.explore-list__link {\n  display: block;\n  margin: 0 auto;\n  padding: 10px 0;\n  width: calc(100% - 30px);\n  margin-bottom: -1px;\n\n  font-size: 13px;\n  line-height: 27px;\n  border-bottom: 1px solid #d0d0d0;\n  transition: none;\n}\n',                                                                                                                                                                                                     
  indentedSyntax: false,                                                                                  
  functions: { url: [Function: url] },                                                                    
  importer: [Function] }                                                                                  

{ includePaths: [ '/home/ben/projects/dg/app/components/explore_sections' ],                              
  data: '@import "../../client/styles/_settings/_legacy_settings";\n@import "../../client/styles/_mixins/_legacy_mixins";\n@import "../../client/styles/_mixins/_grid";\n@import "../../client/styles/_mixins/_text";\n\n.nowrap {\n  display: inline-block;\n  .svg { margin-right: 5px; }\n}\n\n.explore-sections {\n  padding-top: 20px;\n  padding-bottom: 30px;\n  overflow: hidden;\n  clear: both;\n}\n\n.articles.index .grouping__title + .explore-sections {\n  padding-top: 0;\n  .explore-sections__section__title { margin-top: 0; }\n}\n\n.explore-sections__section {\n  @include span(3, 6);\n  height: 140px;\n  @media only screen and (min-width: 400px) {\n    height: 120px;\n  }\n\n  @include grid-breakpoint(m) {\n    @include span(2, 6);\n  }\n  @include grid-breakpoint(l) {\n    @include span(2);\n    height: 150px;\n  }\n  @include grid-breakpoint(xl) {\n    @include span(2);\n    height: 130px;\n  }\n  @media only screen and (min-width: 1390px) {\n    height: 110px;\n  }\n  @include transition;\n  background: transparent;\n  &:hover {\n    background-color: #ffffff;\n    .svg {\n      margin-left: 5px;\n      path { fill: $text-default-color; };\n    }\n  }\n}\n.explore-sections__section__title {\n  @include text(resource-item-title-small);\n  width: 100%;\n  margin-bottom: 0;\n  margin-top: 5%;\n  .svg {\n    @include transition();\n    path { fill: map-get($text-colors, ultra-light); }\n  }\n  svg { margin-top: -1px; }\n}\n.explore-sections__section__body {\n  @include text($size: xs);\n  margin-top: 0;\n  margin-bottom: 0;\n}\n',                                                                                                                                                       
  indentedSyntax: false,                                                                                  
  functions: { url: [Function: url] },                                                                    
  importer: [Function] }  ```

@benhutton
Copy link

To add another wrinkle (which @goyney hints at): if we kill and re-run it enough times, eventually it will finish (so things are getting put into cache and that keeps them from breaking it?)

Disregard this. I had a bug in my diagnostic code. Things are breaking reliably for me.

@jpergler
Copy link
Author

Ok, I put some more magic into this. It seems that it is actually not related to Node.js version 9 in the end. I worked on the projects, some new stuff was added to the project and the project build does not finish anymore. I am on the Node.js v8.9.4. When I switch to some other git branch of the project then the build finishes. When I switch back to the branch with added stuff it does not build again.

It seems that it is somehow related to some changes in project, but I can't trace which changes. It seems to me that adding some more files to project makes the trouble.

Might that be somehow related to some circular references?

@jpergler
Copy link
Author

I found out that I was building in some cases with parcel in version 1.6.2 and in some cases with 1.8.1. With 1.6.2 it builds and with 1.8.1 it does not. There are fixes in 1.8.0 I need for some packages (i.e. react-data-grid) but I can't build the project. I am really unhappy with that and I guess I will have to go setup Webpack because Parcel is currently very unreliable. :-(

@mririgoyen
Copy link

I hear you, @jpergler. Between this and #1301, we are starting to process of investigating Webpack.

@DeMoorJasper
Copy link
Member

DeMoorJasper commented May 15, 2018

Like I mentioned earlier, it's very hard to fix this without being able to reproduce it.

There has been a lot of changes since 1.6.2, can you try all versions between 1.6.2 and 1.8.1 to see where it broke @jpergler than we can at least slim down the search a little.

Although reading your issue it started at version 1.7?

@jpergler
Copy link
Author

I understand and I would be happy to offer some repro but I can't see what makes the trouble and I can't offer my project sources.

I just checked that version 1.7.1 works fine, with 1.8.0 I start having trouble.

@Hammster
Copy link
Contributor

Hammster commented May 15, 2018

I've been able to create a simple repo with the issue https://github.com/Hammster/parcel-1.8.x-freezbug

It is the same issue as described when multiple files follow the same naming pattern.

@jpergler
Copy link
Author

@Hammster great! I can confirm that it freezes at my computer as well.

That reminds me that often the build freezes at some index.js file. Not only on this file, but I would say it is significantly more often than other file names.

@jpergler
Copy link
Author

Tried different versions on the simple repro from @Hammster - build finishes with 1.7.1, and does not finish with 1.8.0 or 1.8.1. So the bug was probably introduced in 1.8.0.

@DeMoorJasper
Copy link
Member

@Hammster Awesome! I'm able to reproduce this on windows running Node 10 (unfortunately not on mac :( )
@jpergler Thanks for checking that, I'll try look into this today

@DeMoorJasper
Copy link
Member

DeMoorJasper commented May 16, 2018

This commit causes massive delays in builds (and most of the time freezes) when testing the repro repo (build go from 4secs to 30secs [if they pass]): d67b76c

My PR #1368 fixes the issue, as the repro repo passes using that branch. So the watcher probably crashes for some reason
capture

Something I also noticed is that the folder is formatted using \ one time and / the other times. But I guess this is irrelevant

@DeMoorJasper DeMoorJasper reopened this May 21, 2018
@natqe
Copy link

natqe commented May 22, 2018

I'm surely that is connect to sass files. and now i need all the time to remove them and add them again after i running the script. it is very bad.

DeMoorJasper pushed a commit that referenced this issue May 28, 2018
Remove `deasync` from CSS assets.
Fixes #1331 and bring some performance improvements.

#### Status

- [x] Sass
- [x] Less
- [x] Stylus
@aaronjameslang
Copy link

Can reproduce on macos node v10.3.0, parcel 1.7.1 is good, 1.8.0, 1.8.1 are bad. Presented as watch/serve modes not detecting changes. Currently downgraded to 1.7.1 and waiting for #1368 to make it to release.

Anyone trying to downgrade, parcel was published as parcel-bundler before 1.8.0

aaronjameslang added a commit to aaronjameslang/aaronjameslang.github.io-2018 that referenced this issue Jun 14, 2018
@benhutton
Copy link

I am still running into problems with 1.9.0! #1390 doesn't seem to have fixed it for me.

@Hammster
Copy link
Contributor

Hammster commented Jun 15, 2018

I can confirm that this issue still persits in our project, even though my example repository seams to be fixed! @DeMoorJasper

This are the build files in order until to the point where it freezez.

The vue files use SCSS and Pug

--- Parcel bundle --------------------------------------------------------------
∞  Building...

∞  Building index.pug...
∞  Building initial.scss...
∞  Building index.js...
∞  Building css-loader.js...
∞  Building bundle-url.js...
∞  Building globals.js...
∞  Building eventHandler.js...
∞  Building electron.js...
∞  Building util.js...
∞  Building EcsIds.js...
∞  Building Controller-proxies.js...
∞  Building enums.js...
∞  Building promise-handler.js...
∞  Building index.js...
∞  Building backend-objects.js...
∞  Building navigator-objects.js...
∞  Building commands.js...
∞  Building example-module.js...
∞  Building localization.js...
∞  Building index.vue...
∞  Building container.vue...
∞  Building resizer.vue...
∞  Building stats.vue...
∞  Building index.js...
∞  Building vue.runtime.esm.js...
∞  Building index.vue...
∞  Building index.vue...
∞  Building index.vue...
∞  Building index.vue...

@fathyb
Copy link
Contributor

fathyb commented Jun 15, 2018

Are you using Windows?

@Hammster
Copy link
Contributor

Hammster commented Jun 15, 2018

Yes i am on Windows 10

@fathyb
Copy link
Contributor

fathyb commented Jun 15, 2018

Could you try Node.js nightly? A bug was fixed a few weeks ago in libuv that resulted in freezes on Windows (libuv/libuv@4e53af9)

@Hammster
Copy link
Contributor

@fathyb still freezes with the nightly you gave me. It went a little further the pipeline though.

....
∞  Building container.vue...
∞  Building resizer.vue...
∞  Building stats.vue...
∞  Building vue.runtime.esm.js...
∞  Building index.js...
∞  Building index.vue...
∞  Building index.vue...
∞  Building index.vue...
∞  Building index.vue...    <=== crashed here before
∞  Building svgicon.vue...
∞  Building command.vue...
∞  Building symbols.svg...

@fathyb
Copy link
Contributor

fathyb commented Jun 15, 2018

Ah, it may be something else then. A reproduction could help for this one, weird that we have that many possible causes for freezes.

Ah and just in case, you used --no-cache or removed the .cache directory right?

@fathyb fathyb reopened this Jun 15, 2018
@Hammster
Copy link
Contributor

Hammster commented Jun 15, 2018

Indeed, i'll try to reproduce this but it may take some time to find the culprit 🕵🔎
Also clearing the .cache and deactivating watch + hmr did not change the results.

@benhutton
Copy link

@fathyb FWIW, I'm running ubuntu, not windows, and seeing freezing. I wonder if there's a number of different (and possibly related?) things happening?

@Hammster
Copy link
Contributor

Hammster commented Jun 15, 2018

@benhutton could you try to modfiy this line

maxConcurrentCallsPerWorker: 10,

If i set this to a value between 1 and 3, it builds without freezing. I am sure the issues is somewhere else though and this this just avoids the resulting issue.

@DeMoorJasper
Copy link
Member

Could we move the new problems into new issues pls.
This issue is getting very cluttered and already has solved 2 different bugs.

@andrykonchin
Copy link

@Hammster 's advise works for me. Thanks.

There is a new env variable PARCEL_MAX_CONCURRENT_CALLS (in the latest 1.9.4 release) to set this concurrent calls limit.

@jayprado
Copy link

Setting PARCEL_MAX_CONCURRENT_CALLS=3 env variable also worked for me, on "parcel-bundler": "1.9.6", and node v8.11.3.

chalkpe added a commit to chalkpe/ask that referenced this issue Aug 30, 2018
devongovett pushed a commit that referenced this issue Oct 15, 2018
Remove `deasync` from CSS assets.
Fixes #1331 and bring some performance improvements.

#### Status

- [x] Sass
- [x] Less
- [x] Stylus
devongovett pushed a commit that referenced this issue Oct 15, 2018
Remove `deasync` from CSS assets.
Fixes #1331 and bring some performance improvements.

#### Status

- [x] Sass
- [x] Less
- [x] Stylus
@mnpenner
Copy link

I'm still getting freezes with parcel@2.2.1 when I run parcel build on Win10 either through Powershell or WSL/Ubuntu.

Any workaround?

@dohnuts
Copy link

dohnuts commented May 18, 2022

stracing the pid shows a problem , infinite looping in a futex

futex(0x6890100, FUTEX_WAKE_PRIVATE, 1) = 1
futex(0x68900b0, FUTEX_WAKE_PRIVATE, 1) = 1
futex(0x6890100, FUTEX_WAKE_PRIVATE, 1) = 1
futex(0x7ffa5f5cbb80, FUTEX_WAIT_PRIVATE, 2, NULL) = -1 EAGAIN (Resource temporarily unavailable)
futex(0x7ffa5f5cbb80, FUTEX_WAKE_PRIVATE, 1) = 0
futex(0x6890100, FUTEX_WAKE_PRIVATE, 1) = 1
getpid() = 1162014
mmap(0x214f21780000, 430080, PROT_NONE, MAP_PRIVATE|MAP_ANONYMOUS|MAP_NORESERVE, -1, 0) = 0x214f21780000
munmap(0x214f217aa000, 258048) = 0
mprotect(0x214f21780000, 172032, PROT_READ|PROT_WRITE) = 0
mmap(0x381b98980000, 593920, PROT_NONE, MAP_PRIVATE|MAP_ANONYMOUS|MAP_NORESERVE, -1, 0) = 0x381b98980000
munmap(0x381b989d2000, 258048) = 0
mprotect(0x381b98980000, 335872, PROT_READ|PROT_WRITE) = 0
mmap(0x2ad1f8ac0000, 430080, PROT_NONE, MAP_PRIVATE|MAP_ANONYMOUS|MAP_NORESERVE, -1, 0) = 0x2ad1f8ac0000
munmap(0x2ad1f8aea000, 258048) = 0
mprotect(0x2ad1f8ac0000, 172032, PROT_READ|PROT_WRITE) = 0
mmap(0x2b0b4580000, 921600, PROT_NONE, MAP_PRIVATE|MAP_ANONYMOUS|MAP_NORESERVE, -1, 0) = 0x2b0b4580000
munmap(0x2b0b4622000, 258048) = 0
mprotect(0x2b0b4580000, 663552, PROT_READ|PROT_WRITE) = 0
mmap(0x12c7d4380000, 593920, PROT_NONE, MAP_PRIVATE|MAP_ANONYMOUS|MAP_NORESERVE, -1, 0) = 0x12c7d4380000
munmap(0x12c7d43d2000, 258048) = 0
mprotect(0x12c7d4380000, 335872, PROT_READ|PROT_WRITE) = 0
mmap(0xebce2600000, 430080, PROT_NONE, MAP_PRIVATE|MAP_ANONYMOUS|MAP_NORESERVE, -1, 0) = 0xebce2600000
munmap(0xebce262a000, 258048) = 0
mprotect(0xebce2600000, 172032, PROT_READ|PROT_WRITE) = 0
mmap(0x11c85f340000, 593920, PROT_NONE, MAP_PRIVATE|MAP_ANONYMOUS|MAP_NORESERVE, -1, 0) = 0x11c85f340000
munmap(0x11c85f392000, 258048) = 0
mprotect(0x11c85f340000, 335872, PROT_READ|PROT_WRITE) = 0
futex(0x6890100, FUTEX_WAKE_PRIVATE, 1) = 1
futex(0x68900e8, FUTEX_WAIT_PRIVATE, 3, NULL) = 0
futex(0x6890104, FUTEX_WAKE_PRIVATE, 1) = 1
futex(0x68900b0, FUTEX_WAKE_PRIVATE, 1) = 1
futex(0x713c7e0, FUTEX_WAIT_PRIVATE, 0, NULL) = 0
futex(0x713c768, FUTEX_WAKE_PRIVATE, 1) = 0
futex(0x6890104, FUTEX_WAKE_PRIVATE, 1) = 1
futex(0x68900b0, FUTEX_WAKE_PRIVATE, 1) = 1
getpid() = 1162014

maybe a read() badly managed or a bad use of a locking mechanism

Current LTS node
node --version
v16.15.0

things should work on LTS ;-)

I use PARCEL_MAX_CONCURRENT_CALLS=1 ... and 3 just in case

amusing

wait,

with PARCEL_WORKERS=0 yarn parcel build --log-level=verbose

it just took 20 mn to get unstuck from the Bundling task

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

No branches or pull requests