-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
LoadService gets stuck recursively descending into /sys #309
Comments
Interesting. So it looks like you have a cycle in your directories (unless I'm misunderstanding). Would you like something where it remembers the paths of where symlinks have sent it and doesn't follow the symlink if it's familiar? |
I'm actually puzzled what LoadService is trying to find in the /sys filesystem (which probably is an edge case for every directory traversing algorithm). Is LoadService touching the whole /? |
Jesus christ I hope not. I figured you had put that on your classpath? What does it look like from here: https://github.com/twitter/finagle/blob/master/finagle-core/src/main/scala/com/twitter/finagle/util/LoadService.scala ? |
I encountered a similar problem after upgrading to 6.22. When starting tomcat with "service" command, i.e. service tomcat7 start, the war would hang at initializing finagle. Producing a threaddump, I found a similar stacktrace as OP. However, when using /etc/init.d/tomcat7 start; it would not hang. Service sets the current working directory to '/'; so, it would hit /sys and get stuck in '/sys' loop (pcspkr for me...). The daemon init.d scripts would use whatever directory you're currently in. Running the init.d script from '/' will cause the same problem. |
OK, I guess if folks setting / as cwd is a real thing, we should maybe exclude /sys explicitly? @revisiond, @groestl would one of you like to make a pull request? |
Problem The problem being fixed here is something we ran into while working with finagle in our application similar to the issue posted in the following issue twitter#309. In our case it was not the /sys directory however but an extremely huge FS mounted on the project root and LoadService was getting stuck descending into that directory structure everytime. Solution This pull request adds the ability to add additional packages/paths to the 'ignoredPackages' sequence in LoadService via a method called 'addIgnoredPaths' in LoadService. This method can take a single or multiple paths as String arguments and add them to the private sequence (which is now mutable). Result After this change, users would be able to customize the ignoredPackages for the recursive directory scan that LoadService performs (in several flows) and avoid getting stuck in directory structures that they do not want scanned.
The problem being fixed here is something we ran into while working with finagle in our application similar to the issue posted in the following issue #309. In our case it was not the /sys directory however but an extremely huge FS mounted on the project root and LoadService was getting stuck descending into that directory structure everytime. Solution This pull request adds the ability to add additional packages/paths to the 'ignoredPackages' sequence in LoadService via a GlobalFlag `com.twitter.finagle.util.loadServiceIgnoredPaths`. This flag can one or more paths as String arguments and add them to the private sequence (which is now mutable). Result After this change, users would be able to customize the ignoredPackages for the recursive directory scan that LoadService performs (in several flows) and avoid getting stuck in directory structures that they do not want scanned. RB_ID=724361
The problem being fixed here is something we ran into while working with finagle in our application similar to the issue posted in the following issue twitter#309. In our case it was not the /sys directory however but an extremely huge FS mounted on the project root and LoadService was getting stuck descending into that directory structure everytime. Solution This pull request adds the ability to add additional packages/paths to the 'ignoredPackages' sequence in LoadService via a GlobalFlag `com.twitter.finagle.util.loadServiceIgnoredPaths`. This flag can one or more paths as String arguments and add them to the private sequence (which is now mutable). Result After this change, users would be able to customize the ignoredPackages for the recursive directory scan that LoadService performs (in several flows) and avoid getting stuck in directory structures that they do not want scanned. RB_ID=724361
I think #351 fixes this, but please reopen if you have further problems! |
this seems to happen to me . i am using tranquility-core_2.11:0.83 and it depends on finagle-6.43.0 @mosesn here is what strace shows
|
@jdneumeyer77 is right,i restart my program in /root and it works fine |
@mosesn It happened again...
|
We make it work by change the dir when starting the service, I don't think it's a good way to resolve the problem.
|
When spinning up our server on a rackspace instance (uname "Linux 3.2.0-60-generic #91-Ubuntu SMP Wed Feb 19 03:54:44 UTC 2014 x86_64 x86_64") the startup procedure gets stuck as soon as the finage client tries to set up LoadedStatsReceiver.
In the stack trace we see LoadService descending into a directory tree:
and strace gives us an endless list of:
The text was updated successfully, but these errors were encountered: