Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8014394

(fs) WatchService failing when watching \\server\$d

    XMLWordPrintable

Details

    • b93
    • Verified

    Backports

      Description

        FULL PRODUCT VERSION :
        java version " 1.7.0_21 "
        Java(TM) SE Runtime Environment (build 1.7.0_21-b11)
        Java HotSpot(TM) 64-Bit Server VM (build 23.21-b01, mixed mode)

        ADDITIONAL OS VERSION INFORMATION :
        Microsoft Windows [Version 6.1.7601]
        Windows 2008 R2 Standard sp1

        EXTRA RELEVANT SYSTEM CONFIGURATION :
        I've tested the program http://docs.oracle.com/javase/tutorial/essential/io/examples/WatchDir.java on several servers, both physical and virtual, domain members and standalone with the same result. All most probably have a few things in common (install media, antivirus software, etc).

        A DESCRIPTION OF THE PROBLEM :
        * Download http://docs.oracle.com/javase/tutorial/essential/io/examples/WatchDir.java
        * Compile WatchDir.java
        * Execute: java WatchDir c:\ <= Works
        * Execute java WatchDir d:\ <= Works
        * Execute java WatchDir \\<name_of_host>\c$ <= Works
        * Execute java WatchDir \\<name_of_host>\d$ <= Doesn't work
        * Create directory c:\temp\c and share as c
        * Create directory d:\temp\d and share as c
        * Execute java WatchDir \\<name_of_host>\c <= Works
        * Execute java WatchDir \\<name_of_host>\c <= Doesnt work
        This also goes for shares on remote hosts. Shares on the c:\ drive works, shares on other drives doesn't work.

        Whe WatchDir doesn't work it silently exists after less than a seconds as key.reset(); returns false.

        I can find no obvious reason for this when looking at the network traffic with WireShark. What I see is that when accessing \\..\c$ a " Notify Request File: " package is sent. This package is not sent when accessing \\...\d$.

        A Powershell Filesystemwatcher program does not have the same problem. The Java developer developing some software for us has not been able to reproduce this behaviour on their system.

        STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
        * Install Windows 2008 R2 sp1
        * Install jdk 1.7.0_21-b11
        * Downoad and compile http://docs.oracle.com/javase/tutorial/essential/io/examples/WatchDir.java
        * Execute java WatchDir \\<name_of_host>\c$ <= Works
        * Execute java WatchDir \\<name_of_host>\d$ <= Exits in less than a second

        EXPECTED VERSUS ACTUAL BEHAVIOR :
        EXPECTED -
        WatchDir should work in the same way both for shares on c:\ and for shares on d:\.
        ACTUAL -
        WatchDir works with file shares on c:\, but not with file shares on d:\ (or other drives).

        ERROR MESSAGES/STACK TRACES THAT OCCUR :
        No error messages.

        REPRODUCIBILITY :
        This bug can be reproduced always.

        ---------- BEGIN SOURCE ----------
        http://docs.oracle.com/javase/tutorial/essential/io/examples/WatchDir.java
        ---------- END SOURCE ----------

        CUSTOMER SUBMITTED WORKAROUND :
        Implement an old fashioned file polling object.

        Attachments

          Issue Links

            Activity

              People

                uta Alexey Utkin (Inactive)
                webbuggrp Webbug Group
                Votes:
                0 Vote for this issue
                Watchers:
                8 Start watching this issue

                Dates

                  Created:
                  Updated:
                  Resolved: