pSpaces / goSpace

Programming with Spaces in Go
MIT License
11 stars 5 forks source link

Deadlock and crash in workflow #16

Open albertolluch opened 6 years ago

albertolluch commented 6 years ago

This is likely not a new bug, but a subtle one we know and that needs a fix. I in any case reporting this as a test case for the debugging and the fix.

This example sometimes deadlocks and sometimes crashes (fatal error: concurrent map writes), especially when removing time.Sleep operations:

https://github.com/pSpaces/goSpace-examples/blob/master/tutorial/workflow-0/main.go

ghost commented 6 years ago

The aggregation-policy branch has resolved the issue, but it is not merged into master.

The bug lies in typefield.go. Merging typefield.go and typefield_test.go from aggregation-policy to master should resolve this issue.

albertolluch commented 6 years ago

I guess you refer to concurrent map issue, not to the deadlock.