Skip to content

Crashupload Compiled Code

gomathishankar37 edited this page Jun 2, 2026 · 3 revisions

Crashupload - Compiled Code

This page covers the C implementation under c_sourcecode/.

Build

From repo root:

./cov_build.sh

L2 test-mode build:

./cov_build.sh --l2-test

Notes:

  • cov_build.sh installs to /usr/local/bin/crashupload
  • --l2-test adds -DL2_TEST so uptime is read from /opt/uptime

CLI contract

Current positional pattern:

crashupload <arg1> <dump_type> [secure] [wait_for_lock]
  • <dump_type>: 0 minidump, 1 coredump
  • secure: use /opt/secure/* paths
  • wait_for_lock: wait for lock instead of immediate exit

Key implementation areas

  • c_sourcecode/src/main.c: high-level orchestration
  • c_sourcecode/src/config/config_manager.c: config loading and dump mode
  • c_sourcecode/src/scanner/: dump discovery
  • c_sourcecode/src/archive/: archive creation
  • c_sourcecode/src/upload/: upload pipeline
  • c_sourcecode/src/ratelimit/: rate limiting

Runtime caveat

Even when C binary exists, uploadDumps.sh currently routes:

  • mediaclient: binary-first
  • broadband and extender: legacy script path

See Crashupload - Script Method for legacy behavior.

Testing references

  • L1 unit tests: ./run_ut.sh
  • L2 functional tests: ./run_l2.sh (after ./cov_build.sh --l2-test)
  • L2 mapping details: L2_TESTS.md

Navigation

Clone this wiki locally