Skip to content
gomathishankar37 edited this page Feb 6, 2026 · 2 revisions

Crashupload Wiki

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.

πŸ“‹ Table of Contents

Overview

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:

  1. Compiled C Code - Modern, optimized, production-ready implementation (v2.0.0+)
  2. Shell Script Method - Legacy implementation for compatibility

Key Features

πŸš€ Performance & Efficiency

  • 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)

πŸ”’ Security & Privacy

  • 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

🎯 Smart Processing

  • 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

πŸ“Š Telemetry & Monitoring

  • T2 telemetry integration for event reporting
  • RFC configuration support for dynamic feature control
  • Comprehensive logging via RDK Logger framework
  • Upload success/failure tracking

Architecture

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     β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

File Structure Overview

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

Getting Started

Prerequisites

  • RDK platform environment
  • For compiled code: GCC, autotools, libcurl, libcrypto (OpenSSL)
  • For testing: GTest framework

Quick Start

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.sh

Documentation

Explore 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 History

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.

Contributing

We welcome contributions! To contribute:

  1. Fork the repository
  2. Create a feature branch
  3. Make your changes with tests
  4. Submit a pull request
  5. 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

License

This project is licensed under the Apache License 2.0. See LICENSE for details.

Support & Contact


Quick Links: Crashupload - Compiled Code | Crashupload - Script Method | Workflows & Actions