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 268300 - A file is open in two different tabs for some NFS mounts
Summary: A file is open in two different tabs for some NFS mounts
Status: NEW
Alias: None
Product: cnd
Classification: Unclassified
Component: Editor (show other bugs)
Version: 8.1
Hardware: PC Solaris
: P3 normal (vote)
Assignee: Vladimir Kvashin
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-10-01 00:06 UTC by Vladimir Kvashin
Modified: 2017-04-04 16:57 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Vladimir Kvashin 2016-10-01 00:06:18 UTC
Some NFS mounts make IDE open the same file in two different editor tabs. The example is as follows.

For a file from /workspace/${USER}/...,
see how is your /workspace/${USER}/ mounted (via mount command)
It's mounted to /net/some_host/some_path.

So you can access it via /workspace/${USER}/ and also via /net/some_host/some_path/${USER}/...

IDE is supposed to understand that these files are the same.
But it does not.

The reason is that although inodes (st_ino field of the stat structure) are the same, devices (st_dev field of stat structure) differ.

The stat command that is available on Solaris 11 shows that.

This causes inconvenience to user because when building, studio compiler somehow converts paths from /workspace/... into /net/some_host/some_path/...

So when user debugs and a breakpoint is hit, this /net/some_host/some_path/... file is open - and IDE not just opens it in a separate tab, but thinks it does not belong to project, so code navigation does not work.
Comment 1 Vladimir Kvashin 2016-10-01 00:07:15 UTC
I reproduced this locally, judging by fs_server code, full remote behaves exactly the same.
Comment 2 Vladimir Kvashin 2016-10-01 00:08:46 UTC
The possible workarounds are
- use /net/some_host/some_path path when opening a project
- provide debugging path map
Comment 3 Vladimir Kvashin 2017-04-04 16:57:09 UTC
What can we do? Inodes are same, devs differ. 
We could do as follows: if inodes are same, then check other file attributes - name, size and timestamp, if these coincide, then consider it to be the same.
Frankly I'm not sure this approach is good enough.