gearman_worker_free segfaults in gearman_packet_free
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Gearman |
New
|
Undecided
|
Unassigned |
Bug Description
When a worker is run against a server and times out enough times, freeing that worker will then cause a segfault in gearman_
This is with Gearman 1.0.6.
Program received signal SIGSEGV, Segmentation fault.
checkhdr (hdr=hdr@
93 mcheck.c: No such file or directory.
(gdb) bt
#0 checkhdr (hdr=hdr@
#1 0x00007ffff7884ec9 in checkhdr (hdr=0x95959595
#2 freehook (ptr=0x95959595
#3 0x00007ffff7bbec8b in gearman_packet_free (packet=0x609418) at libgearman/
#4 0x00007ffff7bb93c6 in gearman_
#5 0x00007ffff7bb9354 in gearman_
#6 0x00007ffff7bb9118 in gearman_
#7 0x00007ffff7bc28f2 in gearman_
#8 0x00007ffff7bc2769 in gearman_
#9 0x00007ffff7bc4f87 in gearman_worker_free (worker=0x601040) at libgearman/
#10 0x0000000000400946 in main ()
This can be replicated with the following C. The bug does not appear unless work() is called in this way at least three times.
#include <libgearman-
void* cb(gearman_job_st* job, void* ctx, size_t* foo, gearman_return_t* ret){
return NULL;
}
int main(){
gearman_
gearman_
w,
"test",
10,
cb,
NULL
);
gearman_
gearman_
gearman_
gearman_
gearman_
gearman_
gearman_
}
description: | updated |
I have tested that this bug does not exist in the latest version(1.1.12) .
So I suggest the latest version to you.