GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — [v6.x backport] node internals' postmortem metadata (#14901, #18530, #18653) by mmarchini · Pull Request #19323 · nodejs/node

Conversation

@mmarchini

@mmarchini mmarchini commented Mar 13, 2018

Copy link
Copy Markdown
Contributor

Backport of #14901, #18530 and #18653 to v6.x.

I had some problems to backporting the tests, and I'm not sure if the current changes on test/cctest/node_test_fixture.h are the best approach for v6.x. If someone could review the changes in this file I'd really appreciate.

Checklist
  • make -j4 test (UNIX), or vcbuild test (Windows) passes
  • tests and/or benchmarks are included
  • documentation is changed or added
  • commit message follows commit guidelines

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Matheus Marchini and others added 3 commits March 13, 2018 12:53
Matheus Marchini Matheus Marchini
src, test: node internals' postmortem metadata
cad9554
Before these changes, only V8 added postmortem metadata to Node's
binary, limiting the possibilities for debugger's developers to add some
features that rely on investigating Node's internal structures.

These changes are first steps towards empowering debug tools to
navigate Node's internal structures. One example of what can be
achieved with this is shown at nodejs/llnode#122 (a command which prints
information about handles and requests on the queue for a core dump
file). Node postmortem metadata are prefixed with nodedbg_.

This also adds tests to validate if all postmortem metadata are
calculated correctly, plus some documentation on what is postmortem
metadata and a few care to be taken to avoid breaking it.

Ref: nodejs/llnode#122
Ref: nodejs/post-mortem#46

PR-URL: nodejs#14901
Refs: nodejs/post-mortem#46
Reviewed-By: Michael Dawson <[email protected]>
Reviewed-By: Matteo Collina <[email protected]>
Reviewed-By: Ben Noordhuis <[email protected]>
Reviewed-By: Joyee Cheung <[email protected]>
@bnoordhuis Matheus Marchini
test: fix cctest -Wunused-variable warning
3d1b6ef
PR-URL: nodejs#18530
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: Joyee Cheung <[email protected]>
Reviewed-By: Daniel Bevenius <[email protected]>
@joyeecheung Matheus Marchini
src: do not redefine private for GenDebugSymbols
c7040a1
Redefining private breaks any private inheritance in the
included files. We can simply declare GenDebugSymbols()
as friends in related classes to gain the access that we need.

PR-URL: nodejs#18653
Reviewed-By: Anna Henningsen <[email protected]>
Reviewed-By: Ben Noordhuis <[email protected]>
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: James M Snell <[email protected]>
@nodejs-github-bot nodejs-github-bot added c++ Issues and PRs that require attention from people who are familiar with C++. lib / src Issues and PRs involving general changes in the lib/ or src/ directories. v6.x labels Mar 13, 2018
@mmarchini

mmarchini commented Mar 13, 2018

Copy link
Copy Markdown
Contributor Author

CI: https://ci.nodejs.org/job/node-test-pull-request/13658/

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@mmarchini mmarchini added the wip Issues and PRs that are still a work in progress. label Mar 13, 2018
@mmarchini

mmarchini commented Mar 13, 2018

Copy link
Copy Markdown
Contributor Author

Failures are related. I'll take a look at it later.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@joaocgreis

joaocgreis commented Mar 14, 2018

Copy link
Copy Markdown
Member

I aborted a node-test-binary-windows that had been running for 8 hours, apparently just stuck on cctest. This might also be related. Since there are other failures I will not restart the job now.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@gibfahn gibfahn assigned MylesBorins Mar 14, 2018
@MylesBorins MylesBorins added the semver-minor PRs that contain new features and should be released in the next minor version. label Mar 20, 2018
@MylesBorins

MylesBorins commented Mar 20, 2018

Copy link
Copy Markdown
Contributor

If we wanted to land this it should come as semver-minor. unsure if we want to do another minor before v6.x goes into maintenance mode

/cc @nodejs/lts

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@joyeecheung

