rspack icon indicating copy to clipboard operation
rspack copied to clipboard

[Bug]: Rsbuild hangs with no output on GitHub Actions / Docker

Open edhgoose opened this issue 1 year ago • 9 comments

Version

System:
    OS: macOS 15.3
    CPU: (11) arm64 Apple M3 Pro
    Memory: 193.03 MB / 36.00 GB
    Shell: 5.9 - /bin/zsh
  Browsers:
    Chrome: 134.0.6998.118
    Safari: 18.3

Details

We're running rsbuild inside GitHub Actions in Docker.

Our normal output looks something like this:

web-infra-dev/rsbuild#22 1.002   Rsbuild v1.2.19
web-infra-dev/rsbuild#22 1.002 
web-infra-dev/rsbuild#22 84.36 > Found 731 files
web-infra-dev/rsbuild#22 84.41 > Analyzing 731 sources
web-infra-dev/rsbuild#22 84.56 > Adding source map references
web-infra-dev/rsbuild#22 88.74 > Bundled 731 files for upload

The second column is time. So, there's a period of ~83 seconds where there is no output. This 83 seconds is a fraction of the ~5 minutes our full backend + frontend build takes.

Sometimes though, our output looks like this:

web-infra-dev/rsbuild#22 0.977   Rsbuild v1.2.19
web-infra-dev/rsbuild#22 0.977 

And the GitHub Action times out - it gets cancelled after 15 minutes.

This is followed by the below which comes from GitHub Actions:

Error: The operation was canceled.

When we run this locally, we get a progress bar demonstrating Rsbuild is doing something.

We're wondering a few things:

  1. Is it possible to get some logging which demonstrates Rsbuild is working? We have dev.progressBar set to true always
  2. Is there anything we can do that might identify where the crash might occur?

We've tried looking at the documentation and looking for similar issues, but we've not had any luck. Do you have any guidance on what we could do to track this issue down?

Reproduce link

We're unable to reproduce consistently.

Reproduce Steps

We've been unable to reproduce it consistently. It seems to only happen on GitHub Actions. We'd love some guidance on how to identify what might cause the crash (or non-responsiveness).

edhgoose avatar Mar 20 '25 21:03 edhgoose

This is happening to us as well pretty consistently, on Docker on CircleCI.

etrejos avatar Mar 20 '25 21:03 etrejos

And same for us on GitHub Actions!

markmssd avatar Mar 21 '25 02:03 markmssd

there're some known potential case which will cause deadlock and we're working on fixing some of them.

@edhgoose @markmssd @etrejos can you try @rspack-canary/[email protected] version to see whether you still met deadlock issue by following this guide https://rspack.dev/guide/start/quick-start#install-canary-version

hardfist avatar Mar 21 '25 09:03 hardfist

@hardfist Thank you for the quick response. Testing it now. I'll build the image a few times and get back to you with feedback.

etrejos avatar Mar 21 '25 18:03 etrejos

Unfortunately, there still seems to be a deadlock. I ran the build 23 times, and got an error on the 21st try.

etrejos avatar Mar 22 '25 00:03 etrejos

@etrejos can you provide repro for further investigation?

hardfist avatar Mar 26 '25 03:03 hardfist

Duplicated with https://github.com/web-infra-dev/rspack/issues/9665. Let's keep an issue to track this.

chenjiahan avatar Mar 26 '25 07:03 chenjiahan

@chenjiahan your comment mentions this a duplicate of #9752, but this is #9752 - is there another issue which this is a duplicate of?

edhgoose avatar Mar 26 '25 08:03 edhgoose

Sorry I pasted a wrong link, should be https://github.com/web-infra-dev/rspack/issues/9665

chenjiahan avatar Mar 26 '25 08:03 chenjiahan