Before Creating the Bug Report
Runtime platform environment
macOS (Darwin), reproduced with an isolated local unit test.
RocketMQ version
Branch: develop
Git commit: fd0c959
JDK Version
Zulu OpenJDK 8 (8.94.0.17)
Describe the Bug
HookUtils converts relative timer delays using unchecked long multiplication and addition. A very large delay can overflow into a past timestamp, bypass the future-delay validation, and be accepted as an immediate message.
Steps to Reproduce
- Create a timer message with TIMER_DELAY_SEC or TIMER_DELAY_MS set to Long.MAX_VALUE.
- Pass it through HookUtils.handleScheduleMessage.
- Observe that the overflowing delay is not rejected as an illegal timer message.
What Did You Expect to See?
A relative delay that cannot be represented as an absolute millisecond timestamp should return WHEEL_TIMER_MSG_ILLEGAL.
What Did You See Instead?
Overflow wraps the calculated delivery timestamp and the message can follow the immediate-message path.
Additional Context
Both seconds and milliseconds paths have deterministic unit reproductions in HookUtilsTest.
Before Creating the Bug Report
Runtime platform environment
macOS (Darwin), reproduced with an isolated local unit test.
RocketMQ version
Branch: develop
Git commit: fd0c959
JDK Version
Zulu OpenJDK 8 (8.94.0.17)
Describe the Bug
HookUtils converts relative timer delays using unchecked long multiplication and addition. A very large delay can overflow into a past timestamp, bypass the future-delay validation, and be accepted as an immediate message.
Steps to Reproduce
What Did You Expect to See?
A relative delay that cannot be represented as an absolute millisecond timestamp should return WHEEL_TIMER_MSG_ILLEGAL.
What Did You See Instead?
Overflow wraps the calculated delivery timestamp and the message can follow the immediate-message path.
Additional Context
Both seconds and milliseconds paths have deterministic unit reproductions in HookUtilsTest.