Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [milo-dev] OpcUaClient disconnect fails to shutdown threadpool

There is no HTML version of the javadocs hosted online, but every artifact uploaded to Maven central contains Javadocs. 


Though it's not plainly obvious that you need to call this during application shutdown. Only the ClientExampleRunner class demonstrates such a thing, and does so quietly :)

On Thu, Oct 1, 2020 at 5:04 AM René Imhof <rene.imhof@xxxxxxxxxxxxxx> wrote:
Yup that did the trick. Thanks a bunch for your quick response. Where can I find the Javadoc for that Stack API though?
I wanted to read up on that API but can't seem to find it anywhere.

Best Regards,
René

Sent with Shift

Am Do., 1. Okt. 2020 um 13:51 Uhr schrieb Kevin Herron <kevinherron@xxxxxxxxx>:
Rene,

Disconnecting the client alone isn't enough - if you are truly done with Milo, i.e. your application/JVM is shutting down, you must also call Stack.releaseSharedResources()

On Thu, Oct 1, 2020 at 2:44 AM René Imhof <rene.imhof@xxxxxxxxxxxxxx> wrote:
Hello,

I'm currently in the process of evaluating milo for our project. One thing I noticed while shutting down our application is that milo seems to have some trouble shutting down all of its worker threads.

Here's how I tried to shutdown milo:

 OpcUaClient _client;
//connect to opc endpoint
.....
//shutting down milo
_client.disconnect().get();   

However when I run this code, our application fails to shutdown milo's threads:

 WARNUNG: The web application [ROOT] appears to have started a thread named [milo-netty-event-loop-0] but has failed to stop it. This is very likely to create a memory leak. Stack trace of thread:
 sun.nio.ch.WindowsSelectorImpl$SubSelector.poll0(Native Method)
 sun.nio.ch.WindowsSelectorImpl$SubSelector.poll(WindowsSelectorImpl.java:296)
 sun.nio.ch.WindowsSelectorImpl$SubSelector.access$400(WindowsSelectorImpl.java:278)
 sun.nio.ch.WindowsSelectorImpl.doSelect(WindowsSelectorImpl.java:159)
 sun.nio.ch.SelectorImpl.lockAndDoSelect(SelectorImpl.java:86)
 sun.nio.ch.SelectorImpl.select(SelectorImpl.java:97)
 io.netty.channel.nio.SelectedSelectionKeySetSelector.select(SelectedSelectionKeySetSelector.java:62)
 io.netty.channel.nio.NioEventLoop.select(NioEventLoop.java:824)
 io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:457)
 io.netty.util.concurrent.SingleThreadEventExecutor$6.run(SingleThreadEventExecutor.java:1050)
 io.netty.util.internal.ThreadExecutorMap$2.run(ThreadExecutorMap.java:74)
 java.lang.Thread.run(Thread.java:748)
Okt 01, 2020 11:23:35 AM org.apache.catalina.loader.WebappClassLoaderBase clearReferencesThreads
WARNUNG: The web application [ROOT] appears to have started a thread named [milo-netty-wheel-timer] but has failed to stop it. This is very likely to create a memory leak. Stack trace of thread:
 java.lang.Thread.sleep(Native Method)
 io.netty.util.HashedWheelTimer$Worker.waitForNextTick(HashedWheelTimer.java:577)
 io.netty.util.HashedWheelTimer$Worker.run(HashedWheelTimer.java:476)
 java.lang.Thread.run(Thread.java:748)