joyeecheung commented Mar 20, 2018

Copy link
Copy Markdown
Member

@MylesBorins My opinion would be yes, it's worth it. This helps diagnose various kinds of bugs in v6.x should there be any when it's in maintenance mode.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@mmarchini

mmarchini commented Mar 20, 2018

Copy link
Copy Markdown
Contributor Author

I agree with @joyeecheung.

Regarding the failing tests: test/cctest/test_node_postmortem_metadata.cc was heavily inspired on test/cctest/test_environment.cc and it uses the EnvironmentTestFixture (which was created for test_environment.cc). There's no test_environment.cc in v6.x, and I'm having a hard time backporting EnvironmentTestFixture to v6.x. If anyone have some I would really appreciate: https://github.com/mmarchini/node/blob/c7040a17af9f25dbc967bad9c2ad71da34387ff8/test/cctest/node_test_fixture.h#L64-L144

Alternatively, we could remove tests for this or write simpler ones in v6.x:

TEST_F(DebugSymbolsTest, BaseObjectPersistentHandle) {
  EXPECT_EQ(nodedbg_offset_BaseObject__persistent_handle___v8_Persistent_v8_Object,
            OffsetOf(&BaseObject::persistent_handle_));
}

FWIW the metadata is working on nodejs/llnode#122 (Demo: https://asciinema.org/a/qgfHneUACrD0iGXwmFc37rXC4)

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@gibfahn

gibfahn commented Mar 22, 2018

Copy link
Copy Markdown
Member

If we wanted to land this it should come as semver-minor. unsure if we want to do another minor before v6.x goes into maintenance mode

If we're going to consider this we should look at all the possible minors and make a decision based on that. We did a minor quite recently (Feb 13th), and we don't want to do a minor after we go into maintenance if we can avoid it, so we'd need to make the decision quite quickly.

I'm thinking an issue in nodejs/Release, and a Release meeting in the next week or two would be good.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@MylesBorins

MylesBorins commented Mar 23, 2018 via email

Copy link
Copy Markdown
Contributor
Let’s get a meeting together for next week. If we are going to do it we will need to make the next v6.x release a minor
…
On Mar 22, 2018, at 4:15 PM, Gibson Fahnestock ***@***.***> wrote: If we wanted to land this it should come as semver-minor. unsure if we want to do another minor before v6.x goes into maintenance mode If we're going to consider this we should look at all the possible minors and make a decision based on that. We did a minor quite recently (Feb 13th), and we don't want to do a minor after we go into maintenance if we can avoid it, so we'd need to make the decision quite quickly. I'm thinking an issue in nodejs/Release, and a Release meeting in the next week or two would be good. — You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub <#19323 (comment)>, or mute the thread <https://github.com/notifications/unsubscribe-auth/AAecV3Z4tKBsIT3E9Atw0CvmQVQWR0x-ks5tg849gaJpZM4So_a8>.
All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@MylesBorins
MylesBorins force-pushed the v6.x-staging branch 2 times, most recently from 0a4c79b to 988cca8 Compare March 30, 2018 03:28
@MylesBorins

MylesBorins commented Apr 12, 2018

Copy link
Copy Markdown
Contributor

It is not looking like we are going to be doing another feature related minor on 6.x. Should we close this?

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@mmarchini

mmarchini commented Apr 12, 2018

Copy link
Copy Markdown
Contributor Author

No problem, I'll close this then.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@mmarchini mmarchini closed this Apr 12, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

No reviews

Uh oh!

There was an error while loading. Please reload this page.

Assignees

@MylesBorins MylesBorins

Labels

c++ Issues and PRs that require attention from people who are familiar with C++. lib / src Issues and PRs involving general changes in the lib/ or src/ directories. semver-minor PRs that contain new features and should be released in the next minor version. wip Issues and PRs that are still a work in progress.

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

7 participants

@mmarchini @joaocgreis @MylesBorins @joyeecheung @gibfahn @nodejs-github-bot @bnoordhuis
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.
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.