-
Notifications
You must be signed in to change notification settings - Fork 236
Add crash handling/debugging support, and version metadata generation #328
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
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…Debugging section in DEVELOPMENT.md
The macos-13 runner images have been retired as of December 2024. Update the workflow to use macos-14 for building with older OpenSSL versions (1.1 and 1.0.2). Also simplified the workflow by removing unnecessary matrix strategy.
After building on macOS, verify that: - memtier_benchmark --version works correctly - The binary is linked against the expected libevent library
Update --version to display comprehensive build details in Redis-like format: - Version number (v=) - Git SHA and dirty status (sha=) - Architecture bits (bits=) - libevent version (libevent=) - OpenSSL version if TLS enabled (openssl=) Example output: v=255.255.255 sha=8985eb5a:1 bits=64 libevent=2.1.12-stable openssl=OpenSSL 3.0.13 30 Jan 2024
Change --version output format to show all build information on the first line: memtier_benchmark v=255.255.255 sha=8985eb5a:1 bits=64 libevent=2.1.12-stable openssl=OpenSSL 3.0.13 30 Jan 2024 This makes it easier to parse and matches the Redis version output style.
paulorsousa
approved these changes
Dec 17, 2025
fcostaoliveira
added a commit
that referenced
this pull request
Jan 5, 2026
…#328) * Add crash handling/debugging support, and version metadata generation * fixed macos build errors due to crash handler code. * Include a link in the main README to the detailed Crash Handling and Debugging section in DEVELOPMENT.md * Include strings.h for strcasecmp() on POSIX systems * Update GitHub Actions to use macos-14 instead of retired macos-13 The macos-13 runner images have been retired as of December 2024. Update the workflow to use macos-14 for building with older OpenSSL versions (1.1 and 1.0.2). Also simplified the workflow by removing unnecessary matrix strategy. * Update GitHub Actions to use macos-14 instead of retired macos-13 * Add version and libevent verification step to macOS builds After building on macOS, verify that: - memtier_benchmark --version works correctly - The binary is linked against the expected libevent library * Enhance --version output to include detailed build information Update --version to display comprehensive build details in Redis-like format: - Version number (v=) - Git SHA and dirty status (sha=) - Architecture bits (bits=) - libevent version (libevent=) - OpenSSL version if TLS enabled (openssl=) Example output: v=255.255.255 sha=8985eb5a:1 bits=64 libevent=2.1.12-stable openssl=OpenSSL 3.0.13 30 Jan 2024 * Move detailed version info to first line of --version output Change --version output format to show all build information on the first line: memtier_benchmark v=255.255.255 sha=8985eb5a:1 bits=64 libevent=2.1.12-stable openssl=OpenSSL 3.0.13 30 Jan 2024 This makes it easier to parse and matches the Redis version output style. * Extra sanity check on CI by printing version and linked libs * Fixed ldd grep * only checking for ssl lib when built with tls
fcostaoliveira
added a commit
that referenced
this pull request
Jan 5, 2026
…#328) * Add crash handling/debugging support, and version metadata generation * fixed macos build errors due to crash handler code. * Include a link in the main README to the detailed Crash Handling and Debugging section in DEVELOPMENT.md * Include strings.h for strcasecmp() on POSIX systems * Update GitHub Actions to use macos-14 instead of retired macos-13 The macos-13 runner images have been retired as of December 2024. Update the workflow to use macos-14 for building with older OpenSSL versions (1.1 and 1.0.2). Also simplified the workflow by removing unnecessary matrix strategy. * Update GitHub Actions to use macos-14 instead of retired macos-13 * Add version and libevent verification step to macOS builds After building on macOS, verify that: - memtier_benchmark --version works correctly - The binary is linked against the expected libevent library * Enhance --version output to include detailed build information Update --version to display comprehensive build details in Redis-like format: - Version number (v=) - Git SHA and dirty status (sha=) - Architecture bits (bits=) - libevent version (libevent=) - OpenSSL version if TLS enabled (openssl=) Example output: v=255.255.255 sha=8985eb5a:1 bits=64 libevent=2.1.12-stable openssl=OpenSSL 3.0.13 30 Jan 2024 * Move detailed version info to first line of --version output Change --version output format to show all build information on the first line: memtier_benchmark v=255.255.255 sha=8985eb5a:1 bits=64 libevent=2.1.12-stable openssl=OpenSSL 3.0.13 30 Jan 2024 This makes it easier to parse and matches the Redis version output style. * Extra sanity check on CI by printing version and linked libs * Fixed ldd grep * only checking for ssl lib when built with tls
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
This PR introduces a full crash-handling subsystem for memtier_benchmark (like redis has), significantly improving debuggability, observability, and issue-reporting capabilities.
It also adds automatic version metadata generation and updates documentation to reflect new debugging workflows.
Testing the Crash Handler
You can test the crash handler functionality by sending a signal to a running memtier_benchmark process:
This will trigger the crash handler and display the bug report. This is useful for:
Test scripts are also available:
The integration tests include 2 types of crashs (main thread and worker thread).
# Integration tests with active connections - using RLTest framework $ TEST=test_crash_handler_integration.py ./tests/run_tests.shFurther docs on core dump analysis
We have expanded the docs to have a core-dump analysis section to include clear, step-by-step instructions for verifying that core dumps are generated, locating them depending on the system's crash handler (direct core files, systemd-coredump, or Apport), and loading them into gdb or coredumpctl.