conductor icon indicating copy to clipboard operation
conductor copied to clipboard

Workflow sometimes fails to transition to COMPLETED

Open xesxen opened this issue 8 years ago • 34 comments

Given the attached sample workflow, Conductor sometimes fails to transition to COMPLETED. Even weirder, I've seen the workflow transition from COMPLETED back to RUNNING when refreshing the web interface quickly after starting this workflow.

In the workflow state, the last task (placeholder_false, which is an event) is marked as COMPLETED, but the state of the workflow itself is still RUNNING.

Attached below is a sample workflow, task definition (HTTP) and workflow state. Note: it doesn't trigger every time, but starting multiple instances of the workflow should trigger it.

Used versions:

  • Conductor: v1.11.5
  • Dynomite: f77f2178da46c54d6b2ee2a48866c17ccecd03b7
  • Elasticsearch: 5.6.11

workflow-dummy.json.txt workflow-state.json.txt task_fetch_site.json.txt

xesxen avatar Sep 10 '18 15:09 xesxen

For what its worth, I encountered that too. I dont encounter this for now after I made the changes to dynomite or switched to Elasticache.

saidatta avatar Sep 10 '18 17:09 saidatta

I observe this behaviour when running in-memory - and even more so when running with Dynomite via docker-compose - and starting 100 workflow instances at a time.

Workflows also hang at the start point - they are returned by querying running workflows, but no tasks for them are in the queue.

jwulf avatar Dec 05 '18 00:12 jwulf

I find Workflows with all tasks completed. If I pause the workflow manually in the UI, then resume it, it gets correctly marked as completed.

incompleted paused done

jwulf avatar Dec 06 '18 00:12 jwulf

@apanicker-nflx do we still have this problem?

cyzhao avatar Jan 10 '19 06:01 cyzhao

same issue with docker-compose and Mysql

nullp0int3r avatar Feb 02 '19 14:02 nullp0int3r

This made Conductor unusable for us. We went with Zeebe. They have different priorities from the Conductor team and respond within minutes or hours on GitHub.

jwulf avatar Feb 02 '19 20:02 jwulf

This made Conductor unusable for us. We went with Zeebe. They have different priorities from the Conductor team and respond within minutes or hours on GitHub.

Thank you! I'm gonna have a look ;)

nullp0int3r avatar Feb 03 '19 08:02 nullp0int3r

I have the same problem with this workflow:

running fail1b

In addition, all these executions are identical, therefore, they should have the same value in "Failed Tasks" field ("task_2, task_3"), but it's random. It seems that the threads are overwriting the Status and Failed Tasks values.

running fail2

jmaganATS avatar Feb 05 '19 15:02 jmaganATS

The same problem here after a very small performance test 5 workflows/second for 10 minutes.

dskarataev avatar Feb 08 '19 05:02 dskarataev

Even I have encountered this problem when all subtasks are COMPLETED the workflow is still showing as RUNNING, is their any workaround for this (other than clicking PAUSE and RESUME) ?

Conductor Version: 1.9.0-SNAPSHOT | Build Date: 2018-05-07_17:26:13

garreananth avatar Mar 06 '19 09:03 garreananth

@dskarataev Can you try binding the workflowSweeper as an eagerSingleton in ServerModule or Try the latest conductor-server that has that fix?

saidatta avatar Mar 11 '19 05:03 saidatta

Apologies for delays, We've been running tests to identify root cause of this issue. It is primarily caused by concurrent executions of decide on a workflow. We're working on a fix using distributed locks as interface, and will try to push it as soon as possible. Thanks for your patience.

kishorebanala avatar Mar 12 '19 08:03 kishorebanala

Thanks for taking a look at this issue. Just wondering if there is any update? We are getting about 10% of our workflows finishing all tasks but not completing. We are running the following:

Version: 2.6.0-SNAPSHOT | Build Date: 2019-01-11_23:55:02 DB: Redis

rayscott007 avatar Mar 27 '19 02:03 rayscott007

(3 pods in K8S) Conductor Server/UI version: 2.10.0 (AWS Elasticache)Redis version: 3.2.10 (AWS Elasticsearch)Elasticsearch version: 5.6

I faced similarly issue

We tried to test creating workflow around 30000 workflows and let worker completed every workflow immediately. We faced that around 0 - 300 workflow that stuck at running state even every tasks already done. image

This issue can be fixed manually by pause and then resume workflow, workflow itself will change state to complete.

So now, I am still waiting for updates from conductor team about this case.

boshido avatar Apr 10 '19 07:04 boshido

If this case happens in very low concurrent request. I'm a bit curious, How your guys handle this case base on one of contributor said "there are around 1,000,000 workflow executed in each day" ?

And any ETA for solving this issue ?, it cause a lot of problem in real world.

boshido avatar Apr 29 '19 11:04 boshido

Update: We would like to provide a simple implementation that works with existing Dynomite cluster. Dynomite team is looking into providing Redlock implementation in dyno-client, which conductor can piggy back on when available. This is the best possible implementation that could provide reasonable guarantees and works for most of the existing users. ETA for this feature is dependent on Dynomite's implementation.

Meanwhile, we shall provide unimplemented locking interface, which users can implement with their own locking infra, like Redlock + Redisson or similar implementations. Zookeeper might work, provided we can acquire and release lock from same thread. We'll give this a try, and might provide a Zookeeper lock implementation later (Low priority as not everyone might have access to a Zookeeper cluster).

Please understand the risks involved in doing so, and exercise caution when plugging in implementations. ETA for locking interface is first or second week of May.

kishorebanala avatar Apr 29 '19 18:04 kishorebanala

@kishorebanala Thank you for an update :3 Base on what you said I'm about to ask just for clarifying

We use Redis instead of Dynomite we have to wait for implementation of locking interface, right ?

But for someone else who use Dynomite, they need to wait for Dynomite team provide RedLook for handle this issue, right ?

boshido avatar Apr 30 '19 04:04 boshido

@boshido That's correct. If you're already using Redis cluster and have access to any Redlock implementation, you can plug it in to the interface. For folks using Dynomite, we're actively working with Dynomite team to implement Redlock algorithm in dyno-client.

Tagging @milongapau here, who is currently looking into locking interface implementation.

kishorebanala avatar May 10 '19 21:05 kishorebanala

@kishorebanala : is there an update in the timelines for this? It was initially first or second week of may. Also, is there a detailed design proposal so that the community can review and add comments ? It will also help us to think of the concrete implementation for say, Redis

mudit3774 avatar May 11 '19 07:05 mudit3774

@mudit3774 Apologies for slight delays in providing locking interface implementation. @milongapau is working on this feature, and we'll open a PR ASAP. Also, I've opened above #1137 to start a conversation.

Thanks for the suggestion of design proposal. Given this is one of the critical features, we'll publish our notes outlining overall design and edge cases to be solved to #1137.

kishorebanala avatar May 13 '19 05:05 kishorebanala