minbbp / memagent

Automatically exported from code.google.com/p/memagent
0 stars 0 forks source link

For some keys ketama_hashi returns 0 #3

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. ketama.c:ketama_hashi returns 0 for some keys e.g. wp_:posts:84
2. This makes magent to crash if using ketama (in ketama.c:get_server)

What is the expected output? What do you see instead?

magent crashing from time to time with a segfault, when using ketama. This
makes it impossible to use magent with ketama.

What version of the product are you using? On what operating system?

 - Linux 2.6.28-11 
 - libevent 1.3
 - gcc 4.3.3

Please provide any additional information below.

I do not quite understand what ketama_hashi does and whether 0 is a valid
value. But as a work around I'm not searching for the server in
ketama.c:get_server (aprox line 431). Instead of while (1), I'm doing while
(h) .

I have attached my patch, but please use it at your own risk

Original issue reported on code.google.com by mohanj...@gmail.com on 1 May 2009 at 1:29

Attachments:

GoogleCodeExporter commented 8 years ago
I forgot to mention, I'm using memagent trunk.

Original comment by mohanj...@gmail.com on 1 May 2009 at 1:36

GoogleCodeExporter commented 8 years ago
patch applied to trunk

Original comment by shellc...@gmail.com on 22 Jun 2009 at 2:47