Requirements#

HealthMonitor Requirements
status: valid
security: NO
safety: ASIL_B
tags: lifecycle, health_monitor
version: 1

Safety Concept Summary#

The Health Monitor is an in-process library that supervises the application it is linked into. It detects deviations from the configured temporal and logical behavior and reacts by withholding the alive notification towards the Launch Manager.

  • Safe state: the state the system reaches through the Recovery Action of the Launch Manager. The Health Monitor triggers it by stopping its alive notifications; the Launch Manager detects the missing notifications via its alive supervision.

  • Fail-silent principle: any failure, whether detected in the application or internal to the Health Monitor (crash, hang, panic, starvation), stops the alive notifications and thereby leads to the safe state. A fault can therefore never make the Health Monitor report “alive” for a failed application.

  • Detection channel: the Launch Manager alive supervision is the independent channel that covers failures of the Health Monitor itself.

General#

Configuration without monitor
status: valid
security: NO
safety: ASIL_B
tags: lifecycle, health_monitor
reqtype: Functional
version: 1

The Health Monitor shall return an error when building a configuration in which no monitor is configured.

Note

Monitor specific configuration checks are specified in the section of the respective monitor and in Time range validation (comp_req__health_monitor__cfg_time_range).

Notification cycle alignment
status: valid
security: NO
safety: ASIL_B
tags: lifecycle, health_monitor
reqtype: Functional
version: 1

The Health Monitor shall return an error when building a configuration in which the supervisor notification cycle is not an integer multiple of the internal evaluation cycle.

Time range validation
status: valid
security: NO
safety: ASIL_B
tags: lifecycle, health_monitor
reqtype: Functional
version: 1

The Health Monitor shall return an error when a time range is created whose minimum is greater than its maximum.

Inclusive time range bounds
status: valid
security: NO
safety: ASIL_B
tags: lifecycle, health_monitor
reqtype: Functional
version: 1

The Health Monitor shall treat the minimum and the maximum of a time range as inclusive bounds.

Note

A report exactly at the minimum or exactly at the maximum is not detected as a failure.

Time granularity
status: valid
security: NO
safety: ASIL_B
tags: lifecycle, health_monitor
reqtype: Non-Functional
version: 1

The Health Monitor shall handle time ranges and cycle durations with a granularity of one millisecond.

Sub-millisecond time values
status: valid
security: NO
safety: ASIL_B
tags: lifecycle, health_monitor
reqtype: Functional
version: 1

The Health Monitor shall return an error when a time range or a cycle duration is configured with a value that is not an integer multiple of one millisecond.

Note

Prevents silent truncation, e.g. a minimum truncated to 0 ms would disable the detection of too early reports.

Duplicate monitor identifier
status: valid
security: NO
safety: ASIL_B
tags: lifecycle, health_monitor
reqtype: Functional
version: 1

The Health Monitor shall return an error when building a configuration in which two monitors have the same identifier.

Complete monitor activation
status: valid
security: NO
safety: ASIL_B
tags: lifecycle, health_monitor
reqtype: Functional
version: 1

The Health Monitor shall treat a start of supervision while a configured monitor has not been acquired as a fatal error and terminate the hosting process.

Note

Prevents a monitor that is configured but never fed from silently staying unsupervised.

Single monitor acquisition
status: valid
security: NO
safety: ASIL_B
tags: lifecycle, health_monitor
reqtype: Functional
version: 1

The Health Monitor shall return an error when a monitor that has already been handed out is requested again.

Cyclic evaluation
status: valid
security: NO
safety: ASIL_B
tags: lifecycle, health_monitor
reqtype: Functional
version: 1

Once started, and until a supervision failure has been detected, the Health Monitor shall evaluate all monitors with the configured internal evaluation cycle, independently of the application threads that report to them.

Monotonic time base
status: valid
security: NO
safety: ASIL_B
tags: lifecycle, health_monitor
reqtype: Non-Functional
version: 1

The Health Monitor shall base all time supervision on a monotonic clock that is not affected by wall-clock adjustments.

Heartbeat (Checkpoint) Supervision#

Heartbeat configuration validation
status: valid
security: NO
safety: ASIL_B
tags: lifecycle, health_monitor
reqtype: Functional
version: 1

The Health Monitor shall return an error when building a heartbeat monitor configuration in which the internal evaluation cycle is greater than or equal to twice the minimum of the heartbeat time range.

Note

