Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Concurrency issue in foreach tasks #164

Closed
kikofernandez opened this issue May 10, 2015 · 5 comments
Closed

Concurrency issue in foreach tasks #164

kikofernandez opened this issue May 10, 2015 · 5 comments
Assignees

Comments

@kikofernandez
Copy link
Contributor

There seems to be a concurrency / parallelism issue when running the test async_foreach and async_force_gc. The consequence of this issue is a deadlock of the program.

@kikofernandez kikofernandez self-assigned this May 10, 2015
@albertnetymk
Copy link
Contributor

Comparing the cycle detector with the task runner, I can't find where task runner is set as system actor. Maybe this is the reason, partially? If so, it's good opportunity to extract task runner out like how cycle detector is implemented.

@kikofernandez
Copy link
Contributor Author

the task runner is not a system actor. Currently, the task runner has the same type as the Main active actor. The reason for this was to re-use the main actor's dispatcher method

@kikofernandez
Copy link
Contributor Author

@albertnetymk could you confirm that you get an assert error when popping an actor from the scheduler? I have tested this on Mac and Linux and that is not the case running vagrant.

In my case, there seems to be a data race that sets the number of scheduler_waiting to a value bigger than scheduler_count. This breaks the quiescent algorithm and the program ends up in an infinite loop.

Working on it, but would like to confirm that there's some consistency between platforms.

@albertnetymk
Copy link
Contributor

Sometimes this shows:
async_force_gc: sched/scheduler.c:330: run: Assertionpop(sched) == ((void *)0)' failed.`

I used --ponythreads 16, btw.

@kikofernandez
Copy link
Contributor Author

ok, thanks! I have never seen than one yet, but I'll keep it in mind.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants