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

UnifiedBackendTest: concurrent calls to open() #179

Open
mhier opened this issue Sep 17, 2020 · 0 comments
Open

UnifiedBackendTest: concurrent calls to open() #179

mhier opened this issue Sep 17, 2020 · 0 comments

Comments

@mhier
Copy link
Member

mhier commented Sep 17, 2020

Write a test case in the UnifiedBackendTest which calls open() on the same device in different threads concurrently. This should be done once to actually open the backend, and once more to recover from an exception.

The idea is to check whether the underlying flags (usually _isOpened and _hasActiveException, but this is of course implementation dependent) are, if they exist, thread safe (e.g. atomics or protected by a mutex).

The main indication for this bug would then be that TSAN finds a data race (because it is rather unlikely for this to actually go wrong). Hence make sure (by reintroducing the bug in one of the backends) that TSAN actually complains if the bug exisits.

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

1 participant