Skip to content

fix(fault_manager): make rosbag capture enablement crash-safe #425

@mfaferek93

Description

@mfaferek93

Enabling black-box rosbag capture is the exact path that can crash the fault_manager on startup. RosbagCapture's constructor validates the storage format by opening a throwaway bag, which throws std::runtime_error when the storage plugin (e.g. rosbag2_storage_mcap) is not available at runtime. That construction in fault_manager_node.cpp is not wrapped in try/catch and main.cpp has none either, so the exception propagates out of main and terminates the process. The published Docker image does not install rosbag2_storage_mcap, so a user who sets snapshots.rosbag.enabled:=true with the default format hits this.

Compounding: the default storage format is mcap in code but the shipped YAML config documents sqlite3, so code and docs disagree on what a user actually gets.

Scope

  • Wrap the RosbagCapture construction so a storage/format failure disables rosbag capture and logs a clear warning instead of terminating the node.
  • Reconcile the default storage format so the code and the YAML config agree.
  • Either ship the storage plugin in the binary/Docker distribution or default to a format that needs no extra plugin, so enabling capture works out of the box.

Acceptance

  • With snapshots.rosbag.enabled:=true and the storage plugin absent, the fault_manager stays up, logs a warning, and continues without rosbag capture.
  • The default storage format is identical in code and in the shipped config.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions