#1802 Traffic channels stuck in TEARDOWN. Resolves: (#1829)

1. Tuner channel processing runnables were being interruptibly shutdown, preventing the channel from clearing any owned locks (ie DMRTrafficChannelManager) causing thread deadlock and eventually causing out of memory situation or tying up all threads in the thread pool to the point that the application stopped processing any data.

2. DMR Traffic Channel Manager was erroneously processing non-owned traffic channel events.

Co-authored-by: Dennis Sheirer <dsheirer@github.com>
This commit is contained in:
Denny Sheirer
2024-02-09 06:05:19 -05:00
committed by GitHub
parent 0491b08818
commit 6b5a1fb827
21 changed files with 122 additions and 265 deletions

View File

@@ -1,6 +1,6 @@
/*
* *****************************************************************************
* Copyright (C) 2014-2023 Dennis Sheirer
* Copyright (C) 2014-2024 Dennis Sheirer
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -106,7 +106,9 @@ public class Dispatcher<E> implements Listener<E>
{
if(mScheduledFuture != null)
{
mScheduledFuture.cancel(true);
//Note: this has to be false because downstream implementations may have acquired locks and they must
//be able to release those locks or we'll get a deadlock situation.
mScheduledFuture.cancel(false);
}
if(mExecutorService != null)
@@ -132,7 +134,9 @@ public class Dispatcher<E> implements Listener<E>
{
if(mScheduledFuture != null)
{
mScheduledFuture.cancel(true);
//Note: this has to be false because downstream implementations may have acquired locks and they must
//be able to release those locks or we'll get a deadlock situation.
mScheduledFuture.cancel(false);
mScheduledFuture = null;
mQueue.clear();
}