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

Support snapshotting node:test #47832

Closed
RaisinTen opened this issue May 3, 2023 · 4 comments
Closed

Support snapshotting node:test #47832

RaisinTen opened this issue May 3, 2023 · 4 comments
Labels
feature request Issues that request new features to be added to Node.js. stale test_runner Issues and PRs related to the test runner subsystem.

Comments

@RaisinTen
Copy link
Contributor

Version

v20.0.0

Platform

No response

Subsystem

bootstrap

What steps will reproduce the bug?

$ cat input.js
require('node:test')

$ lldb -- $(command -v node) --snapshot-blob snapshot.blob --build-snapshot input.js
(lldb) target create "/usr/local/bin/node"
Current executable set to '/usr/local/bin/node' (x86_64).
(lldb) settings set -- target.run-args  "--snapshot-blob" "snapshot.blob" "--build-snapshot" "input.js"
(lldb) run
Process 5484 launched: '/usr/local/bin/node' (x86_64)
(node:5484) Warning: built-in module test is not yet supported in user snapshots
(Use `node --trace-warnings ...` to show where the warning was created)
Unknown external reference 0x1001cc6e0.
<unresolved>
Process 5484 stopped
* thread #1, queue = 'com.apple.main-thread', stop reason = EXC_BREAKPOINT (code=EXC_I386_BPT, subcode=0x0)
    frame #0: 0x00000001014073e3 node`v8::base::OS::Abort() + 19
node`v8::base::OS::Abort:
->  0x1014073e3 <+19>: ud2
    0x1014073e5 <+21>: nopw   %cs:(%rax,%rax)
    0x1014073ef <+31>: nop

node`v8::base::OS::DebugBreak:
    0x1014073f0 <+0>:  pushq  %rbp
Target 0: (node) stopped.
(lldb) image lookup --address 0x1001cc6e0
      Address: node[0x00000001001cc6e0] (node.__TEXT.__text + 1869536)
      Summary: node`node::UDPWrapBase::RecvStart(v8::FunctionCallbackInfo<v8::Value> const&)
(lldb) ^D

So it complains that UDPWrapBase::RecvStart() -

node/src/udp_wrap.cc

Lines 645 to 648 in b0ca770

void UDPWrapBase::RecvStart(const FunctionCallbackInfo<Value>& args) {
UDPWrapBase* wrap = UDPWrapBase::FromObject(args.Holder());
args.GetReturnValue().Set(wrap == nullptr ? UV_EBADF : wrap->RecvStart());
}
has not been registered.

How often does it reproduce? Is there a required condition?

No response

What is the expected behavior? Why is that the expected behavior?

Should warn and exit with a 0 error code instead of crashing.

What do you see instead?

It crashes.

Additional information

After #47779 lands, the error would reproduce while building a snapshot that requires the node:test module instead of test.

@RaisinTen
Copy link
Contributor Author

cc @joyeecheung

@joyeecheung
Copy link
Member

We don't support udp and the test module in the snapshot yet.

@tniessen tniessen added the test_runner Issues and PRs related to the test runner subsystem. label May 10, 2023
@cjihrig cjihrig added the feature request Issues that request new features to be added to Node.js. label Aug 11, 2023
@cjihrig cjihrig changed the title Unknown external reference error when building a snapshot that requires the test module Support snapshotting node:test Aug 11, 2023
Copy link
Contributor

github-actions bot commented Feb 8, 2024

There has been no activity on this feature request for 5 months and it is unlikely to be implemented. It will be closed 6 months after the last non-automated comment.

For more information on how the project manages feature requests, please consult the feature request management document.

@github-actions github-actions bot added the stale label Feb 8, 2024
Copy link
Contributor

There has been no activity on this feature request and it is being closed. If you feel closing this issue is not the right thing to do, please leave a comment.

For more information on how the project manages feature requests, please consult the feature request management document.

@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale Mar 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature request Issues that request new features to be added to Node.js. stale test_runner Issues and PRs related to the test runner subsystem.
Projects
None yet
Development

No branches or pull requests

4 participants