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

Race condition issue in loading of openblas #174

Closed
MPopovych opened this issue Aug 1, 2023 · 0 comments
Closed

Race condition issue in loading of openblas #174

MPopovych opened this issue Aug 1, 2023 · 0 comments
Assignees
Labels
bug Something isn't working native An issue/PR related to Native
Milestone

Comments

@MPopovych
Copy link

Minimal sample to reproduce:
https://github.com/MPopovych/MultikRaceConditionIssue/blob/main/src/main/kotlin/Main.kt

System: MacOS 13.0.1 M1 Pro
Ide: Intellij
Dependencies:

  • org.jetbrains.kotlinx:multik-core:0.2.2
  • org.jetbrains.kotlinx:multik-openblas:0.2.2

Description:
Calling on any linear algebra method from multiple threads causes multiple calls on JvmNativeEngine -> Loader::load()
This then leads to a collision of Files.copy and an java.nio.file.FileAlreadyExistsException is thrown

To work around this I am pre initialising the library with a Synchronized annotation, but this can be done on the library level

@devcrocod devcrocod added the bug Something isn't working label Aug 2, 2023
@devcrocod devcrocod self-assigned this Jan 15, 2024
@devcrocod devcrocod added this to the 0.3.0 milestone Jan 15, 2024
@devcrocod devcrocod added the native An issue/PR related to Native label Jan 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working native An issue/PR related to Native
Projects
None yet
Development

No branches or pull requests

2 participants