Re: Issue 260 in memcached: memcached big bug

2013-03-11 Thread memcached


Comment #23 on issue 260 by edwardqu...@gmail.com: memcached big bug
http://code.google.com/p/memcached/issues/detail?id=260

(gdb) c
Continuing.

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0xb6cc5b40 (LWP 11734)]
do_slabs_alloc (id=1, size=size@entry=73) at slabs.c:241
241 p->slots = it->next;


--
You received this message because this project is configured to send all  
issue notifications to this address.

You may adjust your notification preferences at:
https://code.google.com/hosting/settings

--

--- 
You received this message because you are subscribed to the Google Groups "memcached" group.

To unsubscribe from this group and stop receiving emails from it, send an email 
to memcached+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




Re: Issue 260 in memcached: memcached big bug

2013-03-11 Thread memcached


Comment #22 on issue 260 by dorma...@rydia.net: memcached big bug
http://code.google.com/p/memcached/issues/detail?id=260

what was the original error for that last backtrace?

--
You received this message because this project is configured to send all  
issue notifications to this address.

You may adjust your notification preferences at:
https://code.google.com/hosting/settings

--

--- 
You received this message because you are subscribed to the Google Groups "memcached" group.

To unsubscribe from this group and stop receiving emails from it, send an email 
to memcached+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




Re: Issue 260 in memcached: memcached big bug

2013-03-11 Thread memcached


Comment #21 on issue 260 by edwardqu...@gmail.com: memcached big bug
http://code.google.com/p/memcached/issues/detail?id=260

It happened again sooner than I expected. I'll see if I can get another one
for you.

(gdb) bt
#0  do_slabs_alloc (id=1, size=size@entry=73) at slabs.c:241
#1  slabs_alloc (size=size@entry=73, id=id@entry=1) at slabs.c:404
#2  0x08056269 in do_item_alloc (key=key@entry=0x86c5384
"my_wiki:valid-tags", nkey=nkey@entry=18, flags=flags@entry=1,
exptime=exptime@entry=38234,
nbytes=nbytes@entry=8, cur_hv=cur_hv@entry=0) at items.c:150
#3  0x080583d8 in item_alloc (key=key@entry=0x86c5384 "my_wiki:valid-tags",
nkey=nkey@entry=18, flags=1, exptime=38234, nbytes=nbytes@entry=8)
at thread.c:486
#4  0x0804d808 in process_update_command (c=c@entry=0x86bcba0,
tokens=tokens@entry=0xb6cc5140, ntokens=ntokens@entry=6, comm=2,
handle_cas=handle_cas@entry=false) at memcached.c:2917
#5  0x0804fc08 in process_command (c=c@entry=0x86bcba0, command=) at memcached.c:3258
#6  0x08050f23 in try_read_command (c=0x86bcba0) at memcached.c:3504
#7  drive_machine (c=0x86bcba0) at memcached.c:3824
#8  event_handler (fd=30, which=2, arg=0x86bcba0) at memcached.c:4065
#9  0xb76fd3da in event_process_active_single_queue (activeq=, base=) at event.c:1340
#10 event_process_active (base=) at event.c:1407
#11 event_base_loop (base=0x8694598, flags=flags@entry=0) at event.c:1604
#12 0x08057cdf in worker_libevent (arg=0x868a73c) at thread.c:384
#13 0xb76d3aff in start_thread (arg=0xb6cc5b40) at pthread_create.c:308
#14 0xb760c09e in clone () at ../sysdeps/unix/sysv/linux/i386/clone.S:132
(gdb) generate-core-file
Saved corefile core.11732

--
You received this message because this project is configured to send all  
issue notifications to this address.

You may adjust your notification preferences at:
https://code.google.com/hosting/settings

--

--- 
You received this message because you are subscribed to the Google Groups "memcached" group.

To unsubscribe from this group and stop receiving emails from it, send an email 
to memcached+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




Re: Issue 260 in memcached: memcached big bug

