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

parcel build randomly hangs forever #8978

Closed
mzihlmann opened this issue May 2, 2023 · 6 comments
Closed

parcel build randomly hangs forever #8978

mzihlmann opened this issue May 2, 2023 · 6 comments
Labels
🕐 Waiting Stale Inactive issues

Comments

@mzihlmann
Copy link

🐛 bug report

When running parcel build as part of our docker build in CI, we have a 50% chance that the build runs through immediately and a 50% chance that the build gets stuck for more than 1 hour. adding --log-level error reduced the likelyhood of getting stuck (1 out of 6) but did not fully solve the issue. --no-cache appears to resolve the issue.

#7585 (comment)
#6473 (comment)

🎛 Configuration (.babelrc, package.json, cli command)

  "scripts": {
    ...
    "build": "rm -fr dist && parcel build index.ts admin.ts",
    ...
  },
  "devDependencies": {
    ...
    "@parcel/transformer-sass": "^2.8.3",
    ...
  }

🤔 Expected Behavior

The build should not get stuck

😯 Current Behavior

with a 50/50 chance the build gets stuck on the build command

💁 Possible Solution

to me it sounds like a race-condition leading to a deadlock somewhere in the caching logic, or at least activated by the caching logic. The log-level might impact timing in the critical section and hence change the probability of a deadlock.

🌍 Your Environment

we are running on node:16-alpine with parcel==2.8.3

@mischnic
Copy link
Member

mischnic commented May 2, 2023

Can you share a complete example (Dockerfile, dummy sourcecode, ...)?

@mzihlmann
Copy link
Author

unfortunately not yet, as its company code and i did not yet invest the time to create a minimal reproducible setup. but if you have experiments that i could run i'm eager to help.

@fregante
Copy link
Contributor

fregante commented May 2, 2023

I noticed that if I stick a random process.exit() in a transformer, Parcel just silently hangs. I assume that the same happens for real errors that are just never surfaced and that might be what's happening here.

@mischnic
Copy link
Member

mischnic commented May 7, 2023

I noticed that if I stick a random process.exit() in a transformer, Parcel just silently hangs.

I added a console.log and process.exit() and it looks like the worker is restarted and the transformer rerun (repeatedly until you stop Parcel). Should Parcel log something in that case?

@fregante
Copy link
Contributor

fregante commented May 7, 2023

I don’t think the alternative is great, so yes:

parcel build randomly hangs forever

@alippai
Copy link

alippai commented May 8, 2023

I didn't try to create a minimum reproducible case yet, but there is a good chance this appears if upgrading AgGrid from v28 to v29

markafitzgerald1 added a commit to markafitzgerald1/cribbage-trainer that referenced this issue Jul 30, 2023
Both Firefox and Safari on Linux desktop were rendering differently on
arm64 and amd64.  Technically fixable by running amd64 images on arm64,
but parcel was hanging on startup, causing Playwright to fail to run.

It is possible we're running into Parcel issue #8978:
parcel-bundler/parcel#8978.

Also updated dependencies and fixed audit vulnerabilities.
markafitzgerald1 added a commit to markafitzgerald1/cribbage-trainer that referenced this issue Oct 9, 2023
Much like in ec1bf08,
Mobile Safari was render differently on arm64 and amd64. Theoretically
fixable by running amd64 images on arm64, but parcel hangs on startup,
causing Playwright to fail to run.

It is possible we're still running into Parcel issue #8978:
parcel-bundler/parcel#8978.
@github-actions github-actions bot added the Stale Inactive issues label Nov 5, 2023
@mischnic mischnic reopened this Nov 20, 2023
@parcel-bundler parcel-bundler deleted a comment from github-actions bot Nov 20, 2023
@github-actions github-actions bot closed this as completed Dec 5, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🕐 Waiting Stale Inactive issues
Projects
None yet
Development

No branches or pull requests

4 participants