Skip to content

Nil pointer panic in WorkflowEventHandler on ADD events #5442

@aditya-systems-hub

Description

@aditya-systems-hub

What happened:

When the ChaosCenter subscriber receives an ADD event for an already existing workflow, the WorkflowEventHandler attempts to access fields from oldObj.Status.Nodes without checking whether oldObj is nil.

Since oldObj is nil during ADD events, this results in a nil pointer dereference. The subscriber panics and restarts, which can lead to crash loops and inconsistent event streaming behavior.

What you expected to happen:

The WorkflowEventHandler should safely handle ADD events without causing a nil pointer panic. Proper nil checks should be performed before accessing oldObj.Status.Nodes, and invalid or zero-value events should not be pushed to the stream.

Where can this issue be corrected? (optional)

Subscriber → WorkflowEventHandler logic
Specifically in the section where oldObj.Status.Nodes is accessed during ADD event handling.

How to reproduce it (as minimally and precisely as possible):

  1. Restart the control plane.
  2. Allow the subscriber to process ADD events for already existing workflows.
  3. Observe panic logs showing nil pointer dereference.
  4. Notice that the subscriber restarts and may enter a crash loop.

Anything else we need to know?:

This issue can affect experiment observability and may lead to inconsistent workflow or experiment state updates when the subscriber crashes repeatedly.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions