Opened 3 months ago

Last modified 8 weeks ago

#5486 new defect

Suspected memory leak in Cassandra

Reported by: tomek Owned by:
Priority: very low Milestone: Kea1.4
Component: database-cassandra Version: git
Keywords: Cc:
CVSS Scoring: Parent Tickets:
Sensitive: no Defect Severity: N/A
Sub-Project: DHCP Feature Depending on Ticket:
Estimated Difficulty: 0 Add Hours to Ticket: 0
Total Hours: 0 Internal?: no


There is the following comment in Udt class in Cassandra:

    /// @todo: Need to get back to this issue. This is likely a memory leak.
    // Bug: it seems that if there is no call to
    //      cass_user_type_set_*(cass_user_type_), then
    //      cass_user_type_free(cass_user_type_) might SIGSEGV, so we never
    //      free. Udt objects should have application scope though.
    // cass_user_type_free(cass_user_type_);

Every time User data type object is destroyed, there seem to be a small memory leak occurring. Udt is created when DB is reconfigured, so it's not a major concern, but for deployments that do reconfiguration often and never restart this may be an issue.


Change History (3)

comment:1 Changed 2 months ago by tomek

The code is coming from src/lib/dhcpsrv/ (destructor of Udt object).

comment:2 Changed 2 months ago by tomek

  • Priority changed from low to very low

comment:3 Changed 8 weeks ago by razvan.becheriu

I have tested several version of the cpp driver, and it seems that I can not replicate the SIGSEGV. The changes in the server code might have fixed this issue as it was consistent, and now it has completely disappeared.
It is safe to un-comment the call to cass_user_type_free and to remove the comment:


Note: See TracTickets for help on using tickets.