﻿# ROS lifecycle deactivation gates managed publication, not every operation in the process

Review the actual LifecyclePublisher and owned resources before interpreting an inactive ROS node as a stopped timer, thread or physical device.

Author: Retrivium team
Updated: 2026-11-06
Canonical URL: https://retrivium.ai/journal/robotics-lifecycle-publisher-deactivation-not-process-freeze/
Language: en

## Inactive is a state with an implementation contract

A perception node reports Inactive after an operator requests deactivation. The dashboard assumes that its process has stopped all work and released the camera. That conclusion requires more than a state label. A managed lifecycle provides a way to organize behavior, but each relevant publisher, worker and device needs the intended ownership. Identify which operation deactivation must suppress: outgoing measurements, acquisition, background processing or physical actuation. These are different effects even when one transition is meant to coordinate them.

## The design states an intended managed behavior

The [managed-node design](https://design.ros2.org/articles/node_lifecycle.html) separates configuration, activation and deactivation. It describes resources held through configuration and resources acquired for active operation. Use that model to assign ownership: which callback acquires a device, which transition stops its work and what happens if cleanup fails? The design document describes an intended lifecycle contract. It is not evidence that a particular driver connected every ordinary callback or external library thread to those transitions.

## The reviewed publisher has a concrete gate

The reviewed [LifecyclePublisher implementation](https://raw.githubusercontent.com/ros2/rclcpp/rolling/rclcpp_lifecycle/include/rclcpp_lifecycle/lifecycle_publisher.hpp) checks is_activated before forwarding a message to its publisher base. An inactive call returns instead of publishing through that path. The [managed-entity interface](https://raw.githubusercontent.com/ros2/rclcpp/rolling/rclcpp_lifecycle/include/rclcpp_lifecycle/managed_entity.hpp) locates activation and deactivation on the managed object. This establishes a specific output gate. It does not establish that the caller stopped executing, that an unrelated publisher uses this gate or that a camera acquisition thread released its device.

## Trace ownership before adding a transition label

Inventory timers, subscriptions, device handles, asynchronous workers and publishers used by the node. Mark which ones are managed entities and which are application-owned resources. Define ordering where deactivation must stop workers before releasing memory they use. A successful transition should have an observable completion criterion for the effect the application promises. Do not make unrelated work disappear from the inventory because the class inherits from a lifecycle node; inheritance alone cannot explain an external resource’s cleanup behavior.

## Observe callback execution separately from output

Propose a dummy managed publisher driven by a harmless callback with an independent local marker. Observe the marker and received messages through configure, activate and deactivate. Inspect any ordinary publisher or worker separately under its declared application policy. Acceptance requires the managed output gate and the promised resource changes, with their evidence distinguished. No ROS node or camera was run here. This proposed fixture does not validate physical stopping distance, fault tolerance or a certified machine-stop function.

## Publish the scope of Inactive in the component contract

[Startup and readiness probes](/journal/provider-startup-readiness-liveness-separation/) distinguish another state boundary. [Artifact and observation availability in RDT](/journal/fg2-rdt-unified-state-vector-availability-map/) addresses the content of an available state vector. For the ROS component, document which outputs stop, which resources remain allocated and which observations establish transition completion. Inactive then becomes a precise application state rather than a shorthand for universal quiescence. Repeat that ownership review when adding a new worker or replacing a managed publisher.
