conductor icon indicating copy to clipboard operation
conductor copied to clipboard

Workflows get marked Completed while tasks are still remaing

Open mohelsaka opened this issue 7 years ago • 5 comments

We've encountered very weird issue with conductor. Some workflows were marked as "Completed" while their tasks were still "Scheduled". Therefore, those tasks were marked as "Canceled" by the Conductor background systemTask worker.

This happened for HTTP tasks in particular. Looking into the logs of the server, we saw the following warnings:

Workflow WF_ID has been completed for HTTP/TASK_ID

Looking at the code from which this warning come from, it came from here.

Could you please tell me what could be causing this problem?

We're running conductor server v2.9.1 with Redis.

mohelsaka avatar Apr 18 '19 15:04 mohelsaka

Can that be related by anyway to the concurrency problem mentioned in this issue?

mohelsaka avatar Apr 18 '19 16:04 mohelsaka

Hey @mohelsaka, thanks for reporting this. Can you please provide workflow execution json and relevant logs.

kishorebanala avatar Apr 18 '19 17:04 kishorebanala

Hey @kishorebanala, please, check these links out.

  1. Workflows definitions.
  2. Server logs 1.
  3. Server logs 2.

We run Conductor 2.9.1 on 2 servers using a shared Redis and Elasticsearch setup. workflow

ggrekhov avatar Apr 19 '19 14:04 ggrekhov

Hi @kishorebanala, Can we please get help with that? It happened multiple times on our production setup and we failed to find the root cause.

mohelsaka avatar May 06 '19 10:05 mohelsaka

Hey @mohelsaka, apologies for delays. From the logs, I believe it's a concurrency issue. But that's only a part of the problem. One of the concurrent decides have passed checkForWorkflowCompletion, and we cannot reason why. Because this method can be tested in isolation, we'll try to add unit tests with different workflow executions.

On the other side, we're working on a locking solution, which should prevent concurrent decides.

kishorebanala avatar May 06 '19 23:05 kishorebanala