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

[Bug]:using docusaurus edit mdx or md file, process crash. #8480

Closed
zycgit opened this issue Nov 20, 2024 · 7 comments · Fixed by #8492 or #8866
Closed

[Bug]:using docusaurus edit mdx or md file, process crash. #8480

zycgit opened this issue Nov 20, 2024 · 7 comments · Fixed by #8492 or #8866
Assignees
Labels
bug Something isn't working

Comments

@zycgit
Copy link

zycgit commented Nov 20, 2024

System Info

System:
OS: macOS 14.5
CPU: (16) x64 Intel(R) Core(TM) i9-9880H CPU @ 2.30GHz
Memory: 30.03 GB / 64.00 GB
Shell: 5.9 - /bin/zsh
Binaries:
Node: 14.21.3 - ~/.nvm/versions/node/v14.21.3/bin/node
npm: 9.7.1 - ~/.nvm/versions/node/v14.21.3/bin/npm
Browsers:
Chrome: 130.0.6723.119
Safari: 17.5

Details

package.json

"dependencies": {
"@docusaurus/core": "^3.6.2",
"@docusaurus/faster": "^3.6.2",
"@docusaurus/plugin-content-docs": "^3.6.2",
"@docusaurus/preset-classic": "^3.6.2",
"@docusaurus/theme-live-codeblock": "^3.6.2",
"@easyops-cn/docusaurus-search-local": "^0.40.1",
"@mdx-js/react": "^3.0.0",
"clsx": "^1.2.1",
"prism-react-renderer": "^2.3.1",
"prismjs": "^1.25.0",
"punycode": "^2.3.1",
"react": "^18.2.0",
"react-dom": "^18.2.0"
},
"devDependencies": {
"@docusaurus/module-type-aliases": "^3.6.2",
"@docusaurus/types": "^3.6.2"
},

when using docusaurus edit mdx or md file reprot this info and Process crash.

Reproduce link

No response

Reproduce Steps

Panic occurred at runtime. Please file an issue on GitHub with the backtrace below: https://github.com/web-infra-dev/rspack/issues
Message: Chunk(ChunkUkey(Ukey(240), PhantomData<rspack_core::chunk::Chunk>)) not found in ChunkByUkey
Location: crates/rspack_core/src/lib.rs:328

Run with COLORBT_SHOW_HIDDEN=1 environment variable to disable frame filtering.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ BACKTRACE ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
1: _napi_register_module_v1
at
2: _napi_register_module_v1
at
3: _napi_register_module_v1
at
4: _napi_register_module_v1
at
5: _wasmer_vm_f64_nearest
at
6: _napi_register_module_v1
at
7: _napi_register_module_v1
at
8: _napi_register_module_v1
at
9: _napi_register_module_v1
at
10: _napi_register_module_v1
at
11: __pthread_start
at
zsh: abort npm run start

@zycgit zycgit added bug Something isn't working pending triage The issue/PR is currently untouched. labels Nov 20, 2024
@zycgit zycgit changed the title [Bug]: [Bug]:using docusaurus edit mdx or md file, process crash. Nov 20, 2024
@lebalz
Copy link

lebalz commented Nov 20, 2024

Same here, running on WSL 2, [email protected] with @rspack/[email protected]

Panic occurred at runtime. Please file an issue on GitHub with the backtrace below: https://github.com/web-infra-dev/rspack/issues
Message:  Chunk(ChunkUkey(Ukey(197), PhantomData<rspack_core::chunk::Chunk>)) not found in ChunkByUkey
Location: crates/rspack_core/src/lib.rs:328

Run with COLORBT_SHOW_HIDDEN=1 environment variable to disable frame filtering.
Run with RUST_BACKTRACE=full to include source snippets.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ BACKTRACE ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
<empty backtrace>

@chenjiahan chenjiahan removed the pending triage The issue/PR is currently untouched. label Nov 20, 2024
@chenjiahan
Copy link
Member

Hi, can you provide an reproduction?

@darrenjon
Copy link

Same problem while editing .mdx or .md file. [email protected] with experimental_faster

