Database deadlock triggered by NodeRestService

Description

A system was found to have exhausted all (50) database connections and failed to recover. Inspection of the thread dump revealed 49 threads with the following trace:

 

The line with “org.springframework.transaction.interceptor.TransactionInterceptor$1.proceedWithInvocation” shows that a DB connection has already been acquired and a transaction has been started. Later “org.opennms.netmgt.filter.JdbcFilterDao.getNodeMap(JdbcFilterDao.java:173)” tries to acquire another connection on the same thread without releasing the prior connection, leaving these calls prone to deadlocks. This is caused by mixing Spring AOP managed transactions w/ direct manipulation of JDBC calls.

Acceptance / Success Criteria

None

Activity

Show:

Jesse White July 4, 2023 at 12:37 AM

PR:

Fixed

Details

Assignee

Reporter

Priority

PagerDuty

Created July 3, 2023 at 11:31 PM
Updated January 4, 2024 at 7:33 PM
Resolved July 5, 2023 at 12:00 AM