2013-03-11 Thread memcached


Comment #20 on issue 260 by edwardqu...@gmail.com: memcached big bug
http://code.google.com/p/memcached/issues/detail?id=260

This was the first one I did, so I'll check again and get back to you on
that tomorrow (probably).


Sure. I've copied this info to http://linuxproblems.org/memcached/ along
with the core dump I took earlier in case that's of any use.

--
You received this message because this project is configured to send all  
issue notifications to this address.

You may adjust your notification preferences at:
https://code.google.com/hosting/settings

--

--- 
You received this message because you are subscribed to the Google Groups "memcached" group.

To unsubscribe from this group and stop receiving emails from it, send an email 
to memcached+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




Re: Issue 260 in memcached: memcached big bug

2013-03-11 Thread memcached


Comment #19 on issue 260 by dorma...@rydia.net: memcached big bug
http://code.google.com/p/memcached/issues/detail?id=260

Do the backtraces always the look the same for you?

can we get a look at "stats settings" / "stats" / "stats slabs" / "stats  
items" as well?


thank you!

--
You received this message because this project is configured to send all  
issue notifications to this address.

You may adjust your notification preferences at:
https://code.google.com/hosting/settings

--

--- 
You received this message because you are subscribed to the Google Groups "memcached" group.

To unsubscribe from this group and stop receiving emails from it, send an email 
to memcached+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




Re: Issue 260 in memcached: memcached big bug

2013-03-11 Thread memcached


Comment #18 on issue 260 by edwardqu...@gmail.com: memcached big bug
http://code.google.com/p/memcached/issues/detail?id=260

Here is a back trace. I get the segmentation error every day (fedora 18  
memcached-1.4.15-2.fc18.i686)


[root@www2 quick]# gdb memcached 9128
GNU gdb (GDB) Fedora (7.5.1-36.fc18)
Copyright (C) 2012 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later  


This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "i686-redhat-linux-gnu".
For bug reporting instructions, please see:
...
Reading symbols from /usr/bin/memcached...Reading symbols from  
/usr/lib/debug/usr/bin/memcached.debug...done.

done.
Attaching to program: /usr/bin/memcached, process 9128
Reading symbols from /lib/libevent-2.0.so.5...Reading symbols from  
/usr/lib/debug/usr/lib/libevent-2.0.so.5.1.6.debug...done.

done.
Loaded symbols for /lib/libevent-2.0.so.5
Reading symbols from /lib/librt.so.1...Reading symbols from  
/usr/lib/debug/lib/librt-2.16.so.debug...done.

done.
Loaded symbols for /lib/librt.so.1
Reading symbols from /lib/libpthread.so.0...Reading symbols from  
/usr/lib/debug/lib/libpthread-2.16.so.debug...done.

done.
[New LWP 9133]
[New LWP 9132]
[New LWP 9131]
[New LWP 9130]
[New LWP 9129]
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/libthread_db.so.1".
Loaded symbols for /lib/libpthread.so.0
Reading symbols from /lib/libc.so.6...Reading symbols from  
/usr/lib/debug/lib/libc-2.16.so.debug...done.

done.
Loaded symbols for /lib/libc.so.6
Reading symbols from /lib/ld-linux.so.2...Reading symbols from  
/usr/lib/debug/lib/ld-2.16.so.debug...done.

done.
Loaded symbols for /lib/ld-linux.so.2
Reading symbols from /lib/libnss_files.so.2...Reading symbols from  
/usr/lib/debug/lib/libnss_files-2.16.so.debug...done.

done.
Loaded symbols for /lib/libnss_files.so.2
0xb77dc416 in __kernel_vsyscall ()
(gdb) where
#0  0xb77dc416 in __kernel_vsyscall ()
#1  0xb76a2a96 in epoll_wait () at ../sysdeps/unix/syscall-template.S:81
#2  0xb77a9968 in epoll_dispatch (base=0x9f48de8, tv=0xbfb93040) at  
epoll.c:407

