Description
This is very difficult to reproduce, and I am still actively trying to create a testcase with TimerQueue used in isolation that reproduces the underlying issue otuside the event loop itself. Until then, maybe this is going to be obvious to somebody more knowledgeable of the TimerQueue implementation.
After hours (sometimes days) of running the event loop, there is a chance that the event loop blocks and throws an apparently endless stream of warnings of the following nature:
Warning: Undefined array key 321 in /app/vendor/revolt/event-loop/src/EventLoop/Internal/TimerQueue.php on line 108
Warning: Attempt to read property "expiration" on null in /app/vendor/revolt/event-loop/src/EventLoop/Internal/TimerQueue.php on line 108
Warning: Undefined array key 321 in /app/vendor/revolt/event-loop/src/EventLoop/Internal/TimerQueue.php on line 109
Warning: Undefined array key 322 in /app/vendor/revolt/event-loop/src/EventLoop/Internal/TimerQueue.php on line 109
Warning: Undefined array key 322 in /app/vendor/revolt/event-loop/src/EventLoop/Internal/TimerQueue.php on line 109
Warning: Attempt to read property "expiration" on null in /app/vendor/revolt/event-loop/src/EventLoop/Internal/TimerQueue.php on line 109
Warning: Undefined array key 322 in /app/vendor/revolt/event-loop/src/EventLoop/Internal/TimerQueue.php on line 113
Warning: Attempt to read property "expiration" on null in /app/vendor/revolt/event-loop/src/EventLoop/Internal/TimerQueue.php on line 113
Warning: Undefined array key 322 in /app/vendor/revolt/event-loop/src/EventLoop/Internal/TimerQueue.php on line 129
Warning: Undefined array key 322 in /app/vendor/revolt/event-loop/src/EventLoop/Internal/TimerQueue.php on line 130
Warning: Attempt to read property "id" on null in /app/vendor/revolt/event-loop/src/EventLoop/Internal/TimerQueue.php on line 130
Warning: Undefined array key 306 in /app/vendor/revolt/event-loop/src/EventLoop/Internal/TimerQueue.php on line 143
Warning: Attempt to read property "id" on null in /app/vendor/revolt/event-loop/src/EventLoop/Internal/TimerQueue.php on line 144
Warning: Attempt to read property "expiration" on null in /app/vendor/revolt/event-loop/src/EventLoop/Internal/TimerQueue.php on line 108
Warning: Attempt to read property "expiration" on null in /app/vendor/revolt/event-loop/src/EventLoop/Internal/TimerQueue.php on line 113
Warning: Attempt to read property "expiration" on null in /app/vendor/revolt/event-loop/src/EventLoop/Internal/TimerQueue.php on line 68Warning: Attempt to read property "id" on null in /app/vendor/revolt/event-loop/src/EventLoop/Internal/TimerQueue.php on line 142
Warning: Undefined array key 306 in /app/vendor/revolt/event-loop/src/EventLoop/Internal/TimerQueue.php on line 143
Warning: Attempt to read property "id" on null in /app/vendor/revolt/event-loop/src/EventLoop/Internal/TimerQueue.php on line 144
Warning: Attempt to read property "expiration" on null in /app/vendor/revolt/event-loop/src/EventLoop/Internal/TimerQueue.php on line 108
Warning: Attempt to read property "expiration" on null in /app/vendor/revolt/event-loop/src/EventLoop/Internal/TimerQueue.php on line 113
Warning: Undefined array key 306 in /app/vendor/revolt/event-loop/src/EventLoop/Internal/TimerQueue.php on line 143
Warning: Attempt to read property "id" on null in /app/vendor/revolt/event-loop/src/EventLoop/Internal/TimerQueue.php on line 144
Warning: Attempt to read property "expiration" on null in /app/vendor/revolt/event-loop/src/EventLoop/Internal/TimerQueue.php on line 149
Warning: Attempt to read property "expiration" on null in /app/vendor/revolt/event-loop/src/EventLoop/Internal/TimerQueue.php on line 95Warning: Attempt to read property "id" on null in /app/vendor/revolt/event-loop/src/EventLoop/Internal/TimerQueue.php on line 133
Warning: Attempt to read property "expiration" on null in /app/vendor/revolt/event-loop/src/EventLoop/Internal/TimerQueue.php on line 95
Warning: Attempt to read property "id" on null in /app/vendor/revolt/event-loop/src/EventLoop/Internal/TimerQueue.php on line 133
And then a seemingly endless stream of almost the same, complaining at infinite about array key 306 on line 143, then a bunch of read property on null ('expiration', 'id') on lines 144, 149, 95, 133.
As soon as I, and if, can reliably reproduce this outside of a production environment, I will update. I am currently untangling the code to the best of my abilities.
This looks like a pure code problem, but if it matters:
PRETTY_NAME="Debian GNU/Linux 11 (bullseye)"
NAME="Debian GNU/Linux"
VERSION_ID="11"
VERSION="11 (bullseye)"
VERSION_CODENAME=bullseye
ID=debian
PHP 8.2.27 (cli) (built: Feb 25 2025 02:25:39) (NTS)
Using Revolt/event-loop 1.0.7 (was same on 1.0.6) as part of amphp/amp 3.0.2.