You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@river.apache.org by "Patricia Shanahan (JIRA)" <ji...@apache.org> on 2010/08/29 21:21:53 UTC
[jira] Created: (RIVER-348) Possible race condition in
net.jini.lookup.ServiceDiscoveryManager addProxyReg
Possible race condition in net.jini.lookup.ServiceDiscoveryManager addProxyReg
------------------------------------------------------------------------------
Key: RIVER-348
URL: https://issues.apache.org/jira/browse/RIVER-348
Project: River
Issue Type: Bug
Reporter: Patricia Shanahan
SDM appears to assume that tasks with sequence numbers are added to their TaskManager in ascending sequence number order. The method addProxyReg increments the sequence number in a serviceIdMap synchronized block, but does not add the task to its TaskManager until outside the block. leaving a small window during which another task could be created with higher sequence number but added to the TaskManager first.
There is no known test case reproducing this, so it is difficult to be sure there is nothing else preventing the problem from happening.
The fix wold be to move the cacheTaskMgr.add(treg); call inside the synchronized block.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (RIVER-348) Possible race condition in
net.jini.lookup.ServiceDiscoveryManager addProxyReg
Posted by "Jonathan Costers (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/RIVER-348?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Jonathan Costers updated RIVER-348:
-----------------------------------
Attachment: qaresult-servicediscovery-JC-20100829.zip
Here is a report of a run of the servicediscovery test category.
The tests that are failing are probably the ones to look at deeper.
> Possible race condition in net.jini.lookup.ServiceDiscoveryManager addProxyReg
> ------------------------------------------------------------------------------
>
> Key: RIVER-348
> URL: https://issues.apache.org/jira/browse/RIVER-348
> Project: River
> Issue Type: Bug
> Reporter: Patricia Shanahan
> Priority: Minor
> Attachments: qaresult-servicediscovery-JC-20100829.zip
>
>
> SDM appears to assume that tasks with sequence numbers are added to their TaskManager in ascending sequence number order. The method addProxyReg increments the sequence number in a serviceIdMap synchronized block, but does not add the task to its TaskManager until outside the block. leaving a small window during which another task could be created with higher sequence number but added to the TaskManager first.
> There is no known test case reproducing this, so it is difficult to be sure there is nothing else preventing the problem from happening.
> The fix wold be to move the cacheTaskMgr.add(treg); call inside the synchronized block.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (RIVER-348) Possible race condition in
net.jini.lookup.ServiceDiscoveryManager addProxyReg
Posted by "Patricia Shanahan (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/RIVER-348?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Patricia Shanahan updated RIVER-348:
------------------------------------
Priority: Minor (was: Major)
> Possible race condition in net.jini.lookup.ServiceDiscoveryManager addProxyReg
> ------------------------------------------------------------------------------
>
> Key: RIVER-348
> URL: https://issues.apache.org/jira/browse/RIVER-348
> Project: River
> Issue Type: Bug
> Reporter: Patricia Shanahan
> Priority: Minor
>
> SDM appears to assume that tasks with sequence numbers are added to their TaskManager in ascending sequence number order. The method addProxyReg increments the sequence number in a serviceIdMap synchronized block, but does not add the task to its TaskManager until outside the block. leaving a small window during which another task could be created with higher sequence number but added to the TaskManager first.
> There is no known test case reproducing this, so it is difficult to be sure there is nothing else preventing the problem from happening.
> The fix wold be to move the cacheTaskMgr.add(treg); call inside the synchronized block.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (RIVER-348) Possible race condition in
net.jini.lookup.ServiceDiscoveryManager addProxyReg
Posted by "Patricia Shanahan (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/RIVER-348?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12904055#action_12904055 ]
Patricia Shanahan commented on RIVER-348:
-----------------------------------------
Unfortunately, none of the current servicediscovery failures relates to this problem. All have failed at least once when run with an SDM that has the race condition eliminated. This one remains a theoretical problem only, with no test case demonstrating it.
> Possible race condition in net.jini.lookup.ServiceDiscoveryManager addProxyReg
> ------------------------------------------------------------------------------
>
> Key: RIVER-348
> URL: https://issues.apache.org/jira/browse/RIVER-348
> Project: River
> Issue Type: Bug
> Reporter: Patricia Shanahan
> Priority: Minor
> Attachments: qaresult-servicediscovery-JC-20100829.zip
>
>
> SDM appears to assume that tasks with sequence numbers are added to their TaskManager in ascending sequence number order. The method addProxyReg increments the sequence number in a serviceIdMap synchronized block, but does not add the task to its TaskManager until outside the block. leaving a small window during which another task could be created with higher sequence number but added to the TaskManager first.
> There is no known test case reproducing this, so it is difficult to be sure there is nothing else preventing the problem from happening.
> The fix wold be to move the cacheTaskMgr.add(treg); call inside the synchronized block.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.