If you set state to GEARMAN_WORKER_STATE_GRAB_JOB_RECV but you remove the job do to failure then if the loop returns you have no job and the assert that protects from that will assert().
I've got a test case that will now trigger the recv failure, but I don't have the bit that will cause the lockup to occur.
If the worker is seeing a recv() failure, it shouldn't be resending the PRE_SLEEP without reconnecting first (or exiting based on configuration).
So the above solution doesn't work.
If you set state to GEARMAN_ WORKER_ STATE_GRAB_ JOB_RECV but you remove the job do to failure then if the loop returns you have no job and the assert that protects from that will assert().
I've got a test case that will now trigger the recv failure, but I don't have the bit that will cause the lockup to occur.
If the worker is seeing a recv() failure, it shouldn't be resending the PRE_SLEEP without reconnecting first (or exiting based on configuration).