Jose Luis López created YARN-12001:
--------------------------------------
Summary: estTimelineReaderHBaseDown leaks TimelineReaderServer
storage monitors; serviceStop() skips child services if the web server fails to
stop
Key: YARN-12001
URL: https://issues.apache.org/jira/browse/YARN-12001
Project: Hadoop YARN
Issue Type: Bug
Components: test, timelineserver
Reporter: Jose Luis López
TestTimelineReaderHBaseDown starts a TimelineReaderServer in all five of its
tests and never stops one. Each run leaks the TimelineStorageMonitor the server
schedules: non-daemon threads that keep polling, every
TIMELINE_SERVICE_READER_STORAGE_MONITOR_INTERVAL_MS, an HBase minicluster the
test has already shut down. hadoop-yarn-server-timelineservice-hbase-tests runs
with forkCount 0, so these threads pile up in Maven's JVM across all eleven
test classes in the module.
Stopping the server isn't enough on its own. TimelineReaderServer.serviceStop()
calls readerWebServer.stop() before super.serviceStop(). If the web server
fails to stop, the exception skips super.serviceStop(), so the child services
(the reader and the storage monitor's executor) are never stopped.
Fix:
* TimelineReaderServer.serviceStop(): call super.serviceStop() in a finally.
Move the web-app stop into stopTimelineReaderWebApp() (@VisibleForTesting).
* TestTimelineReaderHBaseDown: stop the server in a finally with
ServiceOperations.stopQuietly() in all five tests, as every other test in the
module already does. testTimelineReaderRecoversAfterHBaseReturns also waits
until no regions are in transition before shutting down. configure() replaces
hbase.regionserver.abort.timeout.task with a no-op TimerTask, because HBase's
default task halts the JVM, and with forkCount 0 that JVM is Maven's.
* TestTimelineReaderServer: new test
testChildServicesStoppedWhenWebAppStopFails.
Split out of HADOOP-19979. Reviewed earlier as part of
https://github.com/apache/hadoop/pull/8717.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]