Please use the Apache issue tracking system for new NetBeans issues (https://issues.apache.org/jira/projects/NETBEANS0/issues) !!
Bug 184854 - Two valid FileObjects for the same FileNaming
Two valid FileObjects for the same FileNaming
Status: RESOLVED FIXED
Product: platform
Classification: Unclassified
Component: Filesystems
6.x
All All
: P2 (vote)
: 6.x
Assigned To: Jaroslav Tulach
issues@platform
EXCEPTIONS_REPORT, cndreq, 69patch1
: PERFORMANCE
: 185371 186130 186185 186254 186430 186655 186740 187030 187170 187255 187294 187362 187724 187765 187835 188334 188680 188709 188772 188827 189177 189885 195116 195119 195333 195427 195656 (view as bug list)
Depends on:
Blocks: 185346 186655 187030 187079
  Show dependency treegraph
 
Reported: 2010-04-23 13:58 UTC by J Bachorik
Modified: 2011-02-18 17:17 UTC (History)
35 users (show)

See Also:
Issue Type: DEFECT
:


Attachments
stacktrace (5.92 KB, text/plain)
2010-04-23 13:58 UTC, J Bachorik
Details

Note You need to log in before you can comment on or make changes to this bug.
Description J Bachorik 2010-04-23 13:58:21 UTC
This bug was originally marked as duplicate of bug 182069, that is already resolved. This bug is still valid, so this seems to be another bug, but it might be related.

Build: NetBeans IDE 6.9 Beta (Build 201004200117)
VM: Java HotSpot(TM) 64-Bit Server VM, 16.2-b04, Java(TM) SE Runtime Environment, 1.6.0_19-b04
OS: Linux

User Comments:
yardus: fix imports




Stacktrace: 
java.lang.IllegalArgumentException: TreePathHandle [/home/jb198685/projects/btrace/src/share/classes/com/sun/btrace/agent/TraceOutputWriter.java] was not created from /home/jb198685/projects/btrace/src/share/classes/com/sun/btrace/agent/TraceOutputWriter.java
mine: id=MasterFileObject[/home/jb198685/projects/btrace/src/share/classes/com/sun/btrace/agent/TraceOutputWriter.java@45081d1e:2a595ca4,valid=true], url=file:/home/jb198685/projects/btrace/src/share/classes/com/sun/btrace/agent/TraceOutputWriter.java
remote: id=MasterFileObject[/home/jb198685/projects/btrace/src/share/classes/com/sun/btrace/agent/TraceOutputWriter.java@45081d1e:3491a198,valid=true], url=file:/home/jb198685/projects/btrace/src/share/classes/com/sun/btrace/agent/TraceOutputWriter.java
   at org.netbeans.api.java.source.TreePathHandle$TreeDelegate.resolve(TreePathHandle.java:421)
   at org.netbeans.api.java.source.TreePathHandle.resolve(TreePathHandle.java:151)
   at org.netbeans.modules.java.editor.imports.JavaFixAllImports.performFixImports(JavaFixAllImports.java:262)
   at org.netbeans.modules.java.editor.imports.JavaFixAllImports.access$200(JavaFixAllImports.java:94)
   at org.netbeans.modules.java.editor.imports.JavaFixAllImports$1.run(JavaFixAllImports.java:135)
   at org.netbeans.modules.java.editor.imports.JavaFixAllImports$1.run(JavaFixAllImports.java:112)
Comment 1 J Bachorik 2010-04-23 13:58:27 UTC
Created attachment 97927 [details]
stacktrace
Comment 2 Jan Lahoda 2010-04-26 10:18:12 UTC
Seems like a duplicate FileObjects.
Comment 3 Jaroslav Tulach 2010-04-26 18:53:32 UTC
mine: id=MasterFileObject[/home/jb198685/projects/btrace/src/share/classes/com/sun/btrace/agent/TraceOutputWriter.java@45081d1e:2a595ca4,valid=true],

remote: id=MasterFileObject[/home/jb198685/projects/btrace/src/share/classes/com/sun/btrace/agent/TraceOutputWriter.java@45081d1e:3491a198,valid=true], 

The above means the FileNaming is the same (45081d1e), but the fileobject is different (2a595ca4 vs. 3491a198)
Comment 4 Jaroslav Tulach 2010-04-27 16:39:20 UTC
One problem found and fixed in core-main#8e3c013acd4d
Comment 5 Quality Engineering 2010-04-28 04:59:53 UTC
Integrated into 'main-golden', will be available in build *201004280200* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main/rev/
User: 
Log:
Comment 6 Jaroslav Tulach 2010-04-28 16:18:11 UTC
The masterfs shall be rewritten to use immutable FileName objects. I have the rewrite at immutable-file-name-184854 branch, but I guess I rather wait with the change after 6.9:
http://hg.netbeans.org/core-main/rev/f42b5263e367
Comment 7 Jan Lahoda 2010-05-04 08:03:19 UTC
*** Bug 185371 has been marked as a duplicate of this bug. ***
Comment 8 Jaroslav Tulach 2010-05-17 04:45:27 UTC
*** Bug 186130 has been marked as a duplicate of this bug. ***
Comment 9 Jaroslav Tulach 2010-05-17 13:40:06 UTC
*** Bug 186185 has been marked as a duplicate of this bug. ***
Comment 10 Jaroslav Tulach 2010-05-24 14:55:24 UTC
*** Bug 186430 has been marked as a duplicate of this bug. ***
Comment 11 Jaroslav Tulach 2010-05-24 14:56:45 UTC
*** Bug 186254 has been marked as a duplicate of this bug. ***
Comment 12 Jaroslav Tulach 2010-05-27 12:17:09 UTC
Making P2. Many duplicates, rename not working reliably.
Comment 13 Jaroslav Tulach 2010-06-04 09:52:03 UTC
Depending issue is P1.
Comment 14 Jaroslav Tulach 2010-06-04 10:02:14 UTC
*** Bug 186740 has been marked as a duplicate of this bug. ***
Comment 15 Jesse Glick 2010-06-07 13:47:48 UTC
(In reply to comment #4)
> core-main#8e3c013acd4d

BTW: Utilities.compareObjects makes this kind of equals override more readable.

(In reply to comment #6)
> immutable-file-name-184854 branch

I.e.: hg log -b immutable-file-name-184854 -pv

I don't really know this code but I do not see any obvious problems with the changes. Overall it is another example of the troubles caused by our object-oriented Filesystems design: we are forced to commit to there being exactly one Object per existing file, which is a difficult invariant to maintain.
Comment 16 rmatous 2010-06-07 14:35:40 UTC
- field fileName in BaseFileObj.java should be properly synchronized
- field id in FileName.java should be final
- method getId(boolean recompute) in FileName.java  doesn't need parameter recompute

BTW: exactly one Object per existing file - is really design that affects complexity and performance
Comment 17 Jaroslav Tulach 2010-06-07 15:41:58 UTC
*** Bug 187030 has been marked as a duplicate of this bug. ***
Comment 18 Jaroslav Tulach 2010-06-07 15:42:12 UTC
*** Bug 187255 has been marked as a duplicate of this bug. ***
Comment 19 Jaroslav Tulach 2010-06-07 15:42:21 UTC
*** Bug 187170 has been marked as a duplicate of this bug. ***
Comment 20 Jan Lahoda 2010-06-09 08:22:27 UTC
*** Bug 187294 has been marked as a duplicate of this bug. ***
Comment 21 Jaroslav Tulach 2010-06-10 15:58:32 UTC
I have a solution for the problem at #8 in
http://deadlock.netbeans.org/hudson/job/prototypes-immutable-file-name-184854/

If anyone can verify the build is sane, please do so before I merge to trunk (Monday Jun 14, 2010 would be me preferred date). Thanks.
Comment 22 Jaroslav Tulach 2010-06-10 15:59:29 UTC
To review the current code, please look at:
http://hg.netbeans.org/core-main/rev/b2380dd52af9
Comment 23 Jesse Glick 2010-06-10 20:16:01 UTC
*** Bug 187362 has been marked as a duplicate of this bug. ***
Comment 24 Jaroslav Tulach 2010-06-14 06:13:37 UTC
core-main#3c7f40a1c126
Comment 25 Jaroslav Tulach 2010-06-14 06:15:38 UTC
*** Bug 186655 has been marked as a duplicate of this bug. ***
Comment 26 Vladimir Voskresensky 2010-06-15 05:55:53 UTC
we need this fix in 6.9.1 (as was marked in issue #186655)
Comment 27 Jaroslav Tulach 2010-06-15 18:44:14 UTC
To backport to 6.9.1, make sure all fixes on immutable-file-name-184854 branch are merged to the right clone.
Comment 28 Filip Zamboj 2010-06-15 21:25:20 UTC
@Jarda: is this the issue you wanted me to check?
Comment 29 rbalada 2010-06-16 08:53:17 UTC
Please verify bugfix for this bug, so it can be included in release691 repository.

Thanks,
-R
Comment 30 Petr Blaha 2010-06-17 11:51:38 UTC
verified
Comment 31 rbalada 2010-06-17 12:43:58 UTC
(In reply to comment #27)
> To backport to 6.9.1, make sure all fixes on immutable-file-name-184854 branch
> are merged to the right clone.

I would welcome, if you could be more specific about this requirement.

Would you please specify either a list of changesets or a method how to prepare the list myself?

Thanks,
-R
Comment 32 Tomas Mysik 2010-06-17 12:49:43 UTC
(In reply to comment #31)
> Would you please specify either a list of changesets or a method how to prepare
> the list myself?

hg log -b immutable-file-name-184854
Comment 33 Tomas Mysik 2010-06-17 12:51:24 UTC
(In reply to comment #32)
> hg log -b immutable-file-name-184854

And perhaps without merges (-M).
Comment 34 rbalada 2010-06-17 13:43:46 UTC
rudolf@lupin:~/work/nb691/main>$ hg log -b immutable-file-name-184854 -M | grep "^changeset:" | cut -f2- -d : | sort
   172937: main #177a6e8bb5cc
   172938: main #17a2161e8f81
   172939: main #f42b5263e367
   172940: main #377215133c3e
   172941: main #7402e67b87a7
   172942: main #c3404913a291
   172943: main #b0f5f538c72b
   172944: main #3c7f40a1c126
   173037: main #6cb009217b97
rudolf@lupin:~/work/nb691/main>$ hg log -b immutable-file-name-184854 -M | grep "^changeset:" | cut -f2- -d : | sort | cut -f2 -d : | (cd ../release691; while read line; do hg transplant -s ../main ${line}; done; cd - )
searching for changes
applying main #177a6e8bb5cc
main #177a6e8bb5cc transplanted to release691 #d0a72bc269a1
searching for changes
applying main #17a2161e8f81
main #17a2161e8f81 transplanted to release691 #081955e4ca40
searching for changes
applying main #f42b5263e367
main #f42b5263e367 transplanted to release691 #645885d31832
searching for changes
applying main #377215133c3e
main #377215133c3e transplanted to release691 #b148a85fe8d5
searching for changes
applying main #7402e67b87a7
main #7402e67b87a7 transplanted to release691 #ee8980ffa72e
searching for changes
applying main #c3404913a291
main #c3404913a291 transplanted to release691 #5bad431d3938
searching for changes
applying main #b0f5f538c72b
main #b0f5f538c72b transplanted to release691 #bf8ec9b86595
searching for changes
applying main #3c7f40a1c126
main #3c7f40a1c126 transplanted to release691 #a0b5e4478078
searching for changes
applying main #6cb009217b97
main #6cb009217b97 transplanted to release691 #a7d85d51ac37
/Users/rudolf/work/nb691/main
rudolf@lupin:~/work/nb691/main>$
Comment 35 Jesse Glick 2010-06-17 14:05:02 UTC
BTW can http://deadlock.netbeans.org/hudson/job/prototypes-immutable-file-name-184854/ be deleted now?

(In reply to comment #34)
> hg log -b immutable-file-name-184854 -M | grep "^changeset:" | cut -f2- -d : | sort | cut -f2 -d :

More easily:

hg log -b immutable-file-name-184854 -M --template '{node}\n' -r null:tip

It might also have sufficed to export and then import 1352aa1ebbfb, since that seems to have been the final merge to trunk (but I'm not sure if there were multiple such merges).
Comment 36 Jaroslav Tulach 2010-06-18 08:40:33 UTC
#1 - prototypes-immutable-file-name-184854 job deleted
#2 - to backport to release69x just: hg pull -r immutable-file-name-184854 http://hg.netbeans.org/main-golden/
#3 - don't backport it yet, I still have some test failures on windows
Comment 37 rbalada 2010-06-18 14:34:44 UTC
(In reply to comment #36)
> #3 - don't backport it yet, I still have some test failures on windows

Way too late, isn't it?
Please double integrate also into release691. Blame verifier for premature verification ... ;-(

Thanks,
-R
Comment 38 Dusan Balek 2010-06-21 09:00:11 UTC
*** Bug 187765 has been marked as a duplicate of this bug. ***
Comment 39 Jaroslav Tulach 2010-06-22 09:07:41 UTC
Please backport additional fixes on the immutable-file-name-184854 branch. Current head is http://hg.netbeans.org/core-main/rev/b5338affae8c
Comment 40 rbalada 2010-06-22 15:54:31 UTC
main #b5338affae8c transplanted to release691 #3348665d4294
Comment 41 Jaroslav Tulach 2010-06-23 07:11:39 UTC
*** Bug 187835 has been marked as a duplicate of this bug. ***
Comment 42 Jaroslav Tulach 2010-06-23 07:12:37 UTC
*** Bug 187724 has been marked as a duplicate of this bug. ***
Comment 43 Jaroslav Tulach 2010-07-03 04:35:55 UTC
*** Bug 188334 has been marked as a duplicate of this bug. ***
Comment 44 Jesse Glick 2010-07-15 19:10:40 UTC
*** Bug 188709 has been marked as a duplicate of this bug. ***
Comment 45 Jaroslav Tulach 2010-07-16 10:33:57 UTC
*** Bug 188680 has been marked as a duplicate of this bug. ***
Comment 46 Jesse Glick 2010-07-20 19:15:22 UTC
*** Bug 188772 has been marked as a duplicate of this bug. ***
Comment 47 Jesse Glick 2010-07-21 15:23:33 UTC
*** Bug 188827 has been marked as a duplicate of this bug. ***
Comment 48 Jaroslav Tulach 2010-08-30 11:15:50 UTC
*** Bug 189177 has been marked as a duplicate of this bug. ***
Comment 49 Jaroslav Tulach 2010-08-30 11:16:51 UTC
*** Bug 189885 has been marked as a duplicate of this bug. ***
Comment 50 Filip Zamboj 2010-10-26 17:36:32 UTC
reproduced in 
Product Version: NetBeans IDE Dev (Build 101020-7d51775f8647)
Java: 1.6.0_20; Java HotSpot(TM) 64-Bit Server VM 16.3-b01-279

however, it's not p1 anymore 

reproducible while downloading files using ftp. see exception reports.
Comment 51 Jaroslav Tulach 2010-11-24 20:45:51 UTC
I have reported bug 184854 for PHP. Please report all issues related to PHP into that bug. Leave this bug for other reports unrelated to PHP FTP support.
Comment 52 Jaroslav Tulach 2011-02-07 12:06:33 UTC
*** Bug 195116 has been marked as a duplicate of this bug. ***
Comment 53 Jaroslav Tulach 2011-02-07 12:08:57 UTC
*** Bug 195119 has been marked as a duplicate of this bug. ***
Comment 54 Jaroslav Tulach 2011-02-14 15:23:18 UTC
*** Bug 195333 has been marked as a duplicate of this bug. ***
Comment 55 Jaroslav Tulach 2011-02-15 12:35:33 UTC
*** Bug 195427 has been marked as a duplicate of this bug. ***
Comment 56 Jaroslav Tulach 2011-02-18 17:17:16 UTC
*** Bug 195656 has been marked as a duplicate of this bug. ***


By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2014, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo