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
[Bug] ExecArtifact
crash on concurrency execution (native API)
#1168
Comments
Sorry, I did not mark on this API that it is indeed not thread safe, this is a feature to be implemented. |
I tried to research this problem a little (and update testcase repo). It looks like parallel execution breaks down in at least the following cases:
|
You are right! They use the same address and global variables to share the KCL runtime, which currently does not support concurrent running. We are working hard to solve this problem, which is a bit tricky, similar to the parallelism issue of Python GIL and JVM, but it is expected that the 0.9 version KCL runtime will support concurrency. |
``` cargo test --package kclvm-api --features llvm -- --nocapture ```
Since version 0.8.4+, the |
Thank you for your feedback. I will investigate it. I did modify the build logic before two versions, but added locks for different build threads. 😷 |
Looks there are some memoty corruption between 0.8.3 and 0.8.4+. |
Thank you very much for your feedback. I will carefully review the recent updates to identify factors. It is expected that version 0.8.6 will be released next week. |
I found my crashes-after-upgrade root cause: kcl-lang/lib#73 (I have locally applications with differ kcl version). |
ExecArtifact
crash on concurrency execution (native API)ExecArtifact
crash on concurrency execution (native API)
Bug Report
ExecArtifact
crash on parallel execution (serial execution works fine).1. Minimal reproduce step (Required)
Clone small test (go lang):
Test source code:
2. What did you expect to see? (Required)
All test passed
3. What did you see instead (Required)
Errors like:
Or crash like:
4. What is your KCL components version? (Required)
kcl-lang.io/kcl-go v0.8.2
The text was updated successfully, but these errors were encountered: