[Gross] Rotate stuck
Eino Tuominen
eino at utu.fi
Fri Sep 18 19:00:20 EEST 2009
Eino Tuominen wrote:
> Steve Wardle wrote:
>> There is nothing in the debug output where I'd expect the next rotate
>> to be.
>>
>> When it fails telnet to port 5522 gives: 2:Rotate stuck
>
> Hi,
>
> Can you send me the output of pstack when the thread hangs? Also, I
> recall there has been some minor things done with thread setup after
> 1.0.1 (I really have to push a new release out...) so you could try with
> an svn version.
[got pstack.grossd off list]
Hi,
pstack looks fine to me. This is how the thing should work:
The bloommgr thread manages the bloom filters. grossd follows the
traditional one writer, multiple readers design. After main() starts up
bloommgr and others it goes into a loop where it schedules the
maintenance tasks, rotation included. On intervals it sends an instant
message via the update queue (the message bypasses the update queue
delay) and upon receiving the message bloommgr then rotates the filters.
The output of pstack shows that main is in sleep() and bloommgr waits
for messages. When it's time to rotate, main() sends a message:
for (;;) {
if ((time(NULL) - *ctx->last_rotate) >
ctx->config.rotate_interval) {
/* time to rotate filters */
rotatecmd.mtype = ROTATE;
ret = instant_msg(ctx->update_q, &rotatecmd, 0, 0);
if (ret < 0)
gerror("rotate instant_msg");
}
...
And then bloommgr finds the message in the update queue:
case ROTATE:
logstr(GLOG_DEBUG, "received rotate command");
/* debug_print_ring_queue(ctx->filter, TRUE); */
create_thread(NULL, DETACH, &rotate, NULL);
break;
So, do you see the message in the log?
--
Eino Tuominen
More information about the Gross
mailing list