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

Windows, Bazel at HEAD: non-fatal java.nio.file.NoSuchFileException in --batch mode #5442

Closed
laszlocsomor opened this issue Jun 21, 2018 · 14 comments
Assignees
Labels
P1 I'll work on this now. (Assignee required) platform: windows type: bug

Comments

@laszlocsomor
Copy link
Contributor

Description of the problem / feature request:

Bazel built from HEAD (5a9befc) reports a (non-fatal) java.nio.file.NoSuchFileException at startup.

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

  1. Build Bazel at 5a9befc (I used bazel build -c opt src:bazel.exe)

  2. Run that Bazel:

Extracting Bazel installation...
Can't load log handler "java.util.logging.FileHandler"
java.nio.file.NoSuchFileException: c:tmp2\mrcjhyly\java.log.lck
java.nio.file.NoSuchFileException: c:tmp2\mrcjhyly\java.log.lck
        at java.base/sun.nio.fs.WindowsException.translateToIOException(WindowsException.java:85)
        at java.base/sun.nio.fs.WindowsException.rethrowAsIOException(WindowsException.java:103)
        at java.base/sun.nio.fs.WindowsException.rethrowAsIOException(WindowsException.java:108)
        at java.base/sun.nio.fs.WindowsFileSystemProvider.newFileChannel(WindowsFileSystemProvider.java:116)
        at java.base/java.nio.channels.FileChannel.open(FileChannel.java:292)
        at java.base/java.nio.channels.FileChannel.open(FileChannel.java:340)
        at java.logging/java.util.logging.FileHandler.openFiles(FileHandler.java:511)
        at java.logging/java.util.logging.FileHandler.<init>(FileHandler.java:278)
        at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
        at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
        at java.base/jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
        at java.base/java.lang.reflect.Constructor.newInstance(Constructor.java:488)
        at java.base/java.lang.Class.newInstance(Class.java:558)
        at java.logging/java.util.logging.LogManager.createLoggerHandlers(LogManager.java:997)
        at java.logging/java.util.logging.LogManager.access$1300(LogManager.java:155)
        at java.logging/java.util.logging.LogManager$4.run(LogManager.java:968)
        at java.logging/java.util.logging.LogManager$4.run(LogManager.java:964)
        at java.base/java.security.AccessController.doPrivileged(Native Method)
        at java.logging/java.util.logging.LogManager.loadLoggerHandlers(LogManager.java:964)
        at java.logging/java.util.logging.LogManager.initializeGlobalHandlers(LogManager.java:2389)
        at java.logging/java.util.logging.LogManager.access$1800(LogManager.java:155)
        at java.logging/java.util.logging.LogManager$RootLogger.accessCheckedHandlers(LogManager.java:2483)
        at java.logging/java.util.logging.Logger.getHandlers(Logger.java:2089)
        at java.logging/java.util.logging.Logger.log(Logger.java:976)
        at java.logging/java.util.logging.Logger.doLog(Logger.java:1006)
        at java.logging/java.util.logging.Logger.log(Logger.java:1029)
        at java.logging/java.util.logging.Logger.info(Logger.java:1802)
        at com.google.devtools.build.lib.analysis.BlazeVersionInfo.logVersionInfo(BlazeVersionInfo.java:64)
        at com.google.devtools.build.lib.analysis.BlazeVersionInfo.setBuildInfo(BlazeVersionInfo.java:79)
        at com.google.devtools.build.lib.bazel.Bazel.main(Bazel.java:65)
WARNING: --batch mode is deprecated. Please instead explicitly shut down your Bazel server using the command "bazel shutdown".
                                                     [bazel development version]
Usage: bazel <command> <options> ...

Available commands:
(...omitted...)

What operating system are you running Bazel on?

Windows 10, 1709

@laszlocsomor laszlocsomor self-assigned this Jun 21, 2018
@laszlocsomor laszlocsomor added type: bug P1 I'll work on this now. (Assignee required) labels Jun 21, 2018
@laszlocsomor
Copy link
Contributor Author

Bisected, culprit is 7c49bd9.

@laszlocsomor laszlocsomor assigned cushon and unassigned laszlocsomor Jun 21, 2018
@laszlocsomor
Copy link
Contributor Author

/cc @buchgr , this week's sheriff
/cc @meteorcloudy , we saw this issue in your presubmit too

@laszlocsomor
Copy link
Contributor Author

The culprit commit seems completely unrelated. I think it just surfaced a latent bug.

@meteorcloudy
Copy link
Member

Thank you for debugging this!

@meteorcloudy
Copy link
Member

meteorcloudy commented Jun 21, 2018

@laszlocsomor I wonder why this test is not failing at HEAD on CI. See https://buildkite.com/bazel/bazel-bazel

@laszlocsomor
Copy link
Contributor Author

@meteorcloudy : It only happens in --batch mode. It does not happen in server mode, not even on server startup.

@meteorcloudy
Copy link
Member

I see!

@laszlocsomor
Copy link
Contributor Author

Since --batch mode is apparently deprecated (according to the warning in the output), I think we can deprioritize this bug.

@laszlocsomor
Copy link
Contributor Author

/cc @cvcal

@laszlocsomor laszlocsomor changed the title Windows, Bazel at HEAD: non-fatal java.nio.file.NoSuchFileException Windows, Bazel at HEAD: non-fatal java.nio.file.NoSuchFileException in --batch mode Jun 21, 2018
@laszlocsomor laszlocsomor added P3 We're not considering working on this, but happy to review a PR. (No assignee) and removed P1 I'll work on this now. (Assignee required) labels Jun 21, 2018
@filipesilva
Copy link

Can confirm that this happen on every command outside of server usage. It's confusing to see the message right after downloading a new bazel version and just running bazel outside a workspace, but it doesn't seem to affect usage inside a workspace.

@cvcal
Copy link
Contributor

cvcal commented Aug 15, 2018

Running bazel outside a workspace does not create a server, so it's --batch implicitly. This particular usecase of batch isn't going away, so that users can still call bazel outside workspaces for things like bazel help, so I think the issue won't go away

@meteorcloudy meteorcloudy added P1 I'll work on this now. (Assignee required) and removed P3 We're not considering working on this, but happy to review a PR. (No assignee) labels Aug 16, 2018
@meteorcloudy
Copy link
Member

@cvcal Thanks for explaining, I think we should fix this issue

@meteorcloudy meteorcloudy self-assigned this Aug 16, 2018
@meteorcloudy
Copy link
Member

meteorcloudy commented Aug 16, 2018

Looks like this issue doesn't exist anymore after we upgraded embedded JDK to JDK 10. (4c9149d)
But @cvcal , you might want to fix #5906

@meteorcloudy
Copy link
Member

This one is resolved.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
P1 I'll work on this now. (Assignee required) platform: windows type: bug
Projects
None yet
Development

No branches or pull requests

5 participants