Details
- 
    Bug 
- 
    Status: Closed (View Workflow)
- 
    Major 
- 
    Resolution: Duplicate
- 
    2.4.0
- 
    None
Description
Create MariaDbStatement with queryTimeout and exequte a query.
In this moment will be created new thread with name"MariaDB-timeout-1".
But after finishing the query this thread is still alive.
As result, if we have web application on Tomcat and interrupt it, we get warning:
| 13-Feb-2019 17:42:10.645 WARNING [Thread-5] org.apache.catalina.loader.WebappClassLoaderBase.clearReferencesThreads The web application [...] appears to have started a thread named [MariaDb-timeout-1] but has failed to stop it. This is very likely to create a memory leak. Stack trace of thread: | 
|  sun.misc.Unsafe.park(Native Method) | 
| java.util.concurrent.locks.LockSupport.parkNanos(LockSupport.java:215) | 
| java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.awaitNanos(AbstractQueuedSynchronizer.java:2078) | 
| java.util.concurrent.ScheduledThreadPoolExecutor$DelayedWorkQueue.take(ScheduledThreadPoolExecutor.java:1093) | 
| java.util.concurrent.ScheduledThreadPoolExecutor$DelayedWorkQueue.take(ScheduledThreadPoolExecutor.java:809) | 
| java.util.concurrent.ThreadPoolExecutor.getTask(ThreadPoolExecutor.java:1074) | 
| java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1134) | 
| java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) | 
| java.lang.Thread.run(Thread.java:748) | 
| 
 | 
This case is reproduced on Tomcat 8.5.37 with mariadb-java-client 2.4.0
Attachments
Issue Links
- duplicates
- 
                    CONJ-563 Thread leak reported by Tomcat when using the connector -         
- Closed
 
-