Shell command `stateMachinesFeed` looks like it leaks Observables

Description

I see no evidence that it unsubscribes if someone Ctrl+C

[WARN ] 2019-08-15T05:19:27,224Z [Thread-7731 (ActiveMQ-client-global-threads)] internal.RPCClientProxyHandler.onRemoval - A hot observable returned from an RPC was never subscribed to. This wastes server-side resources because it was queueing observations for retrieval. It is being closed now, but please adjust your code to call .notUsed() on the observable to close it explicitly. (Java users: subscribe to it then unsubscribe). If you aren't sure where the leak is coming from, set -Dnet.corda.client.rpc.trackRpcCallSites=true on the JVM command line and you will get a stack trace with this warning. [errorCode=7al9bg, moreInformationAt=https://errors.corda.net/ENT/4.1/7al9bg] {}
net.corda.client.rpc.internal.RPCClientProxyHandler$CallSite: <Call site of root RPC 'stateMachinesFeed'>
at net.corda.client.rpc.internal.RPCClientProxyHandler.invoke(RPCClientProxyHandler.kt:255) ~[corda-rpc-4.1.jar:?]
at com.sun.proxy.$Proxy35.stateMachinesFeed(Unknown Source) ~[?:?]
at net.corda.tools.shell.InteractiveShell.runStateMachinesView(InteractiveShell.kt:438) ~[corda-shell-4.1.jar:?]
at net.corda.tools.shell.FlowShellCommand.watch(FlowShellCommand.java:48) ~[corda-shell-4.1.jar:?]
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_201]
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_201]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_201]
at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_201]
at org.crsh.cli.impl.lang.MethodDescriptor$1.invoke(MethodDescriptor.java:164) ~[crash.cli-cadb53544fbb3c0fb901445da614998a6a419488.jar:?]
at org.crsh.cli.impl.lang.MethodDescriptor$1.invoke(MethodDescriptor.java:106) ~[crash.cli-cadb53544fbb3c0fb901445da614998a6a419488.jar:?]
at org.crsh.lang.impl.java.ProducerCommandMatch$1.close(ProducerCommandMatch.java:117) ~[crash.shell-cadb53544fbb3c0fb901445da614998a6a419488.jar:?]
at org.crsh.shell.impl.command.pipeline.CommandInvokerAdapter.close(CommandInvokerAdapter.java:296) ~[crash.shell-cadb53544fbb3c0fb901445da614998a6a419488.jar:?]
at org.crsh.shell.impl.command.pipeline.PipeLine.close(PipeLine.java:106) ~[crash.shell-cadb53544fbb3c0fb901445da614998a6a419488.jar:?]
at org.crsh.shell.impl.command.spi.CommandInvoker.invoke(CommandInvoker.java:52) ~[crash.shell-cadb53544fbb3c0fb901445da614998a6a419488.jar:?]
at org.crsh.shell.impl.command.CRaSHCommandProcess.doInvoke(CRaSHCommandProcess.java:39) ~[crash.shell-cadb53544fbb3c0fb901445da614998a6a419488.jar:?]
at org.crsh.shell.impl.command.CRaSHProcess.execute(CRaSHProcess.java:60) ~[crash.shell-cadb53544fbb3c0fb901445da614998a6a419488.jar:?]
at org.crsh.shell.impl.async.AsyncProcess$2.call(AsyncProcess.java:207) ~[crash.shell-cadb53544fbb3c0fb901445da614998a6a419488.jar:?]
at org.crsh.shell.impl.async.AsyncProcess$2.call(AsyncProcess.java:177) ~[crash.shell-cadb53544fbb3c0fb901445da614998a6a419488.jar:?]
at java.util.concurrent.FutureTask.run(FutureTask.java:266) ~[?:1.8.0_201]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) ~[?:1.8.0_201]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) ~[?:1.8.0_201]
at java.lang.Thread.run(Thread.java:748) [?:1.8.0_201]

Assignee

Stefan Iliev

Reporter

Rick Parker

Labels

Sprint

None

Epic Link

None

Priority

Highest

Engineering Teams

None

Fix versions

Ported to...

Corda 4.3

Story Points / Dev Days

3

Build cut

None
Configure