New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
projectorganizer: Too many open files #604
Comments
@b4n Sorry, git-changebar was an innocent victim. @techee projectorganizer keeps file descriptors open to lots of directores (my project base directory has many subdiretories). One something tries to open one more file descriptor everything falls down. Why does projectorganizer keep so many fds? The limit seems to be 1024 on my system, for processes started by my local non-root user. projectorganizer uses more than 1000 of them. |
@kugel- check that you don't have a loop in your filesystem, even a soft link will make it go in a loop. |
I wonder why projectorganizer keeps FDs to all that dirs/files open. |
As it descends the directory tree it opens each directory and as it reads the entries recursively opens each one thats a directory. So as it opens each child directory, each parent directory is still open since it hasn't finished reading the entries in it yet. So if you get a loop in the filesystem it will simply run out of FDs. |
In the non-crashing case, after Geany finished starting, the file descriptors are still open. I don't see loops when examining /proc/$(pidof geany)/fd |
I don't see any FDs that point to project files after opening. |
Perhaps the limit is hit during traversal, and the code doesn't clean up properly? |
I have to check. This shouldn't happen, there's no need to keep the fd's open for the directories - probably something isn't closed properly. |
@elextr The plugin detects symlink loops and avoids them. It stores all visited paths to a hash table and if the paths start repeating, it stops the recursion. |
@techee but the constructed path gets longer and longer so it won't compare equal, you need to compare realpath()s. Look at what happens in bash if you have the wd in the prompt, as you cd via a symlink the prompt gets longer and longer :) |
@elextr Have you checked the code? I do exactly that with tm_get_real_path(): https://github.com/geany/geany-plugins/blob/master/projectorganizer/src/prjorg-project.c#L78 And of course I've tested that when implementing it so I'm pretty sure it works alright. |
Since a recent ubuntu update I get this when starting Geany.
(geany:3522): GLib-ERROR **: Creating pipes for GWakeup: Too many open files
If I disable git-changebar, it does start just fine.
@b4n any idea?
The text was updated successfully, but these errors were encountered: