zsswebdesign / memcached

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

lru_crawler - daemon hangs #388

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Start memcached with lru_crawler enabled:
>memcached -l 127.0.0.1 -p 65000 -o lru_crawler -d -u nobody
2. Store several keys with small expire time and wait when expiration time 
leaved.
3. Start craler with "lru_crawler crawl all"
4. No items crawled, but there is expired unfetched items in stats command.
4. Try to disable crawler - there is error.
5. Try to restart crawler - daemon hangs.

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

4. Show stats - you see than "STAT lru_crawler_running 1" but "STAT 
crawler_reclaimed 0" and there is expired items in cache.
5. Telnet to daemon and try to stop crawler:
>lru_crawler disable
>ERROR failed to stop lru crawler thread
6. Try to start crawler:
>lru_crawler crawl all
>OK
> add a 0 1 1
1

...
daemon hangs

What version of the product are you using? On what operating system?
Memcached 1.4.21
CentOS 6.5

Please provide any additional information below.

Memcached daemon use 100% cpu per thread. Strace output:

epoll_wait(3, {}, 32, 108)              = 0
epoll_wait(3, {}, 32, 1000)             = 0
epoll_wait(3, {}, 32, 1000)             = 0
...
epoll_wait(3, {}, 32, 1000)             = 0
...

Original issue reported on code.google.com by Harlopri...@gmail.com on 11 Dec 2014 at 9:55

GoogleCodeExporter commented 9 years ago
Fix + test pushed for the next release, thanks!

In the meantime, if you start the crawler thread from the protocol it'll work.

Original comment by dorma...@rydia.net on 15 Dec 2014 at 7:01