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

Travis CI error #64

Open
Munksgaard opened this issue Sep 3, 2020 · 11 comments
Open

Travis CI error #64

Munksgaard opened this issue Sep 3, 2020 · 11 comments

Comments

@Munksgaard
Copy link
Owner

What went wrong here? https://travis-ci.org/github/Munksgaard/session-types/jobs/723468416

The error message is a bit disconcerting...

@laumann
Copy link
Collaborator

laumann commented Sep 4, 2020

That looks odd.

@laumann
Copy link
Collaborator

laumann commented Sep 4, 2020

My best bet is that it's something to do with the rustc version? I'm gonna try with rustc 1.47.0-beta.2 (84b047bf6 2020-08-28)

@Munksgaard
Copy link
Owner Author

It fixed itself the next day using the same version of rustc: https://travis-ci.org/github/Munksgaard/session-types/jobs/723815091

So I think it's either because of an undiscovered race-condition in our code, or a failure on Travis. I guess it could also be a race condition in the library or compiler...

@laumann
Copy link
Collaborator

laumann commented Sep 4, 2020 via email

@Munksgaard
Copy link
Owner Author

Some worrying details from the log:

(signal: 4, SIGILL: illegal instruction)
thread panicked while panicking. aborting.

Also, the test is supposed to panic, so shouldn't the panic be picked up by the test system?

@Munksgaard
Copy link
Owner Author

It happened again! This time on nightly:

https://travis-ci.org/github/Munksgaard/session-types/jobs/725958105

@laumann
Copy link
Collaborator

laumann commented Sep 10, 2020 via email

@Munksgaard
Copy link
Owner Author

Munksgaard commented Sep 10, 2020 via email

@Munksgaard
Copy link
Owner Author

@Manishearth Would you have any idea what's going on here?

@Manishearth
Copy link
Collaborator

No idea.

@Munksgaard
Copy link
Owner Author

Aha! I think I have managed to reproduce the error locally:

extern crate session_types;

use session_types::*;

fn server(c: Chan<(), Recv<(), Eps>>) {
    let (c, ()) = c.recv();
    c.close();
}

fn drop_client(_c: Chan<(), Send<(), Eps>>) {}

#[test]
#[should_panic]
fn server_client_incomplete_panics_2() {
    let (c1, c2) = session_channel();
    drop_client(c1);
    server(c2);
}

I think we should get rid of the Drop impl. Yes, it will then be possible to cause a deadlock when using session_channel as in the example I just posted, but a SIGKILL and illegal instruction might be worse.

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

3 participants