|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #60307 add_task(GEARMAN_INVALID_ARGUMENT) unique name longer then GEARMAN_UNIQUE_MAX_S
Submitted: 2011-11-15 15:46 UTC Modified: 2012-08-06 04:50 UTC
From: Assigned: hradtke (profile)
Status: Closed Package: gearman (PECL)
PHP Version: 5.3.8 OS: CentOS 5.7
Private report: No CVE-ID: None
View Add Comment Developer Edit
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
Solve the problem:
37 + 33 = ?
Subscribe to this entry?

 [2011-11-15 15:46 UTC]
Ok, updated everything to .25 and re-built all packages.

The new feature of GEARMAN_UNIQUE_MAX_SIZE is causing problems.

GearmanClient::doBackground(): add_task(GEARMAN_INVALID_ARGUMENT)
unique name longer then GEARMAN_UNIQUE_MAX_SIZE -> libgearman/
131 in /blah/blah.php

We use the same ID for the message and the uniqueId and have never had
any problems in the past.


$client->doBackground('jobs_publish', 42789639, 42789639);

At first I thought maybe its just interpreting the uniqueId as an int
so I explicitly cast it as a string first and still failed.

$client->doBackground('rtu_careers_jobs_publish', 42789639,

Let me know if I can provide any additional information.

CentOS 5.7
PHP 5.3.6
PECL Gearman 0.8
Gearmand 0.25

Ok, we figured out a work-around already.

Passing in a pure integer as uniqueId does not work. Even when casting
as a string.

However, we simply changed the uniqueId to something like this:

$uniqueId =
$client->doBackground('jobs_publish', 42789639, $uniqueId);

And everything works!!!


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2011-11-15 15:47 UTC]
-Status: Open +Status: Assigned -Assigned To: +Assigned To: hradtke
 [2012-02-02 06:54 UTC]
-Status: Assigned +Status: Feedback
 [2012-02-02 06:54 UTC]
I am unable to reproduce this bug using pecl/gearman 0.8, libgearman
0.25 with the provided test case. The pecl/gearman code explicitly
casts the integer to a string and works fine. I even stepped through
the libgearman code to verify everything was working in order. Are you
still seeing this bug?
 [2012-08-06 04:50 UTC]
-Status: Feedback +Status: Closed
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Mon Apr 15 02:01:28 2024 UTC