This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 215617 - Files become "disconnected" if working on an NFS share that is unmounted and then remounted
Summary: Files become "disconnected" if working on an NFS share that is unmounted and ...
Status: NEW
Alias: None
Product: cnd
Classification: Unclassified
Component: Project (show other bugs)
Version: 7.1.2
Hardware: PC Linux
: P3 normal (vote)
Assignee: Vladimir Kvashin
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-07-17 09:59 UTC by gurr
Modified: 2016-10-31 10:10 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
01_nfs_mounted (111.17 KB, image/png)
2012-07-17 14:09 UTC, gurr
Details
02_nfs_unmounted (59.34 KB, image/png)
2012-07-17 14:09 UTC, gurr
Details
03_nfs_remounted (59.34 KB, image/png)
2012-07-17 14:10 UTC, gurr
Details
04_java_php_reopened (126.25 KB, image/png)
2012-07-17 14:10 UTC, gurr
Details
stacktrace (2.79 KB, application/octet-stream)
2013-05-23 09:05 UTC, Egor Ushakov
Details

Note You need to log in before you can comment on or make changes to this bug.
Description gurr 2012-07-17 09:59:24 UTC
Files on NFS share are correctly "disconnected" from the Project window if the NFS share is unmounted. But they won't "connect" again when the share is remounted.

The "disconnected" files have a question mark icon and the tooltip says:

  Broken: path/to/file
  Failed to load project

Refresh on individual files does nothing.
Closing and reopening a project will "reconnect" the files.
Comment 1 Petr Somol 2012-07-17 11:08:53 UTC
Not sure whether this belongs to php support. Please reassign otherwise..
Comment 2 Tomas Mysik 2012-07-17 12:22:12 UTC
Please, attach screenshots of "disconnected" and "not connected again" states and reopen this issue. BTW does this happen also with e.g. Java projects?

Thanks.
Comment 3 gurr 2012-07-17 14:09:17 UTC
Created attachment 122102 [details]
01_nfs_mounted
Comment 4 gurr 2012-07-17 14:09:45 UTC
Created attachment 122103 [details]
02_nfs_unmounted
Comment 5 gurr 2012-07-17 14:10:19 UTC
Created attachment 122104 [details]
03_nfs_remounted
Comment 6 gurr 2012-07-17 14:10:37 UTC
Created attachment 122106 [details]
04_java_php_reopened
Comment 7 gurr 2012-07-17 14:11:42 UTC
It's not language specific. I initially detected this bug with a C++ project.

The screenshots explained, in order.

01. I created three new projects with default settings on the NFS share. 

02. All three projects break when the NFS share is unmounted. The files in the Java and PHP projects are removed completely, while the files in the C++ project are listed as "Broken". (For some reason I didn't get the question mark icon with this test)

03. When the NFS share has been remounted nothing changes. I can't open main.cpp through the Projects window, and the other projects are still empty.

04. After having manually closed and opened the Java and PHP projects they work again as expected. The C++ project is still broken.

Btw, both client and server is running Ubuntu. THe projects are created inside a directory that is mounted with NFSv4.
Comment 8 Tomas Mysik 2012-07-17 14:38:11 UTC
Based on the last comment, seems to me to be a problem in CND area. Please evaluate, thanks.
Comment 9 Egor Ushakov 2013-05-22 14:23:50 UTC
as a workaround: there is an action "refresh" on every broken c++ project file
Comment 10 Egor Ushakov 2013-05-23 09:04:19 UTC
In fact project reopen helps but only after some time.
On project reopen for every project file we ask:
fileSystem.findResource
and it goes down to FileObjectFactory.getValidFileObject
which seems to be cacheing existing files and does not know about removed and then appeared again file...
Reassigning to filesystems, please evaluate and fix, or tell us how to ask filesystem for a file without cacheing issues.
Comment 11 Egor Ushakov 2013-05-23 09:05:48 UTC
Created attachment 134787 [details]
stacktrace

when filesystem is looking for removed-appeared file and does not find it
Comment 12 Jaroslav Tulach 2013-07-08 13:45:50 UTC
Maybe you could use FileUtil.refreshFor(...) or directly fileObject.refresh()?

The general problem may be that inotify does not provide any event in case the NFS is mounted/unmounted. Can be verified by observing

-J-Dorg.netbeans.modules.masterfs.watcher.level=FINE

and attaching the log output.