Skip to content

Internal error while doing build with bazel #6952

Closed

Description

@sanjaypujare

ATTENTION! Please read and follow:

Description of the problem / feature request:

Internal error from Bazel:

Internal error thrown during build. Printing stack trace: java.lang.RuntimeException: Unrecoverable error while evaluating node 'REPOSITORY_DIRECTORY:@com_google_protobuf' (requested by nodes 'REPOSITORY:@com_google_protobuf')
at com.google.devtools.build.skyframe.AbstractParallelEvaluator$Evaluate.run(AbstractParallelEvaluator.java:499)
at com.google.devtools.build.lib.concurrent.AbstractQueueVisitor$WrappedRunnable.run(AbstractQueueVisitor.java:368)
at java.base/java.util.concurrent.ForkJoinTask$AdaptedRunnableAction.exec(Unknown Source)
at java.base/java.util.concurrent.ForkJoinTask.doExec(Unknown Source)
at java.base/java.util.concurrent.ForkJoinPool$WorkQueue.localPopAndExec(Unknown Source)
at java.base/java.util.concurrent.ForkJoinPool.runWorker(Unknown Source)
at java.base/java.util.concurrent.ForkJoinWorkerThread.run(Unknown Source)
Caused by: java.lang.IllegalArgumentException: Invalid EvalException:
java.lang.ExceptionInInitializerError
at java.base/javax.crypto.JceSecurityManager.(Unknown Source)
at java.base/javax.crypto.Cipher.getConfiguredPermission(Unknown Source)

Feature requests: what underlying problem are you trying to solve with this feature?

Just using Bazel to do a build of grpc-java

Bugs: what's the simplest, easiest way to reproduce this bug? Please provide a minimal example if possible.

Launch a build from in my PR grpc/grpc-java#5162

What operating system are you running Bazel on?

Ubuntu Linux

What's the output of bazel info release?

NA

If bazel info release returns "development version" or "(@Non-Git)", tell us how you built Bazel.

NA

What's the output of git remote get-url origin ; git rev-parse master ; git rev-parse HEAD ?

NA

Have you found anything relevant by searching the web?

No

Any other information, logs, or outputs that you want to share?

https://source.cloud.google.com/results/invocations/c481bd43-7e26-45c6-b501-c37e1c5b4aa6/targets/grpc%2Fjava%2Fpresubmit%2Fbazel/log

