Gearman Server and Client Libraries

Server stucks in case of problems with worker

Reported by Alex Orlenko on 2013-10-09
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Gearman
Undecided
Unassigned

Bug Description

Hello
We are trying to use Gearman server implemented on C (v 1.0.6)
Unfortunately it sticks in case of problems on client side.

If worker is failed by some reason (for example kill -9 ) the server will stick.
There are not any errors but any attempts to add new task or even ask status (gearadmin --status )
will not get response.
Gearman write to log "Accepted connection from 127.0.0.1:35327"
but don't return any response.

I'm not sure that it is related to this problem but sometime
"gearadmin --status" shows wrong digits
For example :
GearmanTask 4294967295 4294967295 40

Could someone help us to resolve problem or suggest workaround?
Thanks

Have you tried the latest version?

> On Oct 9, 2013, at 11:53, Alex Orlenko <email address hidden> wrote:
>
> Public bug reported:
>
> Hello
> We are trying to use Gearman server implemented on C (v 1.0.6)
> Unfortunately it sticks in case of problems on client side.
>
> If worker is failed by some reason (for example kill -9 ) the server will stick.
> There are not any errors but any attempts to add new task or even ask status (gearadmin --status )
> will not get response.
> Gearman write to log "Accepted connection from 127.0.0.1:35327"
> but don't return any response.
>
> I'm not sure that it is related to this problem but sometime
> "gearadmin --status" shows wrong digits
> For example :
> GearmanTask 4294967295 4294967295 40
>
> Could someone help us to resolve problem or suggest workaround?
> Thanks
>
> ** Affects: gearmand
> Importance: Undecided
> Status: New
>
> --
> You received this bug notification because you are subscribed to
> Gearman.
> https://bugs.launchpad.net/bugs/1237584
>
> Title:
> Server stucks in case of problems with worker
>
> Status in Gearman Server and Client Libraries:
> New
>
> Bug description:
> Hello
> We are trying to use Gearman server implemented on C (v 1.0.6)
> Unfortunately it sticks in case of problems on client side.
>
> If worker is failed by some reason (for example kill -9 ) the server will stick.
> There are not any errors but any attempts to add new task or even ask status (gearadmin --status )
> will not get response.
> Gearman write to log "Accepted connection from 127.0.0.1:35327"
> but don't return any response.
>
> I'm not sure that it is related to this problem but sometime
> "gearadmin --status" shows wrong digits
> For example :
> GearmanTask 4294967295 4294967295 40
>
> Could someone help us to resolve problem or suggest workaround?
> Thanks
>
> To manage notifications about this bug go to:
> https://bugs.launchpad.net/gearmand/+bug/1237584/+subscriptions

Alex Orlenko (alex-orlenko) wrote :

Yes, we tried 1.1.11 and there is the same problem :-(

Alex Orlenko (alex-orlenko) wrote :

Hello
We have found that this problem is appeared when we use GearmanManager
https://github.com/brianlmoon/GearmanManager/

All details are here
https://github.com/brianlmoon/GearmanManager/issues/77

I don't know exactly where the problem is but it would be better if Gearman server didn't stick in any case. :-)

Alex Orlenko (alex-orlenko) wrote :

Hello
We have found the reason of this problem.
It is appeared when we set timeouts in config.ini
this timeout is used in worker->addFunction

When we remove this parameter the problem was solved.
So I think it is the problem in Gearman or pecl but not in GearmanManager

What value did you use?

> On Oct 11, 2013, at 9:10, Alex Orlenko <email address hidden> wrote:
>
> Hello
> We have found the reason of this problem.
> It is appeared when we set timeouts in config.ini
> this timeout is used in worker->addFunction
>
> When we remove this parameter the problem was solved.
> So I think it is the problem in Gearman or pecl but not in GearmanManager
>
> --
> You received this bug notification because you are subscribed to
> Gearman.
> https://bugs.launchpad.net/bugs/1237584
>
> Title:
> Server stucks in case of problems with worker
>
> Status in Gearman Server and Client Libraries:
> New
>
> Bug description:
> Hello
> We are trying to use Gearman server implemented on C (v 1.0.6)
> Unfortunately it sticks in case of problems on client side.
>
> If worker is failed by some reason (for example kill -9 ) the server will stick.
> There are not any errors but any attempts to add new task or even ask status (gearadmin --status )
> will not get response.
> Gearman write to log "Accepted connection from 127.0.0.1:35327"
> but don't return any response.
>
> I'm not sure that it is related to this problem but sometime
> "gearadmin --status" shows wrong digits
> For example :
> GearmanTask 4294967295 4294967295 40
>
> Could someone help us to resolve problem or suggest workaround?
> Thanks
>
> To manage notifications about this bug go to:
> https://bugs.launchpad.net/gearmand/+bug/1237584/+subscriptions

Alex Orlenko (alex-orlenko) wrote :

We used 3600

skysbird (skysbird) wrote :

i found the same problem in my server. version is 1.1.8

skysbird (skysbird) wrote :

and we found that , we the stuck problem happened, pstack show 6 threads of gearmand, but in the normal status there should be 7 threads of gearmand.

Jesse Donat (donatj) wrote :

Same exact problem in 1.1.8

skysbird (skysbird) wrote :

I'm definitely sure that is the problem about timeout event handler.

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

Other bug subscribers