You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@felix.apache.org by "Ajay Kumar (JIRA)" <ji...@apache.org> on 2009/09/08 23:06:57 UTC

[jira] Created: (FELIX-1572) File Install running in an infinite loop while watching multiple directories, once of which is itself

File Install running in an infinite loop while watching multiple directories, once of which is itself
-----------------------------------------------------------------------------------------------------

                 Key: FELIX-1572
                 URL: https://issues.apache.org/jira/browse/FELIX-1572
             Project: Felix
          Issue Type: Bug
          Components: File Install
    Affects Versions: fileinstall-2.0.0, fileinstall-1.2.0,  fileinstall-1.0.0
         Environment: generic
            Reporter: Ajay Kumar


Felix File install runs in an infinite loop, if you put a configuration file to watch itself

Steps to reproduce
1. Configure file install to watch /foo/bar directory
2. Put a new configuration file e.g org.apache.felix.fileinstall-<pid>.cfg in /foo/bar directory in order to watch multiple directories. If the value of felix.fileinstall.dir inside the configuration file  is anything but /foo/bar, it works great. 
However if you modify the value of felix.fileinstall.dir  to /foo/bar (meaning the same directory which file install is watching), it runs in an infinite loop


-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (FELIX-1572) File Install running in an infinite loop while watching multiple directories, once of which is itself

Posted by "Guillaume Nodet (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/FELIX-1572?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12753050#action_12753050 ] 

Guillaume Nodet commented on FELIX-1572:
----------------------------------------

I think I've reproduced the problem, but it's not a loop that really consumes much cpu.
What happens is that fileinstall is watching the /foo/bar directory, sees a configuration file and give it to the config admin.  The config admin then tell fileinstall that its configuration has changed, and fileinstall update the DirectoryWatcher accordingly.
This means that at each poll interval, the directory watcher will be recreated.

Not sure what we can do for that.

> File Install running in an infinite loop while watching multiple directories, once of which is itself
> -----------------------------------------------------------------------------------------------------
>
>                 Key: FELIX-1572
>                 URL: https://issues.apache.org/jira/browse/FELIX-1572
>             Project: Felix
>          Issue Type: Bug
>          Components: File Install
>    Affects Versions:  fileinstall-1.0.0, fileinstall-1.2.0, fileinstall-2.0.0
>         Environment: generic
>            Reporter: Ajay Kumar
>
> Felix File install runs in an infinite loop, if you put a configuration file to watch itself
> Steps to reproduce
> 1. Configure file install to watch /foo/bar directory
> 2. Put a new configuration file e.g org.apache.felix.fileinstall-<pid>.cfg in /foo/bar directory in order to watch multiple directories. If the value of felix.fileinstall.dir inside the configuration file  is anything but /foo/bar, it works great. 
> However if you modify the value of felix.fileinstall.dir  to /foo/bar (meaning the same directory which file install is watching), it runs in an infinite loop

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (FELIX-1572) File Install running in an infinite loop while watching multiple directories, once of which is itself

Posted by "Guillaume Nodet (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/FELIX-1572?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Guillaume Nodet updated FELIX-1572:
-----------------------------------

    Priority: Minor  (was: Major)

Lowering the priority as this is an undesirable behavior, but not reall harmful afaik.

> File Install running in an infinite loop while watching multiple directories, once of which is itself
> -----------------------------------------------------------------------------------------------------
>
>                 Key: FELIX-1572
>                 URL: https://issues.apache.org/jira/browse/FELIX-1572
>             Project: Felix
>          Issue Type: Bug
>          Components: File Install
>    Affects Versions:  fileinstall-1.0.0, fileinstall-1.2.0, fileinstall-2.0.0
>         Environment: generic
>            Reporter: Ajay Kumar
>            Priority: Minor
>
> Felix File install runs in an infinite loop, if you put a configuration file to watch itself
> Steps to reproduce
> 1. Configure file install to watch /foo/bar directory
> 2. Put a new configuration file e.g org.apache.felix.fileinstall-<pid>.cfg in /foo/bar directory in order to watch multiple directories. If the value of felix.fileinstall.dir inside the configuration file  is anything but /foo/bar, it works great. 
> However if you modify the value of felix.fileinstall.dir  to /foo/bar (meaning the same directory which file install is watching), it runs in an infinite loop

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Resolved: (FELIX-1572) File Install running in an infinite loop while watching multiple directories, once of which is itself

Posted by "Guillaume Nodet (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/FELIX-1572?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Guillaume Nodet resolved FELIX-1572.
------------------------------------

       Resolution: Fixed
    Fix Version/s: fileinstall-2.0.2
         Assignee: Guillaume Nodet

Committing to https://svn.apache.org/repos/asf/felix/trunk ...
	M	fileinstall/src/main/java/org/apache/felix/fileinstall/internal/DirectoryWatcher.java
	M	fileinstall/src/main/java/org/apache/felix/fileinstall/internal/FileInstall.java
Committed r825455

Please give it a try and reopen if needed.

> File Install running in an infinite loop while watching multiple directories, once of which is itself
> -----------------------------------------------------------------------------------------------------
>
>                 Key: FELIX-1572
>                 URL: https://issues.apache.org/jira/browse/FELIX-1572
>             Project: Felix
>          Issue Type: Bug
>          Components: File Install
>    Affects Versions:  fileinstall-1.0.0, fileinstall-1.2.0, fileinstall-2.0.0
>         Environment: generic
>            Reporter: Ajay Kumar
>            Assignee: Guillaume Nodet
>            Priority: Minor
>             Fix For: fileinstall-2.0.2
>
>
> Felix File install runs in an infinite loop, if you put a configuration file to watch itself
> Steps to reproduce
> 1. Configure file install to watch /foo/bar directory
> 2. Put a new configuration file e.g org.apache.felix.fileinstall-<pid>.cfg in /foo/bar directory in order to watch multiple directories. If the value of felix.fileinstall.dir inside the configuration file  is anything but /foo/bar, it works great. 
> However if you modify the value of felix.fileinstall.dir  to /foo/bar (meaning the same directory which file install is watching), it runs in an infinite loop

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.