Ensures that a correctly behaving application never reports more than one heartbeat within one internal evaluation cycle. See Multiple heartbeats (comp_req__health_monitor__hb_multiple).

Heartbeat too late
status: valid
security: NO
safety: ASIL_B
tags: lifecycle, health_monitor
reqtype: Functional
version: 1

The Health Monitor shall detect a heartbeat failure if no heartbeat is reported before the maximum of the configured heartbeat time range has elapsed.

Heartbeat too early
status: valid
security: NO
safety: ASIL_B
tags: lifecycle, health_monitor
reqtype: Functional
version: 1

The Health Monitor shall detect a heartbeat failure if a heartbeat is reported before the minimum of the configured heartbeat time range has elapsed.

Multiple heartbeats
status: valid
security: NO
safety: ASIL_B
tags: lifecycle, health_monitor
reqtype: Functional
version: 1

The Health Monitor shall detect a heartbeat failure if more than one heartbeat is reported within one internal evaluation cycle.

Note

Only the latest heartbeat of an evaluation cycle is kept, so additional heartbeats cannot be checked against the time range individually. Without this check, a later heartbeat could mask an earlier one that was reported too early.

Deadline Supervision#

Deadline configuration validation
status: valid
security: NO
safety: ASIL_B
tags: lifecycle, health_monitor
reqtype: Functional
version: 1

The Health Monitor shall return an error when building a deadline monitor configuration that contains no deadline.

Duplicate deadline identifier
status: valid
security: NO
safety: ASIL_B
tags: lifecycle, health_monitor
reqtype: Functional
version: 1

The Health Monitor shall return an error when building a deadline monitor configuration in which two deadlines have the same identifier.

Exclusive deadline acquisition
status: valid
security: NO
safety: ASIL_B
tags: lifecycle, health_monitor
reqtype: Functional
version: 1

The Health Monitor shall return an error when a deadline is requested while the application still holds it.

Deadline stopped late
status: valid
security: NO
safety: ASIL_B
tags: lifecycle, health_monitor
reqtype: Functional
version: 1

The Health Monitor shall detect a deadline failure if a started deadline is stopped after the configured maximum time has elapsed.

Deadline not stopped
status: valid
security: NO
safety: ASIL_B
tags: lifecycle, health_monitor
reqtype: Functional
version: 1

The Health Monitor shall detect a deadline failure if a started deadline is still running when the configured maximum time has elapsed.

Deadline too early
status: valid
security: NO
safety: ASIL_B
tags: lifecycle, health_monitor
reqtype: Functional
version: 1

The Health Monitor shall detect a deadline failure if a started deadline is stopped before the configured minimum time has elapsed.

Failed deadline reuse
status: valid
security: NO
safety: ASIL_B
tags: lifecycle, health_monitor
reqtype: Functional
version: 1

The Health Monitor shall return an error to the caller when a deadline that has already failed is started again.

Logical Supervision#

Duplicate state identifier
status: valid
security: NO
safety: ASIL_B
tags: lifecycle, health_monitor
reqtype: Functional
version: 1

The Health Monitor shall return an error when building a logic monitor configuration in which two states have the same identifier.

Logic configuration without state
status: valid
security: NO
safety: ASIL_B
tags: lifecycle, health_monitor
reqtype: Functional
version: 1

The Health Monitor shall return an error when building a logic monitor configuration in which no state is defined.

Undefined transition target
status: valid
security: NO
safety: ASIL_B
tags: lifecycle, health_monitor
reqtype: Functional
version: 1

The Health Monitor shall return an error when building a logic monitor configuration in which an allowed transition targets a state that is not defined.

Undefined initial state
status: valid
security: NO
safety: ASIL_B
tags: lifecycle, health_monitor
reqtype: Functional
version: 1

The Health Monitor shall return an error when building a logic monitor configuration in which the initial state is not defined.

Initial logical state
status: valid
security: NO
safety: ASIL_B
tags: lifecycle, health_monitor
reqtype: Functional
version: 1

The Health Monitor shall put every logic monitor into its configured initial state when the monitor is created.

Invalid transition
status: valid
security: NO
safety: ASIL_B
tags: lifecycle, health_monitor
reqtype: Functional
version: 1

The Health Monitor shall detect a logical failure if a reported transition is not among the configured allowed transitions from the current state, and shall return an error to the caller.

Unknown state
status: valid
security: NO
safety: ASIL_B
tags: lifecycle, health_monitor
reqtype: Functional
version: 1

