-
Notifications
You must be signed in to change notification settings - Fork 3
Home
Welcome to the crashupload project documentation! Crashupload is a robust and efficient crash dump management system designed for RDK (Reference Design Kit) devices across multiple platforms.
Crashupload is a critical diagnostic tool that automatically collects, processes, and uploads crash dumps from RDK devices to centralized servers for analysis. It helps development teams identify and resolve stability issues by capturing detailed crash information including:
- Minidumps (.dmp files) - Compact crash dumps from applications
- Coredumps (core.* files) - Full process memory dumps
- Associated log files - Context from breakpad logmapper
The project provides two implementation approaches:
- Compiled C Code - Modern, optimized, production-ready implementation (v2.0.0+)
- Shell Script Method - Legacy implementation for compatibility
- Optimized startup time: 80-100ms (vs 150-200ms in legacy)
- Low memory footprint: 4-6MB during operation
- Small binary size: ~45KB compiled executable
- 37% reduction in decision points (22 vs 35)
- TLS 1.2 encryption for all uploads
- OCSP stapling support for certificate validation
- Privacy opt-out compliance via RFC
- No insecure system() calls in production code
- Stack protection and buffer overflow guards
- Type-aware retry logic: Different strategies for minidumps vs coredumps
- Unified rate limiting: 10 uploads per 10 minutes with crashloop detection
- Smart archive compression: Optimal paths with /tmp fallback
- Batch cleanup operations: Efficient single-pass processing
- Network prerequisite checking: Wait for connectivity before upload
- T2 telemetry integration for event reporting
- RFC configuration support for dynamic feature control
- Comprehensive logging via RDK Logger framework
- Upload success/failure tracking
Crashupload follows a modular, layered architecture:
βββββββββββββββββββββββββββββββββββββββββββββββ
β Main Application Entry β
β (uploadDumps.sh / main.c) β
βββββββββββββββββββββββββββββββββββββββββββββββ
β
βββββββββββββ΄ββββββββββββ
β β
βββββββββΌββββββββββ ββββββββββΌββββββββββ
β Shell Scripts β β C Compiled β
β (Legacy) β β β
βββββββββ¬ββββββββββ ββββββββββ¬ββββββββββ
β β
βββββββββββββ¬ββββββββββββ
β
βββββββββββββββββββββββββββββββββββββββββββββββ
β Core Processing Modules β
β β’ Scanner β’ Archive β’ Upload β
β β’ RateLimit β’ Cleanup β’ Privacy β
βββββββββββββββββββββββββββββββββββββββββββββββ
β
βββββββββββββββββββββββββββββββββββββββββββββββ
β Integration Interfaces β
β β’ T2 Telemetry β’ RFC Config β’ Logger β
βββββββββββββββββββββββββββββββββββββββββββββββ
crashupload/
βββ c_sourcecode/ # Modern C implementation
β βββ src/
β β βββ main.c # Entry point
β β βββ scanner/ # Dump file discovery
β β βββ archive/ # Compression & archiving
β β βββ upload/ # HTTP/TLS upload logic
β β βββ ratelimit/ # Rate limiting & flood control
β β βββ config/ # Configuration management
β β βββ platform/ # Platform abstraction
β β βββ utils/ # Utilities (logging, locking, etc.)
β βββ include/ # Public headers
β βββ common/ # Shared types & constants
β
βββ scripts/ # Legacy shell implementation
β βββ uploadDumps.sh # Main upload orchestrator
β βββ runDumpUpload.sh # Legacy script runner (1177 lines)
β βββ uploadDumpsUtils.sh # Utility functions
β
βββ unittest/ # Unit test suite (GTest)
β βββ *_gtest.cpp # 69 comprehensive tests
β
βββ test/functional-tests/ # L2 functional tests
β
βββ .github/workflows/ # CI/CD automation
β βββ native_full_build.yml # Build validation
β βββ L1-Test.yml # Unit test execution
β βββ L2-Test.yml # Functional test execution
β
βββ docs/migration/ # Migration documentation
βββ hld/ # High-level design
βββ lld/ # Low-level design
βββ diagrams/ # Architecture diagrams
- RDK platform environment
- For compiled code: GCC, autotools, libcurl, libcrypto (OpenSSL)
- For testing: GTest framework
Using the compiled binary:
cd c_sourcecode
autoreconf -i
./configure
make
./crashupload <dump_file_path> <type>Using the shell script:
./uploadDumps.sh <dump_file_path> <type> [secure]Running tests:
cd unittest
./build_and_test.shExplore detailed documentation for different aspects:
| Page | Description |
|---|---|
| Crashupload - Compiled Code | In-depth guide to the C implementation, architecture, and optimization techniques |
| Crashupload - Script Method | Legacy shell script implementation, flow, and usage |
| Workflows & Actions | CI/CD pipelines, automated testing, and quality gates |
| Configuration Guide | Device properties, RFC parameters, and runtime configuration |
| Testing Guide | Unit tests (L1), functional tests (L2), and testing strategies |
| Troubleshooting | Common issues, debugging tips, and log analysis |
| Version | Date | Key Changes |
|---|---|---|
| 2.0.0 | Current | C implementation, rate limit improvements, session sync |
| 1.0.7 | Oct 2025 | Component log fixes |
| 1.0.6 | Sep 2025 | Multi-platform federation |
| 1.0.5 | Jul 2025 | T2 telemetry support |
| 1.0.4 | Feb 2025 | Script optimization |
See CHANGELOG.md for complete history.
We welcome contributions! To contribute:
- Fork the repository
- Create a feature branch
- Make your changes with tests
- Submit a pull request
- Sign the RDK Contributor License Agreement (CLA)
All PRs automatically trigger:
- β Build validation
- β L1 unit tests (69 test cases)
- β L2 functional tests
- β Code quality checks
This project is licensed under the Apache License 2.0. See LICENSE for details.
- Issues: GitHub Issues
- Discussions: GitHub Discussions
- Documentation: This wiki
Quick Links: Crashupload - Compiled Code | Crashupload - Script Method | Workflows & Actions