-
-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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
Comments
Could you provide an example repository for this? |
@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. |
@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 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.*. |
That's strange glad you figured it out though :) I guess I can close this off if it's a node.js bug? |
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. |
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. |
Chiming in, on node 8.11.1, and a clean install of parcel-bundler 1.8.1 via yarn. it freezes during building with |
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. |
@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 Does this idea of files with the same name bring anything to mind? |
@benhutton since you mention this. For me it happened on a section where all components got compiled. All of them are named index.vue |
We are also seeing this behavior. Parcel will just freeze "Building something..." and never finish. Killing the process and restarting doesn't help. Very infrequently, it will finish. |
@benhutton / @Hammster just to confirm, we have similar file structures setup where we have a lot of files named the same, under different folders, |
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?) |
Would love to dig into this if anyone could provide a test repository. |
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? |
That tells us it's not related to a specific compiler, but not much more. |
@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
|
Disregard this. I had a bug in my diagnostic code. Things are breaking reliably for me. |
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? |
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. :-( |
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? |
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. |
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. |
@Hammster great! I can confirm that it freezes at my computer as well. That reminds me that often the build freezes at some |
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. |
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 Something I also noticed is that the folder is formatted using |
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. |
Remove `deasync` from CSS assets. Fixes #1331 and bring some performance improvements. #### Status - [x] Sass - [x] Less - [x] Stylus
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, |
I am still running into problems with 1.9.0! #1390 doesn't seem to have fixed it for me. |
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
|
Are you using Windows? |
Yes i am on Windows 10 |
Could you try Node.js nightly? A bug was fixed a few weeks ago in libuv that resulted in freezes on Windows (libuv/libuv@ |
@fathyb still freezes with the nightly you gave me. It went a little further the pipeline though.
|
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 |
Indeed, i'll try to reproduce this but it may take some time to find the culprit 🕵🔎 |
@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? |
@benhutton could you try to modfiy this line parcel/src/workerfarm/WorkerFarm.js Line 13 in cc6018e
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. |
Could we move the new problems into new issues pls. |
@Hammster 's advise works for me. Thanks. There is a new env variable |
Setting |
Remove `deasync` from CSS assets. Fixes #1331 and bring some performance improvements. #### Status - [x] Sass - [x] Less - [x] Stylus
Remove `deasync` from CSS assets. Fixes #1331 and bring some performance improvements. #### Status - [x] Sass - [x] Less - [x] Stylus
I'm still getting freezes with Any workaround? |
stracing the pid shows a problem , infinite looping in a futex futex(0x6890100, FUTEX_WAKE_PRIVATE, 1) = 1 maybe a read() badly managed or a bad use of a locking mechanism Current LTS node 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 |
🐛 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
The text was updated successfully, but these errors were encountered: