allen8807 / memcached

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

Internal error! Invalid slab class #243

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
run type:memcached -s /tmp/mod_python_cache_sock -u apache -t 40 -I 1.5M -m 
1024 -d -v 1 >> /var/log/memcache.log 2>> /var/log/memcache.log

OS:2.6.18-194.el5PAE #1 SMP Fri Apr 2 15:37:44 EDT 2010 i686 i686 i386 
GNU/Linux(fedora)
version:memcached-memcached-1.4.10

Original issue reported on code.google.com by hlnorthw...@gmail.com on 28 Dec 2011 at 2:42

GoogleCodeExporter commented 9 years ago
what exactly were you doing to cause this error? Just starting it, running 
tests, etc? Does it still happen if you cut -m to 512 or so? Or leave out -I?

-t 40 is also extremely high, as performance tends to degrade after ~6 threads, 
but that shouldn't cause a crash.

Original comment by dorma...@rydia.net on 29 Dec 2011 at 10:31

GoogleCodeExporter commented 9 years ago
It's happens after run one day.

Yeah,I have tested -m 512,use m's default value.

It's OK now after I degrade version to 1.4.7

I have seen the source code of 1.4.10 and 1.4.7,I founded 1.4.10 have a 
question in function "do_item_alloc"(file of items.c,line:88) 

Pieces code of fuction is :

107:if (search == NULL) {
108:        it = slabs_alloc(ntotal, id);
109    } else if (search->refcount == 0) {

132:if (it == NULL && (it = slabs_alloc(ntotal, id)) == NULL) {
133:        if (search->refcount == 0 &&
134:            (search->exptime == 0 || search->exptime > current_time)) {
If program run to line 133 what will be happend.crash!Because search is sure to 
NULL.

Original comment by hlnorthw...@gmail.com on 30 Dec 2011 at 8:54

GoogleCodeExporter commented 9 years ago
I've fixed that "search is NULL" bug in my working branch few weeks ago, so the 
next release will have it.

That bug should only happen in some rare cases where malloc is failing though. 
Is 1.4.9 stable for you as well? It never crashes even after days?

Original comment by dorma...@rydia.net on 30 Dec 2011 at 9:01

GoogleCodeExporter commented 9 years ago
Currently using version is 1.4.7

Yeah,It's running two days now.We will test it untill 2012/1/4.:)

Original comment by hlnorthw...@gmail.com on 30 Dec 2011 at 9:12

GoogleCodeExporter commented 9 years ago
Can you try http://memcached.googlecode.com/files/memcached-1.4.11_beta1.tar.gz 
and see if it fixes your error? (or -rc1 or -final whenever you read this).

Original comment by dorma...@rydia.net on 10 Jan 2012 at 6:00

GoogleCodeExporter commented 9 years ago
Pretty sure *this* was fixed in 1.4.11, so I'm closing. 1.4.11 has build bugs 
on some specific platforms, but it knows where its memory is!

Original comment by dorma...@rydia.net on 25 Jan 2012 at 8:17