Server stucks in case of problems with worker

Bug #1237584 reported by Alex Orlenko
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Gearman
New
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

Tags: 0000
Revision history for this message
Brian Aker (brianaker) wrote : Re: [Bug 1237584] [NEW] Server stucks in case of problems with worker

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

Revision history for this message
Alex Orlenko (alex-orlenko) wrote :

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

Revision history for this message
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. :-)

Revision history for this message
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

Revision history for this message
Brian Aker (brianaker) wrote : Re: [Bug 1237584] Re: Server stucks in case of problems with worker

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

Revision history for this message
Alex Orlenko (alex-orlenko) wrote :

We used 3600

Revision history for this message
skysbird (skysbird) wrote :

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

Revision history for this message
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.

Revision history for this message
Jesse Donat (donatj) wrote :

Same exact problem in 1.1.8

Revision history for this message
skysbird (skysbird) wrote :

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

tags: added: 0000
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.