Activity

  1. added
    team-Rules-Java
    untriaged
    on Dec 18, 2018
  2. irengrig commented on Dec 18, 2018

    @irengrig
    Contributor

    /cc @iirina I am not sure if that is a P1, please check.

  3. added
    team-ExternalDeps
    and removed
    team-Rules-Java
    on Mar 13, 2019
  4. lberki commented on Mar 13, 2019

    @lberki
    Contributor

    Off to the external deps folks because this doesn't seem to be specific to Java if the exception dump is anything to go by.

  5. added
    P1
    and removed
    untriaged
    on Mar 21, 2019
  6. dslomov commented on Mar 21, 2019

    @dslomov
    Contributor

    @aehlig could you take a look at this crash bug? Relevant stacktrace from logs:

    Caused by: java.lang.IllegalArgumentException: Invalid EvalException:
    java.lang.ExceptionInInitializerError
    	at java.base/javax.crypto.JceSecurityManager.<clinit>(Unknown Source)
    	at java.base/javax.crypto.Cipher.getConfiguredPermission(Unknown Source)
    	at java.base/javax.crypto.Cipher.getMaxAllowedKeyLength(Unknown Source)
    	at java.base/sun.security.ssl.CipherSuite$BulkCipher.isUnlimited(Unknown Source)
    	at java.base/sun.security.ssl.CipherSuite$BulkCipher.<init>(Unknown Source)
    	at java.base/sun.security.ssl.CipherSuite$BulkCipher.<clinit>(Unknown Source)
    	at java.base/sun.security.ssl.CipherSuite.<clinit>(Unknown Source)
    	at java.base/sun.security.ssl.SSLContextImpl.getApplicableSupportedCipherSuiteList(Unknown Source)
    	at java.base/sun.security.ssl.SSLContextImpl.access$100(Unknown Source)
    	at java.base/sun.security.ssl.SSLContextImpl$AbstractTLSContext.<clinit>(Unknown Source)
    	at java.base/java.lang.Class.forName0(Native Method)
    	at java.base/java.lang.Class.forName(Unknown Source)
    	at java.base/java.security.Provider$Service.getImplClass(Unknown Source)
    	at java.base/java.security.Provider$Service.newInstance(Unknown Source)
    	at java.base/sun.security.jca.GetInstance.getInstance(Unknown Source)
    	at java.base/sun.security.jca.GetInstance.getInstance(Unknown Source)
    	at java.base/javax.net.ssl.SSLContext.getInstance(Unknown Source)
    	at java.base/javax.net.ssl.SSLContext.getDefault(Unknown Source)
    	at java.base/javax.net.ssl.SSLSocketFactory.getDefault(Unknown Source)
    	at java.base/javax.net.ssl.HttpsURLConnection.getDefaultSSLSocketFactory(Unknown Source)
    	at java.base/javax.net.ssl.HttpsURLConnection.<init>(Unknown Source)
    	at java.base/sun.net.www.protocol.https.HttpsURLConnectionImpl.<init>(Unknown Source)
    	at java.base/sun.net.www.protocol.https.Handler.openConnection(Unknown Source)
    	at java.base/java.net.URL.openConnection(Unknown Source)
    	at com.google.devtools.build.lib.bazel.repository.downloader.HttpConnector.connect(HttpConnector.java:93)
    	at com.google.devtools.build.lib.bazel.repository.downloader.HttpConnectorMultiplexer.establishConnection(HttpConnectorMultiplexer.java:301)
    	at com.google.devtools.build.lib.bazel.repository.downloader.HttpConnectorMultiplexer.connect(HttpConnectorMultiplexer.java:126)
    	at com.google.devtools.build.lib.bazel.repository.downloader.HttpDownloader.download(HttpDownloader.java:246)
    	at com.google.devtools.build.lib.bazel.repository.skylark.SkylarkRepositoryContext.downloadAndExtract(SkylarkRepositoryContext.java:392)
    
  7. aehlig commented on Mar 21, 2019

    @aehlig
    Contributor

    @aehlig could you take a look at this crash bug? Relevant stacktrace from logs: [...]

    From the quoted stack trace, the last call in the Bazel code base (HttpConnector.java:93) is url.openConnection(proxy) which itself is a legitimate way of opening a connection. For the calls further up the stack, I can only guess. However, the comment for the javax.crypto.JceSecurityManager class reads as follows.

    /**
     * The JCE security manager.
     *
     * <p>The JCE security manager is responsible for determining the maximum
     * allowable cryptographic strength for a given applet/application, for a given
     * algorithm, by consulting the configured jurisdiction policy files and
     * the cryptographic permissions bundled with the applet/application.
     *
     * <p>Note that this security manager is never installed, only instantiated.
     *
     * @author Jan Luehe
     *
     * @since 1.4
     */
    

    From that I would guess that we're either getting into legal territory, or have an incompletely configured host java. Both are, however, outside the scope of Bazel. So the only thing bazel can do here, is to hide the stack trace and report a permanent error for the attempt of fetching the given repository: https://bazel-review.googlesource.com/c/bazel/+/93750

  8. aehlig commented on Mar 21, 2019

    @aehlig
    Contributor

    Looking at the quoted full log the root cause is two exceptions further down: java.lang.SecurityException: Couldn't parse jurisdiction policy files in: unlimited. I'm not sure there is a way to surface that information while hiding the stack trace.

    So, from a bazel side, we could either leave things as is, or hide the stack trace hoping that the message is explanatory enough.

  9. dslomov commented on Mar 21, 2019

    @dslomov
    Contributor

    #6488 is related

  10. dslomov commented on Mar 21, 2019

    @dslomov
    Contributor

    Closing this as a dupe of #6488

  11. added
    team-OSS
    on Jun 15, 2020
  12. removed
    team-OSS
    on Nov 29, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

P1team-ExternalDepstype: bug

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions