This repository contains a collection of tools to assist in supporting Apache Cloudberry (Incubating) deployments.
This project is licensed under the Apache License, Version 2.0. See LICENSE for the full license text.
Location: scripts/apache_cloudberry_core_analyzer.py
A utility for analyzing PostgreSQL core files in Apache Cloudberry (Incubating) environments. It provides detailed analysis of core dumps and can identify patterns across multiple core files.
- Single core file analysis with detailed GDB inspection
- Multiple core file analysis with pattern detection
- Signal and stack trace analysis
- Shared library dependency inspection
- JSON output for further processing
- Comparison of multiple core files to identify common crash patterns
- Custom core file pattern matching
- Pretty-printed JSON output for readability
- Python 3.6+
- GDB (GNU Debugger)
- Apache Cloudberry (Incubating) environment (GPHOME must be set)
- Rocky Linux 8 compatible
- Analyze a single core file:
./apache_cloudberry_core_analyzer.py /path/to/core.1234
- Analyze all core files in a directory:
./apache_cloudberry_core_analyzer.py /path/to/core/files/
- Analyze and compare multiple core files:
./apache_cloudberry_core_analyzer.py /path/to/core/files/ --compare
- Custom core pattern matching:
./apache_cloudberry_core_analyzer.py --core-pattern="core-*" /path/to/core/files/
- View the JSON output:
# Using Python's json.tool
cat core_analysis_YYYYMMDD_HHMMSS.json | python3 -m json.tool
# Using less
less core_analysis_YYYYMMDD_HHMMSS.json
The analyzer produces JSON output files for both individual analyses and comparisons:
- Individual analysis:
core_analysis_YYYYMMDD_HHMMSS.json
- Comparison results:
core_comparison_YYYYMMDD_HHMMSS.json
The JSON format is chosen for:
- Structured representation of analysis data
- Easy programmatic processing
- Human readability with proper formatting
- Tool integration capabilities
We welcome contributions! Please see CONTRIBUTING.md for guidelines.
For questions and support:
- Check the documentation in the
scripts/
directory - File an issue in the GitHub repository
- Provide relevant sections of core analysis when reporting issues
This project builds on the excellent work of the PostgreSQL and GDB communities.