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

HttpDownloader connection timeout causes "build interrupted" error. #3851

Closed
ondrasej opened this issue Oct 2, 2017 · 4 comments
Closed
Assignees
Labels
bad error messaging Issues where users get stuck because they don't understand what they did wrong P2 We'll consider working on this in future. (Assignee optional) team-ExternalDeps External dependency handling, remote repositiories, WORKSPACE file. type: bug

Comments

@ondrasej
Copy link

ondrasej commented Oct 2, 2017

Please provide the following information. The more we know about your system and use case, the more easily and likely we can help.

Description of the problem:

User perspective: When HTTP connection times out when downloading a dependency via new_http_archive(), bazel build ends with error message "build interrupted" and no additional details. This error message is wrong, as it points to a wrong direction, and does not provide any additional pointers for debugging the problem.

Technically: When there is a new_http_archive() that times out, the com.google.devtools.build.lib.bazel.repository.downloader.HttpConnectorMultiplexer#connect call in
com.google.devtools.build.lib.bazel.repository.downloader.HttpDownloader#download, line 201, throws InterruptedIoException. This causes the HttpDownloader to throw InterruptedException, which is then
caught in com.google.devtools.build.lib.buildtool.BuildTool#processRequest, line 353, and interpreted as user interrupt.

I've debugged this on/line numbers come from: https://github.com/bazelbuild/bazel/releases/download/0.6.0/bazel-0.6.0-dist.zip.

If possible, provide a minimal example to reproduce the problem:

In the WORKSPACE file, have a new_http_archive() rule with an URL that causes connection timeouts.
Run "bazel build ...".

A not so minimal example:

git clone https://github.com/google/EXEgesis.git
cd EXEgesis
git checkout a7f455bbeb8be7bf16b188986996d6ab2542961e
bazel build ...

Environment info

  • Operating System: Linux (Ubuntu, Arch), OS X
  • Bazel version (output of bazel info release): release 0.6.0

Have you found anything relevant by searching the web?

I didn't find any posts or threads referring to this problem.

@aehlig aehlig added category: extensibility > external repositories P2 We'll consider working on this in future. (Assignee optional) type: bug labels Oct 2, 2017
@aehlig
Copy link
Contributor

aehlig commented Oct 2, 2017

Thanks for the detailed bug report. This is indeed a misleading way of error handling.

@TravisWhitaker
Copy link

Just hit this myself; surprised there's not more activity on this.

@ctiller
Copy link

ctiller commented Jan 9, 2018

I think I'm seeing this also.

@ccl0326
Copy link

ccl0326 commented Jun 21, 2018

I'm seeing this too, and this error is a little obscure.

mmitalidis added a commit to mmitalidis/bazel that referenced this issue Sep 23, 2018
When a remote server does not respond at all, a SocketTimeoutException
is thrown which is mistakenly interpreted as an InterruptedIOException.
Thus not printing an error message. This commit fixes it.
see: bazelbuild#3851
@dslomov dslomov added bad error messaging Issues where users get stuck because they don't understand what they did wrong team-ExternalDeps External dependency handling, remote repositiories, WORKSPACE file. and removed category: extensibility > external repositories labels Mar 21, 2019
@philwo philwo added the team-OSS Issues for the Bazel OSS team: installation, release processBazel packaging, website label Jun 15, 2020
@philwo philwo removed the team-OSS Issues for the Bazel OSS team: installation, release processBazel packaging, website label Nov 29, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bad error messaging Issues where users get stuck because they don't understand what they did wrong P2 We'll consider working on this in future. (Assignee optional) team-ExternalDeps External dependency handling, remote repositiories, WORKSPACE file. type: bug
Projects
None yet
Development

No branches or pull requests

7 participants