question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

HashedWheelTimer does not always respect maxPendingTimeouts

See original GitHub issue

Expected behavior

HashedWheelTimer should respect the maxPendingTimeouts parameter.

Actual behavior

When the value is unlimited (e.g. <= 0), users can still hit an java.lang.IllegalStateException: Queue full from the underlying Queue which comes from PlatformDependent.newMpscQueue() in the constructor.

Steps to reproduce

Create a HashedWheelTimer with unlimited maxPendingTimeouts then add a task that never completes (e.g. while (true) println("hi");). Then keep adding tasks to the queue until you get the queue full exception.

Here is an example (partial) stacktrace:

Caused by [alertable exception] java.lang.IllegalStateException: Queue full
     at java.util.AbstractQueue.add(AbstractQueue.java:98)
     at io.netty.util.HashedWheelTimer.newTimeout(HashedWheelTimer.java:423)
     ...

Minimal yet complete reproducer code (or URL to code)

Netty version

4.1.12

JVM version (e.g. java -version)

OS version (e.g. uname -a)

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:9 (9 by maintainers)

github_iconTop GitHub Comments

1reaction
kevinolivercommented, Jul 10, 2017

@Scottmitch nothing else needed from my end. thank you!

0reactions
Scottmitchcommented, Jul 10, 2017

@kevinoliver - Now that https://github.com/netty/netty/pull/6295 has been pulled in … and HashedWheelTimer already uses PlatformDependent.newMpscQueue() (unbounded queue), and we enforce the limit via pendingTimeouts … is there any more action required to close this issue?

Read more comments on GitHub >

github_iconTop Results From Across the Web

HashedWheelTimer (Netty API Reference (4.1.85.Final))
Releases all resources acquired by this Timer and cancels all tasks which were scheduled but not executed yet. Methods inherited from class java.lang.Object....
Read more >
HashedWheelTimer (The Netty Project API Reference (3.2.6 ...
Releases all resources acquired by this Timer and cancels all tasks which were scheduled but not executed yet. Methods inherited from class java.lang.Object....
Read more >
io.netty.util.HashedWheelTimer$HashedWheelTimeout.<init> java ...
During processing all the queued HashedWheelTimeouts will be added to the correct ... 0 && pendingTimeoutsCount > maxPendingTimeouts) { pendingTimeouts.
Read more >
PMOD software 医疗图像 - CSDN
Type Topic Name Code Structure from motion libmv Code Dimension Reduction LLE Code Clustering Spectral Clustering ‑ UCSD Project
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found