Closed
Conversation
Contributor
Author
Renovate is disabledRenovate is disabled because there is no Renovate configuration file. To enable Renovate, you can either (a) change this PR's title to get a new onboarding PR, and merge the new onboarding PR, or (b) create a Renovate config file, and commit that file to your base branch. |
graphite-app bot
pushed a commit
that referenced
this pull request
Dec 1, 2025
The issue is "when dev engine is in the process of generating hmr update, a new file change will cause the nodejs hang during the second hmr update generating" In short, the hang is caused by deadlock. ## Details Rolldown stores the client information into `client` variable using `DashMap`, which is basically equivalent to `Mutex<HashMap>`. During the process of generating hmr update https://github.com/rolldown/rolldown/blob/5ef49ad615cfef1a9ebc97368546e1b9adbaf48d/crates/rolldown_dev/src/bundling_task.rs#L140 this line of code is equivalent to `client.lock()`, will means the lock of `client` will be hold during the whole generating process. The first hmr update is generated successfully and is sent to vite to trigger the hmr process. The browser loads the hmr patch and and sends message to vite node to register the new loaded module via code https://github.com/rolldown/rolldown/blob/0ce4a17c5ae1a95e331f8d38c5230742b09d1fd3/crates/rolldown_binding/src/binding_dev_engine.rs#L182-L184 nodejs calls `register_modules` https://github.com/rolldown/rolldown/blob/0ce4a17c5ae1a95e331f8d38c5230742b09d1fd3/crates/rolldown_binding/src/binding_dev_engine.rs#L183 This line of is also equivalent to `client.lock()`. In the meantime, dev engine is in the second hmr update generation, which holds the client lock already. So nodejs needs to wait for this lock to get free, and this wait is a **SYNCHRONOUS** wait. The nodejs itself doesn't have chance to resolve pending promises anymore(like resolving a timeout timer), while the hmr generating is awaiting js `transform` hook to be finished. All these things together cause a deadlock situation. --- If we have #7287 in the first place, it will be much easier to locate the problem, becuase we could easily find out which function is the last called function from `binding.js`. --- # Visual Explanation of the Deadlock ### The Circular Dependency ``` ┌──────────────────────────────────────────────────────────┐ │ │ ▼ │ ┌────────────┐ ┌────────────┐ ┌────────────┐ │ │ Task 2 │ awaits │ Node.js │ waits │ Lock │ │ │ (Rust) │────────►│ transform │────────►│ (held by │───┘ │ │ │ hook │ SYNC │ Task 2) │ └────────────┘ └────────────┘ └────────────┘ │ ▲ │ │ │ register_modules │ │ called by browser │ │ (from Task 1's │ │ HMR patch) │ └──────────────────────┘ ``` ### Sequence of Events ``` 1. Task 1: Generate HMR #1 → Send to browser → Complete ✓ 2. File changes again → Task 2 starts 3. Task 2: Acquire clients lock 4. Task 2: Call JS transform hook (await) 5. Browser: Receives HMR #1, loads patch, calls register_modules 6. Node.js: register_modules tries to acquire lock (SYNC) 7. Node.js: BLOCKED waiting for lock (Task 2 has it) 8. Task 2: Waiting for JS promise to resolve 9. Node.js: Can't process promises (event loop blocked) 10. DEADLOCK! ``` ### The Fix Making `register_modules` async allows Node.js to **yield control** when waiting for the lock, keeping the event loop alive so it can resolve the transform hook promise. | Before (sync) | After (async) | |---------------|---------------| | Node.js **blocks entirely** waiting for lock | Node.js **yields** control back to event loop | | Event loop frozen, can't process callbacks | Event loop continues, can process transform callback | | **DEADLOCK** | **Works correctly** |
mdong1909
pushed a commit
that referenced
this pull request
Dec 23, 2025
…ode-group-logo docs: update favicon and custom code group logo
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Welcome to Renovate! This is an onboarding PR to help you understand and configure settings before regular Pull Requests begin.
🚦 To activate Renovate, merge this Pull Request. To disable Renovate, simply close this Pull Request unmerged.
Detected Package Files
Cargo.toml(cargo)crates/rolldown/Cargo.toml(cargo)crates/rolldown_common/Cargo.toml(cargo)crates/rolldown_error/Cargo.toml(cargo)crates/rolldown_oxc/Cargo.toml(cargo)crates/rolldown_resolver/Cargo.toml(cargo)crates/rolldown_testing/Cargo.toml(cargo)crates/rolldown_tracing/Cargo.toml(cargo)crates/rolldown_utils/Cargo.toml(cargo)Configuration Summary
Based on the default config's presets, Renovate will:
fixfor dependencies andchorefor all others if semantic commits are in use.node_modules,bower_components,vendorand various test/tests directories.🔡 Would you like to change the way Renovate is upgrading your dependencies? Simply edit the
renovate.jsonin this branch with your custom config and the list of Pull Requests in the "What to Expect" section below will be updated the next time Renovate runs.What to Expect
With your current configuration, Renovate will create 15 Pull Requests:
chore(deps): update rust crate anyhow to 1.0.75
renovate/anyhow-1.xmain1.0.75chore(deps): update rust crate serde to 1.0.188
renovate/serde-monorepomain1.0.188chore(deps): update rust crate serde_json to 1.0.107
renovate/serde_json-1.xmain1.0.107chore(deps): update rust crate string_wizard to 0.0.4
renovate/string_wizard-0.xmain0.0.4chore(deps): update rust crate testing_macros to 0.2.11
renovate/swc-monorepomain0.2.11fix(deps): update rust crate futures to 0.3.28
renovate/rust-futures-monorepomain0.3.28fix(deps): update rust crate schemars to 0.8.15
renovate/schemars-0.xmain0.8.15fix(deps): update rust crate tracing-chrome to 0.7.1
renovate/tracing-chrome-0.xmain0.7.1fix(deps): update rust crate tracing-subscriber to 0.3.17
renovate/tracing-subscriber-0.xmain0.3.17chore(deps): update rust crate hashbrown to 0.14.0
renovate/hashbrown-0.xmain0.14.0chore(deps): update rust crate insta to 1.31.0
renovate/insta-1.xmain1.31.0chore(deps): update rust crate oxc to 0.2.0
renovate/oxc-0.xmain0.2.0chore(deps): update rust crate tokio to 1.32.0
renovate/tokio-1.xmain1.32.0fix(deps): update rust crate nodejs-resolver to 0.1.0
renovate/nodejs-resolver-0.xmain0.1.0fix(deps): update rust crate rayon to 1.7.0
renovate/rayon-1.xmain1.7.0🚸 Branch creation will be limited to maximum 2 per hour, so it doesn't swamp any CI resources or overwhelm the project. See docs for
prhourlylimitfor details.❓ Got questions? Check out Renovate's Docs, particularly the Getting Started section.
If you need any further assistance then you can also request help here.
This PR has been generated by Mend Renovate. View repository job log here.