rspack: [Bug]: rspack build gets stuck at ci

System Info

 Binaries:
    Node: 22.13.1 - ~/.volta/tools/image/node/22.13.1/bin/node
    Yarn: 1.22.19 - ~/.volta/tools/image/yarn/1.22.19/bin/yarn
    npm: 10.8.2 - ~/.volta/tools/image/npm/10.8.2/bin/npm
    Watchman: 2024.08.12.00 - /opt/homebrew/bin/watchman
  npmPackages:
    @rspack/cli: ^1.2.8 => 1.2.8
    @rspack/core: ^1.2.8 => 1.2.8
    @rspack/plugin-react-refresh: ^1.0.1 => 1.0.1

Details

to create a prod build I use a command WEBPACK_BUNDLE=production NODE_OPTIONS=--max-old-space-size=8196 rspack build, which basically runs rspack build. After upgrade from v1.1.6 to 1.2.8 (and it actually happened with 1.2.5) this command gets stuck and does not provide any additional info in 20min, then CI fails by timeout. Usual time to build static resources at CI is 100s.

I don’t have a link with reproduction, as it happens from time to time. But here is a link to the GHA job

rspack config

Image

Reproduce link

No response

Reproduce Steps

WEBPACK_BUNDLE=production NODE_OPTIONS=--max-old-space-size=8196 rspack build

About this issue

  • Original URL
  • State: closed
  • Created 2 years ago
  • Comments: 37 (16 by maintainers)

Most upvoted comments

Looks like one of the versions between 1.4.0 and 1.4.8 fixed the issue. Just tried updating to 1.4.8 and the builds are now working!

@rrussell0 most of the deadlock issue is solved in 1.3.0 can you try to upgrade to see whether it is solved

After upgrading RSbuild in our project, the deadlocks seem to have stopped - at least none in the last week. Thanks!

@benjdlambert in my case it doesn’t reproduce consistently, so it might be something else.

Image

Maybe try to use Rspack 1.1 and see if it improves, I don’t remember having issues with that version.

@hardfist @h-a-n-a FYI I didn’t have any deadlock after upgrade to 1.3.0, maybe it’s too early, but my issue seems to be resolved

@uladzimirdev this may caused by https://github.com/web-infra-dev/rspack/pull/9587/files#diff-3fbb9f7dfbadceab7b0c89038c54de9851f25ae957a1f91aea05b0e46da2b209L367 which cause block_on on js function call and should be fixed in 1.3.0, can you help test whether it’s still stuck with 1.3.0

normally deadlock is caused by rust side so you need rust side profile to debug, you can generate cpu profile by following this guide https://rspack.dev/contribute/development/profiling#samply

you can try @rspack-canary/core@1.2.9-canary-c8901a07-20250314102251 by following this guide to see whether it solves your deadlock problem