ruvnet/ruflo · error

Deadlock detected:

Error message

Deadlock detected:

What it means

System handler registered by EventCoordinator.registerSystemHandlers(): a DEADLOCK_DETECTED system event arrived carrying the involved agents and resources, logged to console.error. The coordinator only reports the deadlock; resolution is left to callers.

Source

Thrown at v3/@claude-flow/shared/src/core/orchestrator/event-coordinator.ts:98

    // Also unregister from event bus
    this.eventBus.off(type, handler);
  }

  getEventBus(): IEventBus {
    return this.eventBus;
  }

  private registerSystemHandlers(): void {
    // Error handling
    this.eventBus.on(SystemEventTypes.SYSTEM_ERROR, (event: IEvent) => {
      const { error, component } = event.payload as { error: Error; component: string };
      console.error(`System error in ${component}:`, error);
    });

    // Deadlock detection
    this.eventBus.on(SystemEventTypes.DEADLOCK_DETECTED, (event: IEvent) => {
      const { agents, resources } = event.payload as { agents: string[]; resources: string[] };
      console.warn('Deadlock detected:', { agents, resources });
    });
  }

  /**
   * Get registered handler count for a type
   */
  getHandlerCount(type: string): number {
    return this.handlers.get(type)?.size ?? 0;
  }

  /**
   * Get all registered event types
   */
  getRegisteredTypes(): string[] {
    return Array.from(this.handlers.keys());
  }

  /**

View on GitHub (pinned to fa13ee4ad6)

Solutions

  1. Inspect the circular wait chain in the event coordinator; break the cycle by reordering subscriptions or adding timeouts.
Defensive patterns

Strategy: fallback

When it happens

Trigger: Thrown at v3/@claude-flow/shared/src/core/orchestrator/event-coordinator.ts:98 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of ruvnet/ruflo@fa13ee4ad6 (2026-08-18). Data as JSON: /api/errors/462fba8a9c9d1cf3. Report an issue: GitHub.