#3  0xb7793132 in event_base_loop (base=0x9f48de8, flags=0) at event.c:1590
#4  0x0804baae in main (argc=10, argv=0xbfb94204) at memcached.c:5228
(gdb) where
#0  0xb77dc416 in __kernel_vsyscall ()
#1  0xb76a2a96 in epoll_wait () at ../sysdeps/unix/syscall-template.S:81
#2  0xb77a9968 in epoll_dispatch (base=0x9f48de8, tv=0xbfb93040) at  
epoll.c:407

#3  0xb7793132 in event_base_loop (base=0x9f48de8, flags=0) at event.c:1590
#4  0x0804baae in main (argc=10, argv=0xbfb94204) at memcached.c:5228
(gdb) bt
#0  0xb77dc416 in __kernel_vsyscall ()
#1  0xb76a2a96 in epoll_wait () at ../sysdeps/unix/syscall-template.S:81
#2  0xb77a9968 in epoll_dispatch (base=0x9f48de8, tv=0xbfb93040) at  
epoll.c:407

#3  0xb7793132 in event_base_loop (base=0x9f48de8, flags=0) at event.c:1590
#4  0x0804baae in main (argc=10, argv=0xbfb94204) at memcached.c:5228
(gdb) thread
[Current thread is 1 (Thread 0xb75ab6c0 (LWP 9128))]
(gdb) c
Continuing.

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0xb655ab40 (LWP 9131)]
do_slabs_alloc (id=1, size=size@entry=76) at slabs.c:241
241 p->slots = it->next;
(gdb) bt
#0  do_slabs_alloc (id=1, size=size@entry=76) at slabs.c:241
#1  slabs_alloc (size=size@entry=76, id=id@entry=1) at slabs.c:404
#2  0x0805644d in do_item_alloc (key=0xb49fff30 "my_wiki:stats:pcache_hit\n  
0 3\r\n559\r\n9\r\n\n", nkey=24, flags=0, exptime=exptime@entry=0,

nbytes=nbytes@entry=5, cur_hv=cur_hv@entry=123356228) at items.c:188
#3  0x080535fa in do_add_delta (c=c@entry=0xb4a23988,  
key=key@entry=0xb4a25e2d "my_wiki:stats:pcache_hit", nkey=nkey@entry=24,  
incr=true, delta=1,
buf=buf@entry=0xb655a0b4 "560", cas=cas@entry=0x0,  
hv=hv@entry=123356228) at memcached.c:3102
#4  0x080586e5 in add_delta (c=c@entry=0xb4a23988,  
key=key@entry=0xb4a25e2d "my_wiki:stats:pcache_hit", nkey=nkey@entry=24,  
incr=incr@entry=1, delta=1,

buf=buf@entry=0xb655a0b4 "560", cas=cas@entry=0x0) at thread.c:585
#5  0x0804da3d in process_arithmetic_command (c=c@entry=0xb4a23988,  
tokens=tokens@entry=0xb655a140, ntokens=ntokens@entry=4,  
incr=incr@entry=true)

at memcached.c:3015
#6  0x080506cc in process_command (c=c@entry=0xb4a23988, command=out>) at memcached.c:3266

#7  0x08050f23 in try_read_command (c=0xb4a23988) at memcached.c:3504
#8  drive_machine (c=0xb4a23988) at memcached.c:3824
#9  event_handler (fd=30, which=2, arg=0xb4a23988) at memcached.c:4065
#10 0xb77933da in event_process_active_single_queue (activeq=out>, base=) at event.c:1340

#11 event_process_active (base=) at event.c:1407
#12 event_base_loop (base=0x9f6eaf0, flags=flags@entry=0) at event.c:1604
#13 0x08057cdf in worker_libevent (arg=0x9f6

Re: Memcached cluster

2013-03-11 Thread Henrik Schröder
Memcached is a cache, not storage, you really shouldn't use it as such.
When you set a value in memcached, you have no guarantees whatsoever that
you'll be able to get the value back afterwards. You're guaranteed to get
the latest value set if you get something, and you're guaranteed to not get
a value if it's been deleted or has expired. But there are a lot of factors
that can cause a value to be spontaneously evicted, to say nothing of the
fact that you lose everything if you restart it or if the machine crashes.

Also note that any replication functionality can lead to inconsistency,
since there are no built-in mechanisms for resolving that, you can just
hope that your failover server has the same data as the original one.

If you want storage, then get a piece of software that actually offers
storage, there are plenty to choose from. But memcached is probably the
wrong choice for you. If you only need key-value storage, then I suggest
you check out Cassandra, it scales pretty linearly in that scenario. Or you
could check out hstore in Postgresql, but you probably need to make your
own sharding for that.


/Henrik



On Mon, Mar 11, 2013 at 9:57 AM, Oleksandr Drach wrote:

> Hello Dormando!
> Thanks for your reply.
>
> Description and requirements are:
> - Memcached will be used a primary storage (i.e. not for caching MySQL).
> - It should have failover feature (in case if one server fails all
> connections goes to another server).
>
> Basically something like Master-Slave will be sufficient, but
> Master-Master architecture is more acceptable.
> Thanks!
>
>
> On Sunday, March 10, 2013 1:58:16 AM UTC+2, Dormando wrote:
>
>> > Dear memcached community,
>> > It would be really good to build a failover memcached cluster.�
>> > As I know this functionality is not provided by default.�
>> > Hence as options - you may use CouchBase Server or something like
>> Repcached.
>> > Both of them has disadvantages: CouchBase Server is much slower,
>> �Repcached works with legacy memcached version 1.2.8
>> >
>> > Based on your�experience�what is the best way to build cluster of
>> memcached servers?
>> >
>> > Thanks in advance!
>>
>> Hi,
>>
>> This depends on why you need that second cluster and what the constraints
>> are for it.
>>
>> You can do client side replication via libmemcached which will handle a
>> lot of potential use cases. Though oftentimes people who are attempting
>> to
>> do this are doing so because they don't understand normal memcached
>> clustering very well.
>>
>> So it'd be useful to state all of your requirements up front. Then we can
>> make a real recommendation/etc.
>>
>  --
>
> ---
> You received this message because you are subscribed to the Google Groups
> "memcached" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to memcached+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>
>

-- 

--- 
You received this message because you are subscribed to the Google Groups 
"memcached" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to memcached+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.




Re: Memcached cluster

2013-03-11 Thread Oleksandr Drach
Hello Dormando!
Thanks for your reply.

Description and requirements are:
- Memcached will be used a primary storage (i.e. not for caching MySQL).
- It should have failover feature (in case if one server fails all 
connections goes to another server).

Basically something like Master-Slave will be sufficient, but Master-Master 
architecture is more acceptable.
Thanks!


On Sunday, March 10, 2013 1:58:16 AM UTC+2, Dormando wrote:
>
> > Dear memcached community, 
> > It would be really good to build a failover memcached cluster.� 
> > As I know this functionality is not provided by default.� 
> > Hence as options - you may use CouchBase Server or something like 
> Repcached. 
> > Both of them has disadvantages: CouchBase Server is much slower, 
> �Repcached works with legacy memcached version 1.2.8 
> > 
> > Based on your�experience�what is the best way to build cluster of 
> memcached servers? 
> > 
> > Thanks in advance! 
>
> Hi, 
>
> This depends on why you need that second cluster and what the constraints 
> are for it. 
>
> You can do client side replication via libmemcached which will handle a 
> lot of potential use cases. Though oftentimes people who are attempting to 
> do this are doing so because they don't understand normal memcached 
> clustering very well. 
>
> So it'd be useful to state all of your requirements up front. Then we can 
> make a real recommendation/etc.

-- 

--- 
You received this message because you are subscribed to the Google Groups 
"memcached" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to memcached+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.