github gearman/gearmand 2.1.0
2.1.0: August 2026 Feature and Significant Bug Fixes Release

4 hours ago

gearmand 2.1.0 is a feature and bug fix release that brings significant improvements to thread safety and connection lifecycle reliability, improved OpenSSL error diagnostics, a new --ping option for server health checks, and fixes and improvements to persistent storage plugins (notably, Redis and MySQL).

While this isn't as big of a release as 2.0.0, this is still a very important release, and upgrading is highly recommended, as this release should greatly improve reliability of the server in a long-running environment.

Notable Behavior Change

  • --job-retries=0 now means zero retries (PR #500 by @p-alik) – --job-retries=0 previously meant to retry jobs infinitely. This was very non-intuitive, obviously. It now means zero retries (drop job after the first failure). The default value is now -1 (for unlimited retries), preserving the previous default behavior when --job-retries is omitted.

Major New Features / Improvements

  • Added --ping option to gearman client (PR #508 by @esabol) – Introduces --ping command-line option for server connectivity and health check testing (PR #508 by @esabol with revisions by @p-alik, addresses issue #315).
  • Refuse --ssl startup on non-SSL binaries (PR #499 by @p-alik) – Passing --ssl to a gearmand binary compiled without SSL support now logs a fatal error and aborts startup instead of silently falling back to unencrypted connections (PR #499 by @p-alik, fixes issue #207).
  • Transparent Redis reconnection on connection loss (PR #489 by @p-alik) – The Redis persistent storage plugin will transparently reconnect to the Redis queue backend (with rate-limiting and re-authentication) if the connection is dropped (PR #489 by @p-alik, fixes issue #45).
  • Non-blocking Redis queue replay using SCAN (PR #487 by @p-alik) – Replaced the blocking KEYS command with cursor-based SCAN during queue replay on startup (PR #487 by @p-alik, fixes issue #59).
  • Redis storage support for hyphenated function names (PR #497 by @p-alik) – Function name and unique ID are now stored as dedicated hash fields in Redis (HMSET), preventing function names containing hyphens from being misparsed during replay (PR #497 by @p-alik, fixes issue #159).

Notable Bug Fixes

  • Multiple data race issues resolved when using multiple threads (PRs #482, #493, #494, #495, #496, and #501 by @p-alik) – Resolved TSAN-identified data races across connection lifecycle code (fixes issue #460). Made is_dead, io_list, proc_list, proc_removed, to_be_freed_list, dcon_add_count, and con->ret atomic, moved pre-checks inside critical sections, and ensured consistent locking in gearmand_con_create().
  • Fixed OpenSSL error string decoding by querying ERR_get_error() instead of raw SSL_get_error() enums, eliminating misleading error messages like "DH lib" (PR #484 by @p-alik, fixes issue #28).
  • Fixed double-free and object reuse hazard in gearmand_con_free() by clearing dcon->server_con on _con_add() failure (PR #485 by @p-alik, fixes issue #29).
  • Bounded MySQL queue retry on CR_SERVER_LOST to a single attempt, preventing infinite loops and server hangs when processing oversized packets (PR #498 by @p-alik, fixes issue #126).
  • Prevented process abort() on recoverable SSL initialization errors in ctx_ssl(), returning NULL and propagating GEARMAN_INVALID_ARGUMENT cleanly (PR #504 by @p-alik, fixes issue #503).
  • Reported explicit error when an SSL connection is requested using a gearman client compiled without SSL support (PR #508 by @esabol).

Build / CI / Maintenance

  • Improve detection of modern C++ standards and prioritize the usage of newer standards when building, e.g. -std=c++14 (PR #507 by @esabol). Homebrew recipe updaters, please take note.
  • Cleaned up unused byte-order code by removing libgearman/byteorder.{cc,h} and the htonll and endian.h configure checks (PR #508 by @esabol with input from @p-alik). Homebrew recipe updaters, please take note.
  • Made libhostile and YATL random seeds overridable via HOSTILE_SEED and YATL_RANDOM_SEED environment variables, ensuring seeds are always logged for test reproducibility (PR #483 by @p-alik, fixes issue #24).
  • Added explicit SSL connectivity test t/ssl to make test (PR #486 by @p-alik, fixes issue #56).
  • The path to the Redis server can now be specified with --with-redis-server=[PATH] (PR #491 by @p-alik).
  • Enhanced Redis queue test coverage by spawning a real redis-server process in t/redis and adding a Redis build job to GitHub Actions CI (PR #491 by @p-alik, fixes issue #490).
  • Updated Dependabot configuration to ignore minor and patchlevel dependency version updates (PR #492 by @esabol).
  • Fixed GCC 4.4 build failure caused by variable-length array initialization of argvlen in Redis queue.cc (PR #497 by @p-alik, fixes issue #113).
  • Added MySQL server startup support to libtest and enabled the t/mysql test suite with regression testing (PR #498 by @p-alik).
  • Fixed Sphinx formatting warnings in ssl.rst and index.rst (@esabol).
  • Fixed AX_PROG_SPHINX_BUILD autoconf m4 macro detection logic and temporary file handling (PR #509 by @esabol).

Contributors

Huge thanks to everyone who contributed to this release, notably:

  • Alexei Pastuchov (@p-alik) -- comprehensive thread safety and connection lifecycle fixes (issue #460), improvements and fixes to multiple persistent storage plugins, OpenSSL error decoding and SSL error handling, test suite enhancements, and various other bug fixes
  • Ed Sabol (@esabol) -- client --ping health check option (PR #508), modern C++ standard detection, autoconf m4 macro fixes, build cleanup, documentation improvements, and Dependabot updates

Full Changelog: 2.0.0...2.1.0

Don't miss a new gearmand release

NewReleases is sending notifications on new releases.