Panic occurred at runtime. Please file an issue on GitHub with the backtrace below: https://github.com/web-infra-dev/rspack/issues
Message: Chunk(ChunkUkey(Ukey(118), PhantomData<rspack_core::chunk::Chunk>)) not found in ChunkByUkey
Location: crates/rspack_core/src/lib.rs:328

Backtrace omitted.

Run with RUST_BACKTRACE=1 environment variable to display it.
Run with RUST_BACKTRACE=full to include source snippets.
 ELIFECYCLE  Command failed.
Abort trap: 6

@slorber
Copy link

slorber commented Dec 26, 2024

@ahabhgk I just tried using Rspack 1.1.8 with incremental and it still crashes for me.

Editing a file works fine (it hot reloads) but creating a new MDX file leads to a crash.

● Client ██████████████████████████████████████████████████ (77%) sealing chunk modules optimization                                                                                                               Panic occurred at runtime. Please file an issue on GitHub with the backtrace below: https://github.com/web-infra-dev/rspack/issues
Message:  Entrypoint should set_runtime_chunk at build_chunk_graph before get_runtime_chunk
Location: crates/rspack_core/src/chunk_group.rs:136

Run with COLORBT_SHOW_HIDDEN=1 environment variable to disable frame filtering.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ BACKTRACE ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
 1: _napi_register_module_v1
    at <unknown source file>
 2: _napi_register_module_v1
    at <unknown source file>
 3: _napi_register_module_v1
    at <unknown source file>
 4: _napi_register_module_v1
    at <unknown source file>
 5: _wasmer_vm_f64_nearest
    at <unknown source file>
 6: _napi_register_module_v1
    at <unknown source file>
 7: _napi_register_module_v1
    at <unknown source file>
 8: _napi_register_module_v1
    at <unknown source file>
 9: _napi_register_module_v1
    at <unknown source file>
10: _napi_register_module_v1
    at <unknown source file>
11: _napi_register_module_v1
    at <unknown source file>
12: _napi_register_module_v1
    at <unknown source file>
13: _napi_register_module_v1
    at <unknown source file>
14: _napi_register_module_v1
    at <unknown source file>
15: __pthread_deallocate
    at <unknown source file>
error Command failed with signal "SIGABRT".
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
error Command failed.
Exit code: 1
Command: /Users/sebastienlorber/Library/Application Support/fnm/node-versions/v22.3.0/installation/bin/node
Arguments: /Users/sebastienlorber/Library/Application Support/fnm/node-versions/v22.3.0/installation/lib/node_modules/yarn/lib/cli.js start
Directory: /Users/sebastienlorber/Desktop/projects/docusaurus/website
Output:

See also facebook/docusaurus#10800

To reproduce, go to that Docusaurus branch and run:

yarn install
yarn start:website
touch website/docs/test.mdx

@ahabhgk
Copy link
Contributor

ahabhgk commented Dec 27, 2024

@slorber Before we didn't handle runtimeChunk: true correctly in incremental, #8866 should fix this, I'm have released a canary version for you to continue on your side: @rspack-canary/[email protected].

I'm very appreciate that docusaurus is trying incremental. Although I've already spent a lot of time on incremental, it's still lacking large-scale usage at present, it will still take some time to go through the feedback loop of shipping while fixing bugs. I'm happy to help fix any problems that docusaurus encounters when using incremental.

@slorber
Copy link

slorber commented Dec 27, 2024

Thanks for your support @ahabhgk

Since Rspack support is opt-in in Docusaurus, and we also have a flag to disable incremental rebuilds, we can try to support it by default, be early adopters, and give feedback.

Isn't 1.1.7 a version to avoid? wondering why the canary isn't using 1.1.8 instead. I'll probably wait for 1.1.9 if you plan to release it soon.

@chenjiahan
Copy link
Member

Agreed, we should avoid releasing 1.1.7-canary, I will update the version number in package.json to avoid this.

Rspack 1.2.0 alpha will be released next week, so we probably won't release 1.1.9.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
7 participants