Skip to content

Releases: rollun-lc/rollun-callback

8.2.2

Choose a tag to compare

@vadymk-rollun vadymk-rollun released this 14 Sep 11:19
  • 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's php://stdout writer; fd 6/7/8 in production), and Interrupter\Process / ProcessByName spawned jobs with shell_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 read EAGAIN instead of EOF; 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 in pipe_write after 64 KB of output (php-src GH-8517; on PHP >= 8.1.20 the symptom is lost logs instead). The spawn command now appends 3>&- 4>&- 5>&- 6>&- 7>&- 8>&- 9>&-.
  • Limits: /bin/sh is 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_open with 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_STREAM file paths and /dev/null behave as before, and the test suites give the same results as the previous release.

7.6.2

Choose a tag to compare

@vadymk-rollun vadymk-rollun released this 14 Sep 11:19
  • 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's php://stdout writer; fd 6/7/8 in production), and Interrupter\Process / ProcessByName spawned jobs with shell_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 read EAGAIN instead of EOF; 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 in pipe_write after 64 KB of output (php-src GH-8517; on PHP >= 8.1.20 the symptom is lost logs instead). The spawn command now appends 3>&- 4>&- 5>&- 6>&- 7>&- 8>&- 9>&-.
  • Limits: /bin/sh is 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_open with 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_STREAM file paths and /dev/null behave as before, and the test suites give the same results as the previous release.

6.11.4

Choose a tag to compare

@vadymk-rollun vadymk-rollun released this 14 Sep 11:19
  • 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's php://stdout writer; fd 6/7/8 in production), and Interrupter\Process / ProcessByName spawned jobs with shell_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 read EAGAIN instead of EOF; 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 in pipe_write after 64 KB of output (php-src GH-8517; on PHP >= 8.1.20 the symptom is lost logs instead). The spawn command now appends 3>&- 4>&- 5>&- 6>&- 7>&- 8>&- 9>&-.
  • Limits: /bin/sh is 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_open with 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_STREAM file paths and /dev/null behave as before, and the test suites give the same results as the previous release.

6.11.3

Choose a tag to compare

@vadymk-rollun vadymk-rollun released this 10 Sep 17:34
  • 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 with FOR 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, and receive_count was 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 by added_at so the oldest candidates are taken first. Backport of the fix released in 8.2.1 and 7.6.1; this is the line service-catalog (rollun-callback 6.11.x) runs on.
  • Note for queues on DbAdapter: the default timeInflight is 0, which makes a claimed message visible again after 1 s regardless of this fix. Set a meaningful timeInflight if 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

Choose a tag to compare

@vadymk-rollun vadymk-rollun released this 09 Sep 12:42
  • 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 with FOR 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, and receive_count was 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 by added_at so the oldest candidates are taken first.
  • Note for queues on DbAdapter: the default timeInflight is 0, which makes a claimed message visible again after 1 s regardless of this fix. Set a meaningful timeInflight if 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

Choose a tag to compare

@vadymk-rollun vadymk-rollun released this 09 Sep 12:42
  • 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 with FOR 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, and receive_count was 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 by added_at so the oldest candidates are taken first.
  • Note for queues on DbAdapter: the default timeInflight is 0, which makes a claimed message visible again after 1 s regardless of this fix. Set a meaningful timeInflight if a message must not be redelivered while it is being processed.
  • Ticker: fixed implicit float-to-int conversions (result keys and usleep() argument) that raise a deprecation on PHP 8.1.
  • Dependencies: dropped the unused laminas/laminas-json and symfony/event-dispatcher; laminas/laminas-stdlib moved to dev dependencies (only the library's own dev config used it).
  • Housekeeping since 7.6.0: CI restored on the 7.x branch, rector added and the code brought in line with rector 2.6.6, test namespace changed to Rollun\Test\, test environment fixes.

8.2.0

Choose a tag to compare

@vadymk-rollun vadymk-rollun released this 18 Aug 11:08
  • Widened the rollun-com/rollun-logger requirement 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 from interrupters is now resolved through the container before the is_callable() check — a name matching a global PHP function silently became a Closure over that function.
  • HttpAbstractFactory fixed and deprecated — it built Http with the wrong constructor arguments; declare such services under the callback key and let HttpClientAbstractFactory build 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

Choose a tag to compare

@vadymk-rollun vadymk-rollun released this 26 Aug 16:21
e73f0bb

Guzzle v7 dependencies

8.0.0

Choose a tag to compare

@misha-rollun misha-rollun released this 28 May 11:36
  • Support php 8.1 version
  • Refactored rollun\callback\Callback\SerializedCallback to support opis/closure v4 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)

6.11.2

Choose a tag to compare

@misha-rollun misha-rollun released this 07 Jan 08:20

Verry little change in documentation