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

Improve the stability of instance creation on a multithreaded environment #4

Open
shinnya opened this issue Nov 7, 2018 · 1 comment

Comments

@shinnya
Copy link
Contributor

shinnya commented Nov 7, 2018

// `SIGSEGV` may be raised if encodings are executed (in parallel) immediately after creation.

std::thread::sleep(Duration::from_millis(10)) is not enough and causes build failures on TravisCI. We need a new solution.

See #2 .

@yuezato
Copy link
Member

yuezato commented Nov 16, 2018

First, we considered this is related to the implementation of Drop.
However, after changing the codes to take a lock in Drop, SIGSEGVs still happen.
yuezato@8f414bd

Indeed, on this commit, we can see the following situation:

$ cargo test
    Finished dev [unoptimized + debuginfo] target(s) in 0.04s
     Running target/debug/deps/liberasurecode-0c14855b0b365a2c

running 44 tests
test tests::it_works ... ok
test tests::reconstruct_fails ... ok
test tests::reconstruct_works ... ok
test tests::test0 ... ok
test tests::test1 ... ok
test tests::test10 ... ok
test tests::test11 ... ok
test tests::test12 ... ok
test tests::test13 ... ok
test tests::test14 ... ok
test tests::test15 ... ok
test tests::test16 ... ok
test tests::test17 ... ok
test tests::test18 ... ok
test tests::test19 ... ok
test tests::test2 ... ok
test tests::test20 ... ok
test tests::test21 ... ok
test tests::test22 ... ok
error: process didn't exit successfully: `/Users/yuuya_uezato/public_frugalos/fork/liberasurecode/target/debug/deps/liberasurecode-0c14855b0b365a2c`
(signal: 11, SIGSEGV: invalid memory reference)

Consequently, we decide to make thread-safe versions of backends of openstack/liberasurecode.

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