gearman_client_run_tasks() doesn't return in concurrent task interface

Bug #458912 reported by Dennis Schön
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Gearman
Fix Released
High
Eric Day

Bug Description

There seems to be a strange "off-by-one" error when using the concurrent task interface with multiple gearman servers that causes gearman_client_run_tasks() to hang. It seems like the last job response isn't received.

With the attached patch I was able to reproduce the behavior. Here's the test setup:

start two gearmand (port 4730 and 4731)
start one examples/reverse_worker

start ./examples/reverse_client_cb blubb

output:

[...]
9, Completed: H:dennis.local:46073 bbulb
8, Completed: H:dennis.local:46074 bbulb
7, Completed: H:dennis.local:46075 bbulb
6, Completed: H:dennis.local:46076 bbulb
5, Completed: H:dennis.local:46077 bbulb
4, Completed: H:dennis.local:46078 bbulb
3, Completed: H:dennis.local:46079 bbulb
2, Completed: H:dennis.local:46080 bbulb

<-- here it just hangs. The first number is a simple counter of all tasks created.

Revision history for this message
Dennis Schön (roccoblues) wrote :
Eric Day (eday)
Changed in gearmand:
milestone: none → 0.11
assignee: nobody → Eric Day (eday)
importance: Undecided → High
status: New → Fix Committed
Eric Day (eday)
Changed in gearmand:
status: Fix Committed → Fix Released
Revision history for this message
RdeWilde (robert-de-wilde) wrote :

I suffer this problem too. It breaks my script. How can I fix it? I am using PHP PECL ext 0.6.0 with libgearman 0.11. I installed using yum on CentOS 5.4.

This is the error it gives:
php: client.c:773: gearman_client_run_tasks: Assertion `client->task != ((void *)0)`failed.

http://pastie.org/private/jzm9ox4kogpllz9onl7ma #110 seems to be the main cause, although the real cause will be in client.c?

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.