Okt 01, 2020 11:23:35 AM org.apache.catalina.loader.WebappClassLoaderBase clearReferencesThreads
WARNUNG: The web application [ROOT] appears to have started a thread named [milo-netty-event-loop-1] but has failed to stop it. This is very likely to create a memory leak. Stack trace of thread:
 sun.nio.ch.WindowsSelectorImpl$SubSelector.poll0(Native Method)
 sun.nio.ch.WindowsSelectorImpl$SubSelector.poll(WindowsSelectorImpl.java:296)
 sun.nio.ch.WindowsSelectorImpl$SubSelector.access$400(WindowsSelectorImpl.java:278)
 sun.nio.ch.WindowsSelectorImpl.doSelect(WindowsSelectorImpl.java:159)
 sun.nio.ch.SelectorImpl.lockAndDoSelect(SelectorImpl.java:86)
 sun.nio.ch.SelectorImpl.select(SelectorImpl.java:97)
 io.netty.channel.nio.SelectedSelectionKeySetSelector.select(SelectedSelectionKeySetSelector.java:62)
 io.netty.channel.nio.NioEventLoop.select(NioEventLoop.java:824)
 io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:457)
 io.netty.util.concurrent.SingleThreadEventExecutor$6.run(SingleThreadEventExecutor.java:1050)
 io.netty.util.internal.ThreadExecutorMap$2.run(ThreadExecutorMap.java:74)
 java.lang.Thread.run(Thread.java:748)
Okt 01, 2020 11:23:35 AM org.apache.catalina.loader.WebappClassLoaderBase clearReferencesThreads
WARNUNG: The web application [ROOT] appears to have started a thread named [milo-shared-scheduled-executor-0] 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.park(LockSupport.java:175)
 java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await(AbstractQueuedSynchronizer.java:2039)
 java.util.concurrent.ScheduledThreadPoolExecutor$DelayedWorkQueue.take(ScheduledThreadPoolExecutor.java:1081)
 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)


I always assumed that this would shutdown milo and its worker threads. Is there something I'm missing? I looked through the javadoc but couldn't find anything concrete about shutting down milos worker threads.

Kind regards,
René

Sent with Shift


benjamin Systems

      

Ludwigsplatz. 6 a

D-64283 Darmstadt

 

www.fluidworld.com


Der Sitz der Gesellschaft: Roßdorf

Disclaimer

Diese E-Mail enthält vertrauliche und/oder rechtlich geschützte Informationen. Wenn Sie nicht der richtige Adressat sind oder diese E-Mail irrtümlich erhalten haben, informieren Sie bitte sofort den Absender und vernichten Sie diese Mail. Das unerlaubte Kopieren sowie die unbefugte Weitergabe dieser Mail ist nicht gestattet.

This e-mail may contain confidential and/or privileged information. If you are not the intended recipient (or have received this e-mail in error) please notify the sender immediately and destroy this e-mail. Any unauthorized copying, disclosure or distribution of the material in this e-mail is strictly forbidden.

_______________________________________________
milo-dev mailing list
milo-dev@xxxxxxxxxxx
To unsubscribe from this list, visit https://www.eclipse.org/mailman/listinfo/milo-dev
_______________________________________________
milo-dev mailing list
milo-dev@xxxxxxxxxxx
To unsubscribe from this list, visit https://www.eclipse.org/mailman/listinfo/milo-dev

benjamin Systems

      

Ludwigsplatz. 6 a

D-64283 Darmstadt

 

www.fluidworld.com


Der Sitz der Gesellschaft: Roßdorf

Disclaimer

Diese E-Mail enthält vertrauliche und/oder rechtlich geschützte Informationen. Wenn Sie nicht der richtige Adressat sind oder diese E-Mail irrtümlich erhalten haben, informieren Sie bitte sofort den Absender und vernichten Sie diese Mail. Das unerlaubte Kopieren sowie die unbefugte Weitergabe dieser Mail ist nicht gestattet.

This e-mail may contain confidential and/or privileged information. If you are not the intended recipient (or have received this e-mail in error) please notify the sender immediately and destroy this e-mail. Any unauthorized copying, disclosure or distribution of the material in this e-mail is strictly forbidden.

_______________________________________________
milo-dev mailing list
milo-dev@xxxxxxxxxxx
To unsubscribe from this list, visit https://www.eclipse.org/mailman/listinfo/milo-dev

Back to the top