-
Notifications
You must be signed in to change notification settings - Fork 68
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
test/integration: Add NodeJS Integration tests #2512 #2598
Conversation
@kakkoyun Only "17": "17-alpine" image for now, please tell me what to add here |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Awesome work 🎉 Thanks a lot for taking care of this!
It's very close but it's not there yet. I have commented inline what we need probably.
FileMode: 0o700, | ||
}, | ||
}, | ||
Cmd: []string{"node", "/cpu_hug.js"}, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
And we need special flags until we implement a dedicated unwinder.
This should help you https://www.polarsignals.com/docs/nodejs
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The aggregatedStack I got now was [[JS:~ JS:~executeUserEntryPoint JS:~Module._load JS:~Module.load JS:~Module._extensions..js JS:~Module._compile JS:*]]. Not complete.
nodejs_test.go:170: The stack [LazyCompile:*fib] is not contained in any of [[JS:~ JS:~executeUserEntryPoint JS:~Module._load JS:~Module.load JS:~Module._extensions..js JS:~Module._compile JS:*]]
@kakkoyun should I assert on this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do you see this stack after you added those flags?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
no. this is the output after I added --perf-basic-prof-only-functions --interpreted-frames-native-stack
Let me add this test in our github check so we can see this
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is because node js lazyCompiling and make the loop anonymous, I modified the test and tried assert on runLoop instead
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmm, I suspect nodejs is inlining things. Could we disable inlining?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK. let me test this without inlining
7521280
to
a1077f4
Compare
e63f431
to
4b48da9
Compare
|
||
- name: Integration Tests (Nodejs) | ||
if: ${{ always() }} | ||
continue-on-error: true |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This shouldn't be the case for NodeJS. We did this for Java because it hasn't been implemented fully yet.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ok
"JS:~Module._extensions..js", | ||
"JS:~Module._compile", | ||
"JS:~", | ||
"JS:*runLoop", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe NodeJS
is inlining these functions. Could we somehow disable inlining for the tests? Or a specific function?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is not a single option to disable inlining optimizations, I am using --no-opt
to disable all optimizations.
Now I can see the expected whole stack.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@kakkoyun , please take another look
@joeyleeeeee97 Thanks again for taking care of this and bearing with me. But we need to make sure that unwinding works as expected, so hang tight for a little longer. We need to make sure we see the expected stack in the tests. |
4b48da9
to
0dacd6d
Compare
@kakkoyun You are right on this.
Now I added --no-opt on this test. Also
|
@brancz Could you help check this? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. Happy to merge it when the CI is green.
AMD64 tests are passing for 19, 20. 18 has a different stack trace. Maybe we should have a different assertion for that. ARM64 failures are somewhat known, so I'd be happy to merge if we can fix the issue with 18 on amd64. |
Outdated since #2958 |
for #2512