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.
Summary: | Too many open files when building project for jboss 4.2.3 | ||
---|---|---|---|
Product: | java | Reporter: | rukus <rukus> |
Component: | Source | Assignee: | Jan Lahoda <jlahoda> |
Status: | RESOLVED DUPLICATE | ||
Severity: | blocker | CC: | anebuzelsky, lhasik, mmirilovic, musilt2, pnejedly, tzezula |
Priority: | P3 | Keywords: | RELNOTE |
Version: | 6.x | ||
Hardware: | PC | ||
OS: | Unix | ||
Issue Type: | DEFECT | Exception Reporter: | |
Attachments: |
Error messages
Error messages lsof -p output Requested log file |
Description
rukus
2008-10-06 16:09:25 UTC
Can you provide IDE version? are you able to reproduce also from command line with your (non-NetBeans) Ant? btw.steps to reproduce the problem are highly appreciated. IDE version is 6.1 (same that i've selected in issue description)
>>>are you able to reproduce also from command line with your (non-NetBeans) Ant?
hmm what should i type in terminal to do that?
Hmm - today i can't reproduce same problem but i've encountered related - see 2 attached screenshots Created attachment 71258 [details]
Error messages
Created attachment 71259 [details]
Error messages
Looks like problem occurs when i've opened 2 big projects - with many source files Ok - i found steps to reproduce problem: 1. Create new Web project 2. Close it 3. Add to it's sources around 10k files 4. Open project Milosi, take this one. rukus: please check the total number of file handles on your system (cat /proc/sys/fs/file-max) and number assigned to your user on the system (cat /etc/security/limits.conf or cat /etc/limits) Also when encountering the bug, please list the handles opened by the netbeans java process. ls -la /proc/<pid>/fd or lsof -p <pid> where pid is the process id of the java vm that runs netbeans. (ps -ax to figure) for details see this document for example: http://confluence.atlassian.com/display/DOC/Fix+%27Too+many+open+files%27+error+on+Linux+by+increasing+filehandles closing as works for me, please reopen with the information requested seth@seth-desktop:~$ cat /proc/sys/fs/file-max 100631 seth@seth-desktop:~$ cat /etc/security/limits.conf # /etc/security/limits.conf # #Each line describes a limit for a user in the form: # #<domain> <type> <item> <value> # #Where: #<domain> can be: # - an user name # - a group name, with @group syntax # - the wildcard *, for default entry # - the wildcard %, can be also used with %group syntax, # for maxlogin limit # #<type> can have the two values: # - "soft" for enforcing the soft limits # - "hard" for enforcing hard limits # #<item> can be one of the following: # - core - limits the core file size (KB) # - data - max data size (KB) # - fsize - maximum filesize (KB) # - memlock - max locked-in-memory address space (KB) # - nofile - max number of open files # - rss - max resident set size (KB) # - stack - max stack size (KB) # - cpu - max CPU time (MIN) # - nproc - max number of processes # - as - address space limit # - maxlogins - max number of logins for this user # - maxsyslogins - max number of logins on the system # - priority - the priority to run user process with # - locks - max number of file locks the user can hold # - sigpending - max number of pending signals # - msgqueue - max memory used by POSIX message queues (bytes) # - nice - max nice priority allowed to raise to # - rtprio - max realtime priority # - chroot - change root to directory (Debian-specific) # #<domain> <type> <item> <value> # #* soft core 0 #* hard rss 10000 #@student hard nproc 20 #@faculty soft nproc 20 #@faculty hard nproc 50 #ftp hard nproc 0 #ftp - chroot /ftp #@student - maxlogins 4 # End of file I've set fs.file-max to 200000 Looks like i need to reboot system - if it won't help i will post here result of lsof -p <pid> after reboot: seth@seth-desktop:~$ cat /proc/sys/fs/file-max 200000 But problem is still here - see output of lsof in attachments Created attachment 71279 [details]
lsof -p output
it seems there are 2 culprits here: module system - 692 open module jars java support - 530 open index files reassigning to module system, I believe pnejedly has fix some open file related issues (not sure if before or after 6.1) ->P2, there's a workaround, you can set the number of open handles per project in the etc's limits configuration file. sorry not per project but per user ->P2, there's a workaround, you can set the number of open handles per project in the etc's limits configuration file. Can you provide additional info how to do this workaround? P.S. Thanks for your time and quick response to my problem :) I would say you have to edit the limits file <username> hard nofile 5000 to increase the limit of opened files. Additionally you can try with latest 6.5 dev (or beta) to see if the issue with module system was indeed improved in 6.5 Looks like workaround helps What about NB6.5 i think i should file new bug cos arrows and backspace don't work in editor window :( I cannot reproduce the problem. The number of open module JARs is kept at 300 on my computer. I need more logs. Please get the build that contains fix ca9d5ef6fa6e, run with -J-Dorg.netbeans.JarClassLoader.level=406 parameter. Attach $userdir/var/log/messages.log and reopen. Integrated into 'main-golden', will be available in build *200810100201* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main/rev/ca9d5ef6fa6e User: Jaroslav Tulach <jtulach@netbeans.org> Log: #149261: More logging to track down cause of too many open JARs Created attachment 71646 [details]
Requested log file
added attachment The last log shows there is ~300 opened module JARs. And yes, looking at the lsof output, there is ~300 opened module JARs. Just some of there are listed twice: java 5822 seth mem REG 8,3 4227036 1012172 java2/modules/org-netbeans-modules-form.jar java 5822 seth 332r REG 8,3 4227036 1012172 java2/modules/org-netbeans-modules-form.jar According to Tomáš the JAR is still opened once, just the central table is mmapped and the rest of the JAR is open for reading. I would say things are perfectly OK, then! Because workaround exists and is documented in relnotes, I am changing this to P3. While looking at http://www.netbeans.org/nonav/issues/showattachment.cgi/71279/log2.txt I see ~300 opened modules I see a lot of libraries opened by JVM. I see bunch of ant JAR files I see ~700 files opened by java. I can't help myself, but I think this issue has nothing to do with NetBeans Module System. It has limit of 300 and it does not grow over it. Integrated into 'main-golden', will be available in build *200810280201* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main/rev/470dfb96f82a User: Jesse Glick <jglick@netbeans.org> Log: More detailed logging for #149261: shows forWhat parameter. Already fixed as bug #171252. *** This bug has been marked as a duplicate of bug 171252 *** |