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 causing very rare hang in SECC. #13

Closed
rsimmonsjr opened this issue Sep 10, 2019 · 2 comments
Closed

Race condition causing very rare hang in SECC. #13

rsimmonsjr opened this issue Sep 10, 2019 · 2 comments
Assignees
Labels
bug Something isn't working

Comments

@rsimmonsjr
Copy link
Owner

This is a race condition found by running the tests in a loop in bash.

$ while cargo test; do true; done

Occasionally the channel just hangs. Most likely having to do with the Condvar signaling on waiting for available message or space to enqueue message. This issue is to debug and solve that.

@rsimmonsjr rsimmonsjr added the bug Something isn't working label Sep 10, 2019
@rsimmonsjr rsimmonsjr self-assigned this Sep 10, 2019
@FenrirWolf
Copy link

FenrirWolf commented Sep 13, 2019

I'm able to reproduce the hang pretty reliably with this monte carlo example in axiom.

When I run the example in LLDB I get this trace for the dispatcher thread and this trace for the send_after thread.

I also added some debug prints to Axiom. I took these lines here and changed them like so:

while !system.data.shutdown_triggered.load(Ordering::Relaxed) {
    if let Ok(actor) = receiver.receive_await_timeout(thread_timeout) {
        Actor::receive(actor);
    } else {
        println("Else branch reached");
    }
    println!("looping");
}

Which resulted in this output to stdout.

@rsimmonsjr
Copy link
Owner Author

Fixed.

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

2 participants