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

Cache access synchronisation does not work across processes #620

Open
kyllingstad opened this issue Nov 4, 2020 · 0 comments
Open

Cache access synchronisation does not work across processes #620

kyllingstad opened this issue Nov 4, 2020 · 0 comments
Labels
bug Something isn't working

Comments

@kyllingstad
Copy link
Member

kyllingstad commented Nov 4, 2020

When running two or more cosim instances in parallel, some of them will exit with the following error message:

error: Resource deadlock avoided

Some googling reveals that this error message comes from the deadlock avoidance mechanism in Linux's threading system, which means that libcosim is probably using some synchronisation primitives in the wrong way.

To reproduce this, try the following command line:

cosim run path/to/system_structure --output-dir=out1 &; cosim run path/to/system_structure --output-dir=out2

This will spawn the first command as a background job and immediately continue with the second command, resulting in two parallel instances of cosim that try to access the same cache at the same time.

@kyllingstad kyllingstad added the bug Something isn't working label Nov 4, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant