You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@sling.apache.org by "Bertrand Delacretaz (JIRA)" <ji...@apache.org> on 2012/11/15 17:02:12 UTC
[jira] [Created] (SLING-2668) EntityResourceList.compact() fails to
remove resource from list, causes infinite loop
Bertrand Delacretaz created SLING-2668:
------------------------------------------
Summary: EntityResourceList.compact() fails to remove resource from list, causes infinite loop
Key: SLING-2668
URL: https://issues.apache.org/jira/browse/SLING-2668
Project: Sling
Issue Type: Bug
Components: Installer
Affects Versions: Installer Core 3.4.0
Reporter: Bertrand Delacretaz
Assignee: Bertrand Delacretaz
EntityResourceList.compact() calls resources.remove(RegisteredResource) and that can fail in some cases, as the stored RegisteredResource might have changed since they were added to the SortedSet, which apparently trips the set's searching algorithm.
We should use a more robust method to remove resources, and check that they are actually removed.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (SLING-2668) EntityResourceList.compact() fails
to remove resource from list, causes infinite loop
Posted by "Carsten Ziegeler (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/SLING-2668?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13498106#comment-13498106 ]
Carsten Ziegeler commented on SLING-2668:
-----------------------------------------
I just checked the source, and there is also EntityResourceList#remove. We should:
- remove this method completely
- remove the remove method in PersistentResourceList
- and change the usage from this.persistentList.remove(rr); to this.persistentList.remove(rr.getURL());
in OsgiInstallerImpl#511
We didn't have problems with this method yet, however it exposes the same potential problem as compact(). Removing using the url is using a different approach
> EntityResourceList.compact() fails to remove resource from list, causes infinite loop
> -------------------------------------------------------------------------------------
>
> Key: SLING-2668
> URL: https://issues.apache.org/jira/browse/SLING-2668
> Project: Sling
> Issue Type: Bug
> Components: Installer
> Affects Versions: Installer Core 3.4.0
> Reporter: Bertrand Delacretaz
> Assignee: Bertrand Delacretaz
>
> EntityResourceList.compact() calls resources.remove(RegisteredResource) and that can fail in some cases, as the stored RegisteredResource might have changed since they were added to the SortedSet, which apparently trips the set's searching algorithm.
> This can cause an infinite loop in the installer, as cleanupInstallableResources() returning true triggers a new installer cycle.
> We should use a more robust method to remove resources, and check that they are actually removed.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Updated] (SLING-2668) EntityResourceList.compact() fails to
remove resource from list, causes infinite loop
Posted by "Bertrand Delacretaz (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/SLING-2668?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Bertrand Delacretaz updated SLING-2668:
---------------------------------------
Description:
EntityResourceList.compact() calls resources.remove(RegisteredResource) and that can fail in some cases, as the stored RegisteredResource might have changed since they were added to the SortedSet, which apparently trips the set's searching algorithm.
This can cause an infinite loop in the installer, as cleanupInstallableResources() returning true triggers a new installer cycle.
We should use a more robust method to remove resources, and check that they are actually removed.
was:
EntityResourceList.compact() calls resources.remove(RegisteredResource) and that can fail in some cases, as the stored RegisteredResource might have changed since they were added to the SortedSet, which apparently trips the set's searching algorithm.
We should use a more robust method to remove resources, and check that they are actually removed.
> EntityResourceList.compact() fails to remove resource from list, causes infinite loop
> -------------------------------------------------------------------------------------
>
> Key: SLING-2668
> URL: https://issues.apache.org/jira/browse/SLING-2668
> Project: Sling
> Issue Type: Bug
> Components: Installer
> Affects Versions: Installer Core 3.4.0
> Reporter: Bertrand Delacretaz
> Assignee: Bertrand Delacretaz
>
> EntityResourceList.compact() calls resources.remove(RegisteredResource) and that can fail in some cases, as the stored RegisteredResource might have changed since they were added to the SortedSet, which apparently trips the set's searching algorithm.
> This can cause an infinite loop in the installer, as cleanupInstallableResources() returning true triggers a new installer cycle.
> We should use a more robust method to remove resources, and check that they are actually removed.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Comment Edited] (SLING-2668) EntityResourceList.compact()
fails to remove resource from list, causes infinite loop
Posted by "Carsten Ziegeler (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/SLING-2668?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13498106#comment-13498106 ]
Carsten Ziegeler edited comment on SLING-2668 at 11/15/12 4:25 PM:
-------------------------------------------------------------------
I just checked the source, and there is also EntityResourceList#remove. We should:
- remove this method completely
- remove the remove method in PersistentResourceList which calls the above remove method
- and change the usage from this.persistentList.remove(rr); to this.persistentList.remove(rr.getURL());
in OsgiInstallerImpl#511
We didn't have problems with this method yet, however it exposes the same potential problem as compact(). Removing using the url is using a different approach
was (Author: cziegeler):
I just checked the source, and there is also EntityResourceList#remove. We should:
- remove this method completely
- remove the remove method in PersistentResourceList
- and change the usage from this.persistentList.remove(rr); to this.persistentList.remove(rr.getURL());
in OsgiInstallerImpl#511
We didn't have problems with this method yet, however it exposes the same potential problem as compact(). Removing using the url is using a different approach
> EntityResourceList.compact() fails to remove resource from list, causes infinite loop
> -------------------------------------------------------------------------------------
>
> Key: SLING-2668
> URL: https://issues.apache.org/jira/browse/SLING-2668
> Project: Sling
> Issue Type: Bug
> Components: Installer
> Affects Versions: Installer Core 3.4.0
> Reporter: Bertrand Delacretaz
> Assignee: Bertrand Delacretaz
>
> EntityResourceList.compact() calls resources.remove(RegisteredResource) and that can fail in some cases, as the stored RegisteredResource might have changed since they were added to the SortedSet, which apparently trips the set's searching algorithm.
> This can cause an infinite loop in the installer, as cleanupInstallableResources() returning true triggers a new installer cycle.
> We should use a more robust method to remove resources, and check that they are actually removed.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Resolved] (SLING-2668) EntityResourceList.compact() fails
to remove resource from list, causes infinite loop
Posted by "Bertrand Delacretaz (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/SLING-2668?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Bertrand Delacretaz resolved SLING-2668.
----------------------------------------
Resolution: Fixed
Fix Version/s: Installer Core 3.4.2
Fixed in revision 1409872 by implementing a more robust compact() method and removing the other dangerous ones mentioned by Carsten.
> EntityResourceList.compact() fails to remove resource from list, causes infinite loop
> -------------------------------------------------------------------------------------
>
> Key: SLING-2668
> URL: https://issues.apache.org/jira/browse/SLING-2668
> Project: Sling
> Issue Type: Bug
> Components: Installer
> Affects Versions: Installer Core 3.4.0
> Reporter: Bertrand Delacretaz
> Assignee: Bertrand Delacretaz
> Fix For: Installer Core 3.4.2
>
>
> EntityResourceList.compact() calls resources.remove(RegisteredResource) and that can fail in some cases, as the stored RegisteredResource might have changed since they were added to the SortedSet, which apparently trips the set's searching algorithm.
> This can cause an infinite loop in the installer, as cleanupInstallableResources() returning true triggers a new installer cycle.
> We should use a more robust method to remove resources, and check that they are actually removed.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira