HashedWheelTimer does not always respect maxPendingTimeouts
See original GitHub issueExpected 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:
- Created 6 years ago
- Comments:9 (9 by maintainers)
Top 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 >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@Scottmitch nothing else needed from my end. thank you!
@kevinoliver - Now that https://github.com/netty/netty/pull/6295 has been pulled in … and
HashedWheelTimer
already usesPlatformDependent.newMpscQueue()
(unbounded queue), and we enforce the limit viapendingTimeouts
… is there any more action required to close this issue?