Releases: rollun-lc/rollun-callback
Releases · rollun-lc/rollun-callback
Release list
8.2.2
- Background jobs no longer inherit the php-fpm worker's low-numbered descriptors (Trello py2Gb7O7). A worker holds
dup()s of the master's stdout/stderr catch-pipes on fds 3-9 (rollun-logger'sphp://stdoutwriter; fd 6/7/8 in production), andInterrupter\Process/ProcessByNamespawned jobs withshell_exec("php … 1>X 2>X & echo $!"), which redirects only 1 and 2. A job that kept such a dup alive past the worker's exit made the master readEAGAINinstead ofEOF; the freed child's event stayed in the master's queue and the replacement worker's pipe was never registered in epoll, so it wedged forever inpipe_writeafter 64 KB of output (php-src GH-8517; on PHP >= 8.1.20 the symptom is lost logs instead). The spawn command now appends3>&- 4>&- 5>&- 6>&- 7>&- 8>&- 9>&-. - Limits:
/bin/shis dash on our images and only parses single-digit redirections, so descriptors >= 10 are still inherited; the listening socket and the FastCGI connection are usually there. This is the limited change agreed for the services that stay on their current PHP for now; the complete fix (proc_openwith a full descriptorspec) is tracked in the same ticket. Pair it with rollun-logger >= 6.2.9 / 7.8.2 / 8.0.2, which stops the writer from holding the dup in the first place. - No change for
PidKiller/WorkerManager:$!is still the job's own PID and the job's argv is unchanged. Verified with dash on PHP 7.2 and 8.0: closing a descriptor that is not open is not an error,OUTPUT_STREAMfile paths and/dev/nullbehave as before, and the test suites give the same results as the previous release.
7.6.2
- Background jobs no longer inherit the php-fpm worker's low-numbered descriptors (Trello py2Gb7O7). A worker holds
dup()s of the master's stdout/stderr catch-pipes on fds 3-9 (rollun-logger'sphp://stdoutwriter; fd 6/7/8 in production), andInterrupter\Process/ProcessByNamespawned jobs withshell_exec("php … 1>X 2>X & echo $!"), which redirects only 1 and 2. A job that kept such a dup alive past the worker's exit made the master readEAGAINinstead ofEOF; the freed child's event stayed in the master's queue and the replacement worker's pipe was never registered in epoll, so it wedged forever inpipe_writeafter 64 KB of output (php-src GH-8517; on PHP >= 8.1.20 the symptom is lost logs instead). The spawn command now appends3>&- 4>&- 5>&- 6>&- 7>&- 8>&- 9>&-. - Limits:
/bin/shis dash on our images and only parses single-digit redirections, so descriptors >= 10 are still inherited; the listening socket and the FastCGI connection are usually there. This is the limited change agreed for the services that stay on their current PHP for now; the complete fix (proc_openwith a full descriptorspec) is tracked in the same ticket. Pair it with rollun-logger >= 6.2.9 / 7.8.2 / 8.0.2, which stops the writer from holding the dup in the first place. - No change for
PidKiller/WorkerManager:$!is still the job's own PID and the job's argv is unchanged. Verified with dash on PHP 7.2 and 8.0: closing a descriptor that is not open is not an error,OUTPUT_STREAMfile paths and/dev/nullbehave as before, and the test suites give the same results as the previous release.
6.11.4
- Background jobs no longer inherit the php-fpm worker's low-numbered descriptors (Trello py2Gb7O7). A worker holds
dup()s of the master's stdout/stderr catch-pipes on fds 3-9 (rollun-logger'sphp://stdoutwriter; fd 6/7/8 in production), andInterrupter\Process/ProcessByNamespawned jobs withshell_exec("php … 1>X 2>X & echo $!"), which redirects only 1 and 2. A job that kept such a dup alive past the worker's exit made the master readEAGAINinstead ofEOF; the freed child's event stayed in the master's queue and the replacement worker's pipe was never registered in epoll, so it wedged forever inpipe_writeafter 64 KB of output (php-src GH-8517; on PHP >= 8.1.20 the symptom is lost logs instead). The spawn command now appends3>&- 4>&- 5>&- 6>&- 7>&- 8>&- 9>&-. - Limits:
/bin/shis dash on our images and only parses single-digit redirections, so descriptors >= 10 are still inherited; the listening socket and the FastCGI connection are usually there. This is the limited change agreed for the services that stay on their current PHP for now; the complete fix (proc_openwith a full descriptorspec) is tracked in the same ticket. Pair it with rollun-logger >= 6.2.9 / 7.8.2 / 8.0.2, which stops the writer from holding the dup in the first place. - No change for
PidKiller/WorkerManager:$!is still the job's own PID and the job's argv is unchanged. Verified with dash on PHP 7.2 and 8.0: closing a descriptor that is not open is not an error,OUTPUT_STREAMfile paths and/dev/nullbehave as before, and the test suites give the same results as the previous release.
6.11.3
- Fixed a race in
Queues\Adapter\DbAdapter::getMessages()that could hand the same message to two consumers at once (Trello nIjO2cqy). Candidate ids were prefetched without a lock and then claimed withFOR UPDATE SKIP LOCKED, which only skips rows still held by an open transaction — a competing consumer that had already claimed and committed one of those ids got it delivered a second time, andreceive_countwas bumped twice. The availability conditions (time_in_flight,delayed_until,receive_count, priority) are now re-evaluated inside the locking read, which is also ordered byadded_atso the oldest candidates are taken first. Backport of the fix released in 8.2.1 and 7.6.1; this is the lineservice-catalog(rollun-callback 6.11.x) runs on. - Note for queues on
DbAdapter: the defaulttimeInflightis0, which makes a claimed message visible again after 1 s regardless of this fix. Set a meaningfultimeInflightif a message must not be redelivered while it is being processed. - No other changes since 6.11.2. Verified on PHP 7.2 and 7.4 against MySQL 8.0; the regression test fails on 6.11.2 and passes here.
8.2.1
- Fixed a race in
Queues\Adapter\DbAdapter::getMessages()that could hand the same message to two consumers at once (Trello nIjO2cqy). Candidate ids were prefetched without a lock and then claimed withFOR UPDATE SKIP LOCKED, which only skips rows still held by an open transaction — a competing consumer that had already claimed and committed one of those ids got it delivered a second time, andreceive_countwas bumped twice. The availability conditions (time_in_flight,delayed_until,receive_count, priority) are now re-evaluated inside the locking read, which is also ordered byadded_atso the oldest candidates are taken first. - Note for queues on
DbAdapter: the defaulttimeInflightis0, which makes a claimed message visible again after 1 s regardless of this fix. Set a meaningfultimeInflightif a message must not be redelivered while it is being processed. - Code brought in line with rector 2.6.6 (
??=rewrites) so the PHP 8.1 check passes again — no behaviour change.
7.6.1
- Fixed a race in
Queues\Adapter\DbAdapter::getMessages()that could hand the same message to two consumers at once (Trello nIjO2cqy). Candidate ids were prefetched without a lock and then claimed withFOR UPDATE SKIP LOCKED, which only skips rows still held by an open transaction — a competing consumer that had already claimed and committed one of those ids got it delivered a second time, andreceive_countwas bumped twice. The availability conditions (time_in_flight,delayed_until,receive_count, priority) are now re-evaluated inside the locking read, which is also ordered byadded_atso the oldest candidates are taken first. - Note for queues on
DbAdapter: the defaulttimeInflightis0, which makes a claimed message visible again after 1 s regardless of this fix. Set a meaningfultimeInflightif a message must not be redelivered while it is being processed. Ticker: fixed implicit float-to-int conversions (result keys andusleep()argument) that raise a deprecation on PHP 8.1.- Dependencies: dropped the unused
laminas/laminas-jsonandsymfony/event-dispatcher;laminas/laminas-stdlibmoved to dev dependencies (only the library's own dev config used it). - Housekeeping since 7.6.0: CI restored on the
7.xbranch, rector added and the code brought in line with rector 2.6.6, test namespace changed toRollun\Test\, test environment fixes.
8.2.0
- Widened the
rollun-com/rollun-loggerrequirement to^7.7.0 || ^8.0.0. 8.1.1 required^8.0.0, which consumers still on Logger 7 could not install — use this release instead of 8.1.1. MultiplexerAbstractFactory: a service name frominterruptersis now resolved through the container before theis_callable()check — a name matching a global PHP function silently became aClosureover that function.HttpAbstractFactoryfixed and deprecated — it builtHttpwith the wrong constructor arguments; declare such services under thecallbackkey and letHttpClientAbstractFactorybuild them.- Tests are green on PHP 8.0 again — the ones blocked by PHP bug GH-8995 are skipped instead of failing.
8.1.0
8.0.0
- Support php 8.1 version
- Refactored
rollun\callback\Callback\SerializedCallbackto supportopis/closurev4 and php8.1. The serialization
format has been updated. Deserialization of strings created with earlier versions of this library is not yet
supported. - Add return type hint for
rollun\callback\Callback\Ticker::_invoke - Replaced "mtdowling/cron-expression" (deprecated repo) with "dragonmantank/cron-expression" (new repo)