|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #59040 runTasks() fails to switch to second server, locks up.
Submitted: 2010-01-22 15:03 UTC Modified: 2017-01-10 08:21 UTC
Avg. Score:4.2 ± 0.8
Reproduced:4 of 4 (100.0%)
Same Version:1 (25.0%)
Same OS:1 (25.0%)
From: peter dot urda at gmail dot com Assigned:
Status: Suspended Package: gearman (PECL)
PHP Version: 5.2.10 OS: Ubuntu Server 9.10 x86
Private report: No CVE-ID: None
Have you experienced this issue?
Rate the importance of this bug to you:

 [2010-01-22 15:03 UTC] peter dot urda at gmail dot com

// -------------------------------------------------------------------
// START Basic Client Creatio

// Create Client
$client = new GearmanClient();

// END Basic Client Creation
// -------------------------------------------------------------------

// Start Tasks
$client->addTaskBackground("reverse", "ereh saw adrU");
$client->addTaskBackground("reverse", "!dlroW olleH");
$client->addTaskBackground("reverse", "ENO-F");
$client->addTaskBackground("reverse", "Hello out world!");

$client->addTaskHighBackground("reverse", "!!!YTIROIRP HGIH SI SIHT");
// above line 3 more times...

$client->addTaskLowBackground("reverse", "!!!ytiroirp wol si siht");
// above line 3 more times...

// code removed...
echo "Start Tasks!\n";
// AT this point, if server 10.58 is DOWN,
// the script Locks up, and sends zero tasks to be Q'd in Server 2.
// Sometimes one random job makes it to the server, but that is it.
?> // end of script/program

Reproduce code:
--------------- (source  code) (strace for failure, Server 10.58 is down, Server 10.141 is up but never gets the job) (strace for Success, Server 10.58 is up, Server 10.141 is up. 10.58 gets all jobs, server 10.141 gets zero, which is correctly done)

Expected result:
Assuming Server #1 (10.58) is down, runTasks() should fire, send all the tasks to server #2, and finish running.

Actual result:
Script stops and hangs at runTasks(), and never finished. Job server #2 gets zero jobs.


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2010-01-22 15:36 UTC] peter dot urda at gmail dot com
unseen SQL issue, investigation our end for now.
 [2010-01-25 12:28 UTC] peter dot urda at gmail dot com
More source code, more notes here:

jleudke confirmed this as a bug on IRC  on 2010-01-25
 [2010-01-25 12:30 UTC] peter dot urda at gmail dot com
This also occurs if one uses addServers() for all situations...

* Adding by using a string which is built from a MySQL query.
* Adding by using variables imported from another PHP file
* Adding by manually typing out the IP's and Ports for servers.
 [2010-01-25 12:32 UTC] peter dot urda at gmail dot com
Google Groups Link appears to fail, here is a new shorter link:
 [2017-01-10 08:21 UTC]
-Status: Assigned +Status: Suspended -Assigned To: hradtke +Assigned To:
 [2017-01-10 08:21 UTC]
The gearman extension have not had much activity in the past few years, so I'm taking the safe bet that this is no longer under active development (as I don't consider the typo fixes on the github repo an active development), besides that it also targets unsupported PHP versions. Please unsuspend this report in case it begins to blossom with life once more
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Apr 12 14:01:34 2024 UTC