[L2SWITCH-57] NullPointerException in HostTracker.java Created: 16/Jan/16 Updated: 19/Oct/17 Resolved: 25/May/16 |
|
| Status: | Resolved |
| Project: | l2switch |
| Component/s: | General |
| Affects Version/s: | unspecified |
| Fix Version/s: | None |
| Type: | Bug | ||
| Reporter: | lei xu | Assignee: | Unassigned |
| Resolution: | Won't Do | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Environment: |
Operating System: All |
||
| External issue ID: | 4983 |
| Priority: | Low |
| Description |
|
Two buggy sites may raise NullPointerException in HostTracker module if concurrent remove operation occurs. The first case is for "transHost" variable, if a concurrent remove upon "hostsDB" variable. The corresponding snippets are attached: HostNodeConnector transHost = hostsDB.get(networkAddr); The second case is for "existinghost" variable. The following are snippets: HostNodeConnector existinghost = hostsDB.get(id); To solve the issue, the simplest way is to add a null checker for these variable since we cannot guarantee the result from hostsDB is not NULL. |
| Comments |
| Comment by Suvitha Balu [ 19/May/16 ] |
|
(In reply to lei xu from comment #0) Hi, I would like to take up this bug, so could you please provide me the more details. Thanks, |
| Comment by lei xu [ 19/May/16 ] |
|
Hi Suvitha Balu, I have checked the latest sorce code of HostTracker.java in It seems the concurrency bugs are still there. First, in the line of 547 and 548, |
| Comment by Suvitha Balu [ 20/May/16 ] |
|
Hi Lei, I have checked-out the ODL Origin/master controller and L2switch code and could not find the HostTracker.java file. Is the part of any new feature or specific to any release? |
| Comment by Colin Dixon [ 25/May/16 ] |
|
This appears to be referring to the now-defunct HostTracker that used to be in the controller using the AD-SAL. The AD-SAL was completely removed in Beryllium and the recommendation is to use the Host Tracker in the l2switch project as described here: You should be able to install it by installing the Karaf feature for odl-l2switch-hosttracker. |