|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2012-01-16 01:55 UTC] datasage at theworldisgrey dot com
Description: ------------ Using non-blocking mode does help manage multiple workers and be able to use signals to gracefully handle shutdown of those workers. However enabling non blocking mode results in the following assertion: libgearman/universal.cc:519: bool gearman_request_option(gearman_universal_st&, gearman_string_t&): Assertion `con->recv_state == GEARMAN_CON_RECV_UNIVERSAL_NONE' failed. Gearman php module 1.0.1 is installed with libgearman 0.27. I also tried 0.26, but that has another assertion which seems to be fixed in 0.27. This could be an upstream issue with libgearman instead of the php extension. I'm going to file a report there as well. Test script: --------------- I am using this: https://github.com/brianlmoon/GearmanManager Disabling this line: $thisWorker->addOptions(GEARMAN_WORKER_NON_BLOCKING); fixes the issue, although its preferable to have that enabled. Expected result: ---------------- No Error Actual result: -------------- libgearman/universal.cc:519: bool gearman_request_option(gearman_universal_st&, gearman_string_t&): Assertion `con->recv_state == GEARMAN_CON_RECV_UNIVERSAL_NONE' failed. PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sun Dec 14 21:00:01 2025 UTC |
Same problem here on: - PHP 5.3.14-1~dotdeb.0 with Suhosin-Patch (cli) (built: Jun 21 2012 00:51:58) - gearman-extension 1.0.2 - libgearman 0.33-2 Test script: --------------- <?php $worker= new GearmanWorker(); $worker->addOptions(GEARMAN_WORKER_NON_BLOCKING); $worker->addServer(); $worker->addFunction('reverse', 'reverse_fn'); $worker->work(); printf("Return Code: %d\n", $worker->returnCode()); $worker->work(); function reverse_fn($job) { return strrev($job->workload()); } Expected result: ---------------- No Error Actual result: -------------- Return Code: 1 php: libgearman/universal.cc:616: bool gearman_request_option(gearman_universal_st&, gearman_string_t&): Assertion `con->recv_state == GEARMAN_CON_RECV_UNIVERSAL_NONE' failed. Aborted