memcache deamon goes into endless loop

Per Wigren per.wigren at gmail.com
Thu Feb 17 08:07:00 PST 2005


I had the same problem on Sarge (using the PHP client) and I solved it 
by recompiling memcached with the latest version of libevent.

// Per

2005-02-17 kl. 16.48 skrev Alexander Kjall:

>
> I have installed the 1.1.11 version of memcached on an debian/sarge 
> box.
> I'm currently expericing some problems, I access it from java with the 
> 1.2
> version of the client.
>
> And I do something analog to this in the java code:
> {
> String[] serverlist = { "quismo.com:11211" };
>
> SockIOPool pool = SockIOPool.getInstance();
> pool.setServers(serverlist);
> pool.initialize();
>
> MemCachedClient cache = new MemCachedClient();
> String key = "r" + Integer.toString(uid) + "," + Integer.toString(iid);
> byte[] inter = (byte[])cache.get(key);
>
> if(inter != null)
>     noguess = NativeHandler.toInt(inter);
> }
> and the deamon refuses to answer when I do that. If i strace the
> memcached-process it looks like this when my program tries to get(..) 
> from
> it.
>
> 1: poll([{fd=3, events=POLLIN}, {fd=5, events=POLLIN}, {fd=6, 
> events=POLLIN}, {fd=7, events=POLLIN}, {fd=8, events=POLLIN}], 5, 
> 4999) = 0
> 2: gettimeofday({1108485756, 536818}, NULL) = 0
> 3: gettimeofday({1108485756, 537430}, NULL) = 0
> 4: time(NULL)                              = 1108485756
> 5: gettimeofday({1108485756, 538562}, NULL) = 0
> 6: gettimeofday({1108485756, 539127}, NULL) = 0
> 7: poll([{fd=3, events=POLLIN}, {fd=5, events=POLLIN}, {fd=6,
> 8: events=POLLIN}, {fd=7, events=POLLIN, revents=POLLIN}, {fd=8, 
> events=POLLIN}], 5, 4999) = 1
> 9: gettimeofday({1108485759, 940935}, NULL) = 0
> 10:read(7, 0x82, 2048)                     = -1 EFAULT (Bad address)
> 11:gettimeofday({1108485759, 942228}, NULL) = 0
> 12:gettimeofday({1108485759, 942796}, NULL) = 0
> 13:poll([{fd=3, events=POLLIN}, {fd=5, events=POLLIN}, {fd=6, 
> events=POLLIN}, {fd=8, events=POLLIN}, {fd=7, events=POLLIN, 
> revents=POLLIN}], 5, 1595) = 1
> 14:read(6, 0x82, 2048)                     = -1 EFAULT (Bad address)
> 15:read(8, 0x82, 2048)                     = -1 EFAULT (Bad address)
> 16:read(7, 0x82, 2048)                     = -1 EFAULT (Bad address)
> 17:gettimeofday({1108485759, 945325}, NULL) = 0
> 18:gettimeofday({1108485759, 945918}, NULL) = 0
>
> and then it loops line 13 to 18 endlessly.
>
> I have tried googling for the issue but I can't find anything.
>
>



More information about the memcached mailing list