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

doc(llnode): add user journey guide #587

Closed
wants to merge 3 commits into from
Closed

doc(llnode): add user journey guide #587

wants to merge 3 commits into from

Conversation

tony-go
Copy link
Member

@tony-go tony-go commented Aug 24, 2022

Context

This pull request aims to document llnode user journey.

Ref: nodejs/llnode#401
Ref: #502

Update

  • Create a structure
  • Validate the structure together
  • Write down the content
  • Reviews the whole
  • Announce & celebrate 🎉

@tony-go tony-go self-assigned this Aug 24, 2022
@tony-go
Copy link
Member Author

tony-go commented Aug 24, 2022

Why this structure?

My idea was to slowly bring the reader from basic theoretical concepts to basic usage of lldb. Then, once the reader sees the missing parts, we call llnode to the rescue and learn basic usage.

WDYT?

@No9
Copy link
Member

No9 commented Aug 24, 2022

Love it!! I am a big fan of this exploratory style of tutorial.
Especially the "it's not doing what was expected this is how we fix it".

If I could suggest a finesse:
Do you think it would be worth while continuing with that concept into the third section?
Specifically having the solution to the crash being a variable that is only available in the objects and not in the backtrace.
This "extra lightbulb" would demonstrate the value of having the dump over a just a backtrace which is what most people seem to think a core dump is for.

Copy link
Member

@RafaelGSS RafaelGSS left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The diagnostics documentation is around the User Journey. We normally try to simulate a real-world use case, for example: https://github.com/nodejs/diagnostics/tree/main/documentation/poor-performance#my-application-has-a-poor-performance and then use the steps to fix that.

So, overall the content seems pretty good. But, I believe we'll need to elaborate on the user journey as well.

@tony-go
Copy link
Member Author

tony-go commented Aug 25, 2022

Thanks for your feedback @No9 & @RafaelGSS 🙌

Specifically having the solution to the crash being a variable that is only available in the objects and not in the backtrace. (@No9)

Could you give me an example? Something like an OOM? Where the size of an object is causing the crash.

The diagnostics documentation is around the User Journey (@RafaelGSS)

The journey we decide to follow here is the "post-mortem debugging," and llnode will be the solution. Make sense? Or I didn't get your point?

The journey through these events:

  • I have an application that crash, and it's hard to analyze the root causes
  • I enable core dump
  • I use lldb, but it misses something
  • I used llnode; I got "all" what I need

@No9
Copy link
Member

No9 commented Aug 25, 2022

My idea is line with what @RafaelGSS suggested.
The journey should define a common use case (something that is likely to happen in the real world) to highlight the benefits /features of llnode.
For Example in this article https://developer.ibm.com/articles/explore-nodejs-core-dumps-using-the-llnode-plugin-for-lldb/ the example steps through a missing function call in a http server.
Not only does it generate the crash but it also demonstrates getting additional information from the dump that you wouldn't get in the backtrace.

@tony-go
Copy link
Member Author

tony-go commented Aug 25, 2022

Thanks again @No9 :)

I have exactly the same vision, it's also what I try to accomplish in that one https://nodejs.org/en/docs/guides/diagnostics/memory/using-gc-traces/

Here is what we could do to move forward:

  • I'll write down the introduction and fill subparts with a few lines.
  • Then you'll probably have a better idea about where I'd like to go

WDYT?

@tony-go
Copy link
Member Author

tony-go commented Sep 5, 2022

Hey @No9 @RafaelGSS 👋 - I added a few lines and updated the structure. Let me know if it fits your expectations 🙌

documentation/crash/step2/using_llnode.md Outdated Show resolved Hide resolved

## Concepts

### What is post-mortem debugging?
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think this is needed. Even being important, I don't see beginners going to this document as a first reference. I see this document as a tutorial on a specific workflow, in this case, using llnode to diagnose application crash.

So, for instance, I'd replace the sections of What is *** to Finding function using llnode or Get crash report using llnode

Does that make sense?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think this is needed. Even being important, I don't see beginners going to this document as a first reference. I see this document as a tutorial on a specific workflow, in this case, using llnode to diagnose application crash.

I agree to delete the What is post-mortem debugging; it seems too broad. But for the two others (core dumps & lldb) it could be relevant IMO. What we could do is invite people that are familiar with these concepts to go to the next chapter. WDYT?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

SGTM

## Concepts

> ✋ If you familliar with the concept of core dump and `lldb`,
> please skip this chapter, and start [here](#explore-your-firstcore-dump)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
> please skip this chapter, and start [here](#explore-your-firstcore-dump)
> please skip this chapter, and start [here](#explore-your-first-core-dump)

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice catch

@tony-go tony-go changed the title doc(llnode): add structure doc(llnode): add user journey guide Sep 15, 2022
@github-actions github-actions bot added the stale label Dec 15, 2022
@github-actions github-actions bot closed this Dec 30, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants