cjprecord / editra-plugins

Automatically exported from code.google.com/p/editra-plugins
0 stars 0 forks source link

[projects][git] Too many open files (OS X) #125

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
This is a bit similar to #13, except it only started occurring after I
added a small (~40 files in ~10 dirs) git project to my Editra Projects pane.

What Plugin does this relate to? What version of the Plugin?

Projects, git.

What steps will reproduce the problem?
1. Open Editra
2. Navigate some projects, do some editing.
3. Crash occurs after some time (minutes to hours).

What is the expected output? What do you see instead?

Crash, traceback:

#---- System Information ----#
Editra Version: 0.4.95
Operating System: Mac OS X (Darwin 9.7.0 i386)
Mac OSX: 10.5.7
Python Version: 2.5.4 (r254:67917, Dec 23 2008, 14:57:27) 
[GCC 4.0.1 (Apple Computer, Inc. build 5363)]
wxPython Version: 2.8.10.1 (mac-unicode)
wxPython Info: (__WXMAC__, wxMac, unicode, wx-assertions-on, SWIG-1.3.29,
mac-cg, mac-native-tb)
Python Encoding: Default=ascii  File=utf-8
wxPython Encoding: mac-roman
System Architecture: 32bit i386
Byte order: little
Frozen: macosx_app
#---- End System Information ----#

#---- Traceback Info ----#
*** Fri Aug 21 10:54:17 2009 ***
Traceback (most recent call last):
  File "/Users/rcoup/Library/Application
Support/Editra/plugins/Projects-1.3-py2.5.egg/projects/ProjectPane.py",
line 677, in OnSyncNode
  File "/Users/rcoup/Library/Application
Support/Editra/plugins/Projects-1.3-py2.5.egg/projects/ProjectPane.py",
line 1242, in addPath
  File "/Users/rcoup/Library/Application
Support/Editra/plugins/Projects-1.3-py2.5.egg/projects/ProjectPane.py",
line 1272, in addFolder
OSError: [Errno 24] Too many open files:
'/Users/someone/something/something/something'

#---- End Traceback Info ----#

What version of Editra are you using? On what operating system?

Editra 0.4.95, Mac OS X 10.5 (Intel)

Please provide any additional information below.

"lsof" shows a the open file descriptors by Editra. When navigating the
project/folder trees it grows and doesn't shrink, but this doesn't seem to
(immediately) crash it when it gets to 256. It grows a tonne faster when
the project uses git (cf svn).

The default ulimit -n is 256 on OS X. Increasing this to 1024 lets it run
for a lot longer (hours to days) without crashing.

Original issue reported on code.google.com by robert.c...@gmail.com on 20 Aug 2009 at 11:28

GoogleCodeExporter commented 9 years ago
Thanks,

Seems to be leaking file handles somewhere in the git status command (and 
possibly
elsewhere).

Cody

Original comment by CodyPrec...@gmail.com on 21 Aug 2009 at 1:57

GoogleCodeExporter commented 9 years ago
Did some debugging fixed a few things but git is still leaking alot of file 
handles
and I am not sure why.

The GIT.status method leaks around 7 handles everytime its called.

The SVN one was leaking about 3 but is now only leaking 1 on my system.

Also noting that this is only noticed when running editra when its bundled as an
applet (i.e Editra.app), not noticing it when running editra from terminal as 
'python
Editra.py' but checking the lsof output on that python process always returns 
the
same number of handles so not sure if its reading it correctly.

Used the following command to monitor number of open files:

lsof | grep Editra | wc -l

Original comment by CodyPrec...@gmail.com on 22 Aug 2009 at 2:40