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

intermittent "an unknown error occurred" #1913

Closed
sourcefrog opened this issue Aug 17, 2015 · 8 comments
Closed

intermittent "an unknown error occurred" #1913

sourcefrog opened this issue Aug 17, 2015 · 8 comments

Comments

@sourcefrog
Copy link
Contributor

On OS X 10.10.4, with

cargo 0.4.0-nightly (15b497b 2015-07-08) (built 2015-07-09)
rustc 1.2.0 (082e47636 2015-08-03)

I get a few times a day:

% cargo test
   Compiling conserve v0.2.0 (file:///Users/mbp/Code/conserve-rust)
Build failed, waiting for other jobs to finish...
An unknown error occurred

To learn more, run the command again with --verbose.

Unfortunately the error goes away when I re-run with or without --verbose. I guess I should just use it every time until I get more info.

@alexcrichton
Copy link
Member

Do you happen to have Cargo running in the background as well? Currently concurrent invocations of Cargo will generally result in badness. Otherwise yeah unfortunately this isn't very actionable without a better backtrace of what happened.

@sourcefrog
Copy link
Contributor Author

Not intentionally but it's possible Atom was running it in the background. Could we add a lockfile or something to make this less confusing?

@alexcrichton
Copy link
Member

It's largely just a hunch of mine, you're more likely to see compile errors from concurrent Cargo invocations than Cargo errors itself, but that's tracked by #354 as well. Just want to confirm it's a dupe before closing this one

@sourcefrog
Copy link
Contributor Author

I'll turn that off and see if I can reproduce this.

@achanda
Copy link
Contributor

achanda commented Aug 17, 2015

@alexcrichton why didn't we merge alexcrichton@dbbc696 ?

@alexcrichton
Copy link
Member

It was an experiment that didn't end up panning out on all platforms for various reasons if I remember correctly, but I unfortunately don't precisely remember why any more.

@sourcefrog
Copy link
Contributor Author

Semaphores won't work over NFS or other network filesystems. If you don't care about NFS, most of the objections in http://0pointer.de/blog/projects/locking.html go away and you can use flock on unix.

I think actually the least worst option is probably a file existence lock holding the running cargo's pid. It has the substantial advantage you can tell the user waiting for cargo process 123... and give them a chance to understand why it's stopped.

@sourcefrog
Copy link
Contributor Author

I think this is a dupe and it looks like Byron has a patch well underway, so great.

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