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

Exploratory debug symbols & crash dump analysis (Windows) #23456

Closed
9 tasks done
Tracked by #21739
ncvicchi opened this issue May 15, 2024 · 4 comments
Closed
9 tasks done
Tracked by #21739

Exploratory debug symbols & crash dump analysis (Windows) #23456

ncvicchi opened this issue May 15, 2024 · 4 comments
Assignees
Labels
level/subtask type/enhancement New feature or request

Comments

@ncvicchi
Copy link
Member

ncvicchi commented May 15, 2024

Related issue
#21736
#21739

Description

This issue aims to make a exploratory session of current #9913 phase 1 development for the Agent instance of the Windows package.

Verifications should be performed on the following issues to check end to end the process from generation of symbols to crash dump analysis with them.

These verifications must be performed by a different collaborator than the originally assigned to the issue, and a full detail of procedures, logs and results must be provided.
Evidence of success must be provided as well.

Goals

  • Verify that binary and debug symbols packages are correctly generated by following the current documentation
  • Verify that binary & debug symbols packages are automatically uploaded to their designated locations.
  • Verify that packages perform a successful installation by following the current documentation.
  • Verify that the installed agent instance runs succesfully.
  • Verify that a crash dump is generated on simulated failure.
  • Verify that debug symbols are suitable to debug/analyze the crash dumps.
  • Verify that the documentation used during all the exploratory is adequate, correct and complete.
  • Verify that crash dump generation can be enabled and disabled just by following the proper documentation.

DoD

  • Packages for binaries and debug symbols are generated by following documentation.
  • Packages are confirmed to be uploaded to their designated location. @jotacarma90
  • Installation is tested and validated.
  • Installed agent behaves as expected.
  • A simulation of failure is performed and as a result a crash dump is generated. @aritosteles
  • Crash dump is successfully analyzed by using the corresponding debug symbols. @aritosteles
  • No documentation errors are found or left uncorrected. @aritosteles
  • Crash dump generation is validated to be enabled or disabled just by following the proper documentation. @aritosteles
  • Extensive evidence and documentation of the exploratory is provided @aritosteles

Approval
DRI Name: @ncvicchi
Objective: Generate debug symbols

@ncvicchi
Copy link
Member Author

Blocked by #22947

@ncvicchi ncvicchi self-assigned this May 20, 2024
@aritosteles
Copy link
Contributor

aritosteles commented May 27, 2024

Test completed:

Cloned repo:

Cloned wazuh/wazuh repository and checked out branch

enhancement/9913-generate-debug-symbols-epic-CP

Generated compiled windows agent:

sudo ./generate_compiled_windows_agent.sh --output wazuh_agent_test

1-generate-compiled-windows-agent

Copied resulting zip file to Windows host and generated msi file and debug symbols zip:

.\generate_wazu_msi.ps1

9-msi-creation-output

Run msi as administrator and verify registry key is created:

2-registry-key-created

Cleared registry key:

According to Windows documentation a crash dump is not generated if there is a default debugger configured. Manually cleared the appropriate registry key.

3-registry-key-cleared

Generated crash dump:

Modified executable to crash on startup and generate a crash dump in the designated location.

4-generated-crash-dump

Analyzed dump file with WinDbg:

10-windbg-output

@Dwordcito Dwordcito assigned jotacarma90 and unassigned ncvicchi May 28, 2024
@Dwordcito
Copy link
Member

@jotacarma90 will check if the debug symbols are uploaded to s3

@Dwordcito Dwordcito changed the title Exploratory extensive testing to ensure reliability and performance of debug symbols & crash dump analysis (Windows) Exploratory debug symbols & crash dump analysis (Windows) May 31, 2024
@Dwordcito
Copy link
Member

LGTM.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
level/subtask type/enhancement New feature or request
Projects
Status: Done
Development

No branches or pull requests

4 participants