Skip to content

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

Closed

Description

@laszlocsomor

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

Activity

  1. self-assigned this
    on Jun 21, 2018
  2. added
    P1
    on Jun 21, 2018
  3. laszlocsomor commented on Jun 21, 2018

    @laszlocsomor
    ContributorAuthor

    Bisected, culprit is 7c49bd9.

  4. laszlocsomor commented on Jun 21, 2018

    @laszlocsomor
    ContributorAuthor

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

  5. laszlocsomor commented on Jun 21, 2018

    @laszlocsomor
    ContributorAuthor

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

  6. meteorcloudy commented on Jun 21, 2018

    @meteorcloudy
    Member

    Thank you for debugging this!

  7. meteorcloudy commented on Jun 21, 2018

    @meteorcloudy
    Member
  8. laszlocsomor commented on Jun 21, 2018

    @laszlocsomor
    ContributorAuthor

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

  9. meteorcloudy commented on Jun 21, 2018

    @meteorcloudy
    Member

    I see!

  10. laszlocsomor commented on Jun 21, 2018

    @laszlocsomor
    ContributorAuthor

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

  11. laszlocsomor commented on Jun 21, 2018

    @laszlocsomor
    ContributorAuthor

    /cc @cvcal

  12. 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[/+] on Jun 21, 2018
  13. added
    P3
    and removed
    P1
    on Jun 21, 2018
  14. filipesilva commented on Aug 15, 2018

    @filipesilva

    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.

  15. cvcal commented on Aug 15, 2018

    @cvcal
    Contributor

    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

  16. added
    P1
    and removed
    P3
    on Aug 16, 2018
  17. meteorcloudy commented on Aug 16, 2018

    @meteorcloudy
    Member

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

  18. self-assigned this
    on Aug 16, 2018
  19. meteorcloudy commented on Aug 16, 2018

    @meteorcloudy
    Member

    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

  20. meteorcloudy commented on Oct 22, 2018

    @meteorcloudy
    Member

    This one is resolved.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

P1platform: windowstype: bug

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions