HashedWheelTimer.stop() fails

002244 dzenmassta at gmail.com
Thu Jun 24 04:45:57 EDT 2010


Ugh,I have found today, that there's another instance of timer running.
I'm so sorry for bothering You, Trustin :(
Perhaps I shouldn't post any problem the same day I find it.

On Thu, Jun 24, 2010 at 6:26 AM, Trustin Lee [via Netty Forums and Mailing
Lists] <ml-node+5215998-636721268-572016 at n2.nabble.com<ml-node%2B5215998-636721268-572016 at n2.nabble.com>
> wrote:

> Hi!
>
> That's weird.  If you called stop(), an AtomicBoolean flag is set to
> true and somehow the timer thread will notice it and kill itself.  You
> could confirm this behavior at: http://is.gd/d1lG1
>
> Perhaps you could write a standalone application that reproduces the
> problem so that I can reproduce the problem?
>
> Thanks,
> Trustin
>
> On 06/23/2010 09:45 PM, 002244 wrote:
>
> >
> > Greetings!
> >
> > I have encountered a problem running Netty's Timer facility:
> >
> > 1. Created one single Timer instance for a whole application on start.
> > "Timer timer = new HashedWheelTimer(50, TimeUnit.MILLISECONDS, 64)"
> > 2. Created three instances of TimerTask
> > 3. Scheduled these tasks multiple times with newTimeout(...) using
> different
> > producers.
> > 4. Called stop() on application shutdown
> >
> > It finished like this:
> >
> > "Hashed wheel timer #1" prio=3 tid=0x003f9400 nid=0x17 waiting on
> condition
> > [0xfa801000]
> >    java.lang.Thread.State: TIMED_WAITING (sleeping)
> >         at java.lang.Thread.sleep(Native Method)
> >         at
> >
> org.jboss.netty.util.HashedWheelTimer$Worker.waitForNextTick(HashedWheelTimer.java:426)
>
> >         at
> >
> org.jboss.netty.util.HashedWheelTimer$Worker.run(HashedWheelTimer.java:357)
> >         at
> >
> org.jboss.netty.util.ThreadRenamingRunnable.run(ThreadRenamingRunnable.java:108)
>
> >         at java.lang.Thread.run(Thread.java:619)
> >
> >
> > And the Apache Tomcat reported that:
> >
> > Jun 23, 2010 3:58:53 PM org.apache.catalina.loader.WebappClassLoader
> > clearReferencesThreads
> > SEVERE: A web application appears to have started a thread named [Hashed
> > wheel timer #1] but has failed to stop it.
> > This is very likely to create a memory leak.
> >
> > Is there's something conceptually wrong I miss?
> >
> >
> > Thank You for a wonderful framework Netty^^.
> >
> --
> what we call human nature in actuality is human habit
> http://gleamynode.net/
>
>
>
> _______________________________________________
> netty-users mailing list
> [hidden email] <http://user/SendEmail.jtp?type=node&node=5215998&i=0>
> https://lists.jboss.org/mailman/listinfo/netty-users
>
> *signature.asc* (301 bytes) Download Attachment<http://attachment/5215998/0/signature.asc>
> what we call human nature in actuality is human habit
> http://gleamynode.net/
>
>
> ------------------------------
>  View message @
> http://netty-forums-and-mailing-lists.685743.n2.nabble.com/HashedWheelTimer-stop-fails-tp5213062p5215998.html
> To unsubscribe from HashedWheelTimer.stop() fails, click here<http://netty-forums-and-mailing-lists.685743.n2.nabble.com/subscriptions/Unsubscribe.jtp?code=ZHplbm1hc3N0YUBnbWFpbC5jb218NTIxMzA2MnwzMjg3MDcwNzk=>.
>
>
>

-- 
View this message in context: http://netty-forums-and-mailing-lists.685743.n2.nabble.com/HashedWheelTimer-stop-fails-tp5213062p5216774.html
Sent from the Netty User Group mailing list archive at Nabble.com.


More information about the netty-users mailing list