The Health Monitor shall detect a logical failure if a transition to a state that is not configured is reported, and shall return an error to the caller.

Error Reaction#

Alive notification
status: valid
security: NO
safety: ASIL_B
tags: lifecycle, health_monitor
reqtype: Functional
version: 1

While no failure has been detected, the Health Monitor shall send an alive notification to the Launch Manager once per configured supervisor notification cycle.

Withhold alive on failure
status: valid
security: NO
safety: ASIL_B

On detection of any supervision failure, the Health Monitor shall stop sending alive notifications to the Launch Manager.

Failure latching
status: valid
security: NO
safety: ASIL_B
tags: lifecycle, health_monitor
reqtype: Functional
version: 1

Once a supervision failure has been detected, the Health Monitor shall not resume alive notifications for the lifetime of the monitoring instance.

Fail-silent on internal error
status: valid
security: NO
safety: ASIL_B
tags: lifecycle, health_monitor
reqtype: Functional
version: 1

When the Health Monitor detects an internal error, it shall stop sending alive notifications to the Launch Manager.

Note

Detected internal errors include an inconsistent monitor state, a time calculation overflow, and abnormal termination of the evaluation thread. They are traceable to the failure modes of the Health Monitor FMEA. Undetected internal errors are covered by the fail-silent principle and the Launch Manager alive supervision.

Detection latency
status: valid
security: NO
safety: ASIL_B
tags: lifecycle, health_monitor
reqtype: Non-Functional
version: 1

The Health Monitor shall detect a supervision failure no later than one internal evaluation cycle after the failure condition has occurred.

Note

Together with the Launch Manager alive supervision timeout, this bounds the fault reaction time. See Fault tolerant time budget (aou_req__health_monitor__ftti_budget).

Failure logging
status: valid
security: NO
safety: ASIL_B
tags: lifecycle, health_monitor
reqtype: Functional
version: 1

The Health Monitor shall log each detected supervision failure with the monitor identifier and the failure type.

Note

Logging is not a safety mechanism. The error reaction (Withhold alive on failure (comp_req__health_monitor__alive_withhold)) does not depend on successful logging: a blocked or failing logging backend cannot cause an alive notification to be sent after a failure has been detected.

Robustness and Freedom from Interference#

Static memory after start
status: valid
security: NO
safety: ASIL_B
tags: lifecycle, health_monitor
reqtype: Non-Functional
version: 1

The Health Monitor shall not allocate dynamic memory after supervision has been started.

Bounded reporting
status: valid
security: NO
safety: ASIL_B
tags: lifecycle, health_monitor
reqtype: Non-Functional
version: 1

The reporting operations of the Health Monitor (heartbeat, deadline start and stop, state transition) shall have a worst-case execution time that depends only on the configuration of the respective monitor.

Note

Measured worst-case execution times on the reference platform are provided as input for the timing analysis of the integrator, see Evaluation thread scheduling (aou_req__health_monitor__thread_sched) and Fault tolerant time budget (aou_req__health_monitor__ftti_budget).

Non-blocking reporting
status: valid
security: NO
safety: ASIL_B
tags: lifecycle, health_monitor
reqtype: Non-Functional
version: 1

The reporting operations of the Health Monitor (heartbeat, deadline start and stop, state transition) shall not use blocking synchronization primitives, blocking system calls, or dynamic memory allocation.

Concurrent reporting
status: valid
security: NO
safety: ASIL_B
tags: lifecycle, health_monitor
reqtype: Non-Functional
version: 1

The Health Monitor shall keep the monitor state consistent when reporting and cyclic evaluation run concurrently on different threads.

Memory guard pages
status: valid
security: NO
safety: ASIL_B
tags: lifecycle, health_monitor
reqtype: Non-Functional
version: 1

The Health Monitor shall place inaccessible guard pages directly before and after its monitoring data.

Note

Measure for HM_FMEA_003.

Note

Further measure like Arm Memory Tagging Extension will be investigated in the future.

Memory corruption detection
status: valid
security: NO
safety: ASIL_B
tags: lifecycle, health_monitor
reqtype: Functional
version: 1

The Health Monitor shall configure its guard pages such that any access to them terminates the hosting process.

Note

The terminated process stops sending alive notifications, see Fail-silent on internal error (comp_req__health_monitor__fail_silent). Only bulk memory corruption reaches a guard page. Targeted corruption of the monitoring data is covered by Host application integrity (aou_req__health_monitor__host_integrity).

Placeholder#