[NETVIRT-886] Suspected ReadOnlyTransaction leak in StatisticsImpl Created: 04/Sep/17  Updated: 24/Nov/17  Resolved: 24/Nov/17

Status: Resolved
Project: netvirt
Component/s: General
Affects Version/s: Nitrogen
Fix Version/s: Nitrogen, Carbon, Oxygen

Type: Bug
Reporter: Michael Vorburger Assignee: Michael Vorburger
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Operating System: All
Platform: All


Issue Links:
Blocks
blocks NETVIRT-883 Umbrella parent issue for grouping al... Resolved
blocks NETVIRT-985 java.lang.OutOfMemoryError: Java heap... Resolved
External issue ID: 9103

 Description   

As found in see NETVIRT-883 attachment, there are many thousands of (read only) transactions that are opened in StatisticsImpl but apparently never closed:
org.opendaylight.netvirt.statistics.StatisticsImpl.handleInterfaceRemoval(StatisticsImpl.java:398)
org.opendaylight.netvirt.statistics.CountersServiceInterfaceListener.remove(CountersServiceInterfaceListener.java:41)
org.opendaylight.netvirt.statistics.CountersServiceInterfaceListener.remove(CountersServiceInterfaceListener.java:19)



 Comments   
Comment by Michael Vorburger [ 15/Nov/17 ]

This popped up in NETVIRT-985 again today, so I'm proposing https://git.opendaylight.org/gerrit/65562 to fix it, as it seems pretty bad:

    2774x transactions opened here, which are not closed:
    2531x transactions opened here, which are not closed:
    2390x transactions opened here, which are not closed:
      org.opendaylight.controller.md.sal.binding.impl.BindingDOMDataBrokerAdapter.newReadOnlyTransaction(BindingDOMDataBrokerAdapter.java:59)
      (...)
      org.opendaylight.netvirt.statistics.StatisticsImpl.handleInterfaceRemoval(StatisticsImpl.java:398)
      org.opendaylight.netvirt.statistics.CountersServiceInterfaceListener.remove(CountersServiceInterfaceListener.java:41)

c/65562 is for carbon - I'll attempt to cherry-pick to Nitrogen, and for master we could use ManagedNewTransactionRunner?

Comment by Michael Vorburger [ 15/Nov/17 ]

> for master we could use ManagedNewTransactionRunner?

ended-up doing a POCP (Plain Old Cherry Pick) for this one to master as well, becase ManagedNewTransactionRunner didn't actually support ReadOnlyTransaction, yet (but it soon will, via https://git.opendaylight.org/gerrit/#/c/65565/ and https://git.opendaylight.org/gerrit/#/c/65566/, but that shouldn't hold this up).

Generated at Wed Feb 07 20:22:43 UTC 2024 using Jira 8.20.10#820010-sha1:ace47f9899e9ee25d7157d59aa17ab06aee30d3d.