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

webpack build hangs with warmup and new cache API #122

Open
eytienne opened this issue Jun 28, 2021 · 5 comments
Open

webpack build hangs with warmup and new cache API #122

eytienne opened this issue Jun 28, 2021 · 5 comments

Comments

@eytienne
Copy link

eytienne commented Jun 28, 2021

  • Operating System: Alpine 3.12
  • Node Version: 14.16.1
  • NPM Version: yarn 1.22.5
  • webpack Version: 5.38.1
  • thread-loader Version: 3.0.4

Expected Behavior

The build completes.

Actual Behavior

The build hangs, it never terminates, it stops with webpack 5.38.1 compiled successfully in XXX ms but never displays the Done in XXXs. neither quits.

How Do We Reproduce?

I isolated that it comes from the warmup statement. I think the loader never exits because of the new cache API (the filesystem one from the v5) which surely does fulfill its caching purpose but as a consequence no job is being launched so the warmup workers are pending/zombies.
You can reproduce with that branch from your example: https://github.com/eytienne/thread-loader/tree/repro_build_hangs

@eytienne
Copy link
Author

eytienne commented Jun 28, 2021

I look for a way to access the compiler for a fast fix, just subscribing to the done hook but it don't see any way to get the compiler from the warmup function and the pitch function is not triggered at all with cache while debugging. Making a ThreadLoaderWarmupPlugin would solve it through the apply method of the Plugin API but it is a more aggressive patch.

@sectsect
Copy link

sectsect commented Jul 4, 2021

I have the same problem.

This issue may conflict with warmup statement and webpack5 Persistent Caching.
Occurs only when the cache is read.

@juandavidkincaid
Copy link

+1

1 similar comment
@hszhsh
Copy link

hszhsh commented Nov 2, 2021

+1

@deepaktatineni
Copy link

deepaktatineni commented Mar 8, 2022

I have faced webpack build hanging issue. I have created a test repo to replicate the issue here .

This took forever for me to debug. Removing pre-warmup resolved the issue.

Node: 10.16
webpack: 4.26

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

No branches or pull requests

5 participants