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 29306

Summary: NetBeans does not close all open file descriptors.
Product: java Reporter: Marian Petras <mpetras>
Component: UnsupportedAssignee: Tomas Hurka <thurka>
Status: CLOSED FIXED    
Severity: blocker Keywords: PERFORMANCE
Priority: P3    
Version: 3.x   
Hardware: All   
OS: All   
Issue Type: DEFECT Exception Reporter:
Bug Depends on:    
Bug Blocks: 34165    

Description Marian Petras 2002-12-05 09:09:30 UTC
When I mounted ten filesystems (in the NetBeans
Explorer) and ran command "Update Code
Completions..." on some of them, NetBeans became
crazy, displayed several exception windows and
printed a lot of exceptions to the console and/or
to 'ide.log'. It also started installing and
uninstalling various sets of modules.

Some of the exception messages written into
'ide.log' end with "(Too many open files)".
Comment 1 Marian Petras 2002-12-05 09:12:43 UTC
A patch was created soon after this bug had been found. It will be
probably integrated into NB 3.4.1.
Comment 2 Marian Mirilovic 2002-12-05 14:38:11 UTC
Marian , performance issue must have PERFORMANCE keyword, thanks :)
Comment 3 Jesse Glick 2002-12-05 14:45:55 UTC
Fixed in the trunk, I guess.
Comment 4 _ ttran 2002-12-05 15:35:53 UTC
Marian, can you please tell us about your fix?  Rev numbers of the
changed files for example
Comment 5 Marian Petras 2002-12-05 15:43:17 UTC
Svata dedic has supplied me a patch yesterday evening and told me that
he is going to integrate it into NB 3.4.1. It was a patch in nbextra.
But Tomas Hurka came to me today and told me that the fix is probably
not correct. I do not know the current status of the bug fix.

BTW I do not think it influences performance much. It is rather a
normal bug which rarely reveals itself.
Comment 6 Svata Dedic 2002-12-05 17:04:08 UTC
Fixed in 3.4.1 branch.

For trunk / 4.0 there's probably a little more to do - Tomas
discovered that, in addition to not closing a file descriptor, the
compiler sometimes opens the file twice and does unnecessary
InputStream -> char[] -> InputStream conversions. 

There will be more changes required to fix the situation that we would
like to put into a bugfix 3.4.1 release.

3.4.1. fixes the file descriptor leak
Trunk/4.0 need probably more elaborate fix (Tomas will work on that if
his shedule permits).
Comment 7 Jan Lahoda 2002-12-20 10:19:57 UTC
*** Issue 29338 has been marked as a duplicate of this issue. ***
Comment 8 Tomas Hurka 2003-01-08 12:56:39 UTC
Reopening. This issue has to be fixed in trunk together with the problems described in additional comment From Svatopuk Dedic at 2002-12-05 09:04 PST.  
Comment 9 _ mihmax 2003-01-19 23:41:49 UTC
Please, don't change Target Milestones just the way YOU LIKE IT,
because I like it the other way round.
I could forget to mention this issue in CHANGES.html because of you !!!
Comment 10 Tomas Hurka 2003-01-20 16:31:36 UTC
Fixed in trunk. InputStream is now closed and file content is read only once.
Comment 11 Tomas Hurka 2003-01-30 15:53:42 UTC
Fix merged to prj40_prototype branch.
Comment 12 Jan Becicka 2003-02-12 10:17:02 UTC
*** Issue 26976 has been marked as a duplicate of this issue. ***
Comment 13 Jan Becicka 2003-03-10 15:06:42 UTC
Mariane, can you verify it? Thanks
Comment 14 Marian Petras 2003-03-24 14:39:03 UTC
It seems fixed now, indeed. I cannot force NetBeans to fail on "Too
many open files" even with 40+ mounted filesystems.
Comment 15 Tomas Pavek 2003-04-16 16:51:23 UTC
*** Issue 32848 has been marked as a duplicate of this issue. ***
Comment 16 Quality Engineering 2003-07-01 13:21:33 UTC
Resolved for 3.4.x or earlier, no new info since then -> closing.