Memcached 1.4.0 (stable) Released!

27 views
Skip to first unread message

dormando

unread,
Jul 10, 2009, 2:02:55 AM7/10/09
to memc...@googlegroups.com
Hey,

I'm pleased to announce the latest stable milestone for memcached, 1.4.0!

notes: http://code.google.com/p/memcached/wiki/ReleaseNotes140

download: http://memcached.googlecode.com/files/memcached-1.4.0.tar.gz

The newest version of 1.4.0 has been a lot of work from Trond, Dustin, and
others. Bringing us the binary protocol, many new statistics, and
significant performance improvements. See the release notes for full
information, but in short, this release kicks ass. It opens the door for
us in future memcached development.

This is a dot-oh product, and we give no guarantees, but it is very well
tested. Please deploy this software and let us know how it goes for you.
The release is fully backwards compatible, so please feel free to replace
one or two servers and test it first - in fact we always recommend you
exercize similar caution when upgrading.

We are presently running 1.4.0 in production at Six Apart. We'll be
completing the full rollout over the next few business days.

Report bugs, give us feedback, let us know if you've tried it. It'll be a
big help.

Thanks,
-Dormando

Clint Webb

unread,
Jul 10, 2009, 2:16:52 AM7/10/09
to memc...@googlegroups.com
Excellent work guys!

--
"Be excellent to each other"

Cosimo Streppone

unread,
Jul 10, 2009, 4:48:16 AM7/10/09
to memc...@googlegroups.com
On Fri, 10 Jul 2009 08:02:55 +0200, dormando <dorm...@rydia.net> wrote:

> I'm pleased to announce the latest stable milestone for memcached, 1.4.0!

> [...]


> Please deploy this software and let us know how it goes for you.

Will try :)

In the meanwhile, here's a stupid patch that fixes a trivial warning
in the test suite. All tests pass.


diff -Naur memcached-1.4.0/t/binary.t memcached-1.4.0-cosimo/t/binary.t
--- memcached-1.4.0/t/binary.t 2009-07-09 16:43:42.000000000 +0000
+++ memcached-1.4.0-cosimo/t/binary.t 2009-07-10 08:43:27.000000000 +0000
@@ -172,7 +172,7 @@
ok($@ && $@->delta_badval, "Expected invalid value when incrementing
text.");
$check->('issue48', 0, "text");

- my $rv =()= eval { $mc->decr('issue48'); };
+ $rv =()= eval { $mc->decr('issue48'); };
ok($@ && $@->delta_badval, "Expected invalid value when decrementing
text.");
$check->('issue48', 0, "text");
}


--
Cosimo

Dustin

unread,
Jul 10, 2009, 7:00:24 PM7/10/09
to memcached

Thanks a lot for this. I've been doing some work on the builders to
ensure that these things aren't so easily unnoticed.

On Jul 10, 1:48 am, "Cosimo Streppone" <cos...@opera.com> wrote:

Artur

unread,
Jul 10, 2009, 9:53:27 PM7/10/09
to memc...@googlegroups.com
Hi,
I am using this great tool on by OpenBSD box, but unfortunately there
is problem during the compilation process of last stable 1.4 release
(version 1.2.8 has no compilation problems):

# ./configure
checking build system type... i386-unknown-openbsd4.5
checking host system type... i386-unknown-openbsd4.5
checking target system type... i386-unknown-openbsd4.5
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... ./install-sh -c -d
checking for gawk... no
checking for mawk... no
checking for nawk... nawk
checking whether make sets $(MAKE)... yes
checking for gcc... gcc
checking for C compiler default output file name... a.out
checking whether the C compiler works... yes
checking whether we are cross compiling... no
checking for suffix of executables...
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking for style of include used by make... GNU
checking dependency style of gcc... gcc3
checking how to run the C preprocessor... gcc -E
checking for grep that handles long lines and -e... /usr/bin/grep
checking for egrep... /usr/bin/grep -E
checking for icc in use... no
checking for Sun cc in use... no
checking for gcc option to accept ISO C99... -std=gnu99
checking whether gcc -std=gnu99 and cc understand -c and -o together... yes
checking for a BSD-compatible install... /usr/bin/install -c
checking for gcov... /usr/bin/gcov
checking for libevent directory... (system)
checking for library containing socket... none required
checking for library containing gethostbyname... none required
checking for library containing umem_cache_create... no
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking for stdbool.h that conforms to C99... yes
checking for _Bool... yes
checking for an ANSI C-conforming const... yes
checking for socklen_t... yes
checking for endianness... little
checking for library containing pthread_create... -lpthread
checking for mlockall... yes
checking for getpagesizes... no
checking for memcntl... no
checking for sigignore... no
checking for alignment... none
checking for setppriv... no
checking umem.h usability... no
checking umem.h presence... no
checking for umem.h... no
checking for xml2rfc... no
checking for xsltproc... /usr/local/bin/xsltproc
configure: creating ./config.status
config.status: creating Makefile
config.status: creating doc/Makefile
config.status: creating config.h
config.status: config.h is unchanged
config.status: executing depfiles commands

# make
make all-recursive
Making all in doc
make all-am
gcc -std=gnu99 -DHAVE_CONFIG_H -I. -DNDEBUG -g -O2 -Wall -Werror
-pedantic -Wstrict-prototypes -Wmissing-prototypes
-Wmissing-declarations -Wredundant-decls -MT memcached-memcached.o -MD
-MP -MF .deps/memcached-memcached.Tpo -c -o memcached-memcached.o `test
-f 'memcached.c' || echo './'`memcached.c
memcached.c:96: error: syntax error before "__extension__"
memcached.c:96: error: syntax error before '?' token
memcached.c:59: warning: `drive_machine' declared `static' but never
defined
memcached.c:60: warning: `new_socket' declared `static' but never defined
memcached.c:61: warning: `server_socket' declared `static' but never
defined
memcached.c:62: warning: `try_read_command' declared `static' but never
defined
memcached.c:71: warning: `try_read_network' declared `static' but never
defined
memcached.c:72: warning: `try_read_udp' declared `static' but never defined
memcached.c:74: warning: `conn_set_state' declared `static' but never
defined
memcached.c:77: warning: `stats_init' declared `static' but never defined
memcached.c:78: warning: `server_stats' declared `static' but never defined
memcached.c:79: warning: `process_stat_settings' declared `static' but
never defined
memcached.c:83: warning: `settings_init' declared `static' but never
defined
memcached.c:86: warning: `event_handler' declared `static' but never
defined
memcached.c:87: warning: `conn_close' declared `static' but never defined
memcached.c:88: warning: `conn_init' declared `static' but never defined
memcached.c:89: warning: `update_event' declared `static' but never defined
memcached.c:90: warning: `complete_nread' declared `static' but never
defined
memcached.c:91: warning: `process_command' declared `static' but never
defined
memcached.c:92: warning: `write_and_free' declared `static' but never
defined
memcached.c:93: warning: `ensure_iov_space' declared `static' but never
defined
memcached.c:94: warning: `add_iov' declared `static' but never defined
memcached.c:95: warning: `add_msghdr' declared `static' but never defined
*** Error code 1

Stop in /usr/src/memcached-1.4.0 (line 417 of Makefile).
*** Error code 1

Stop in /usr/src/memcached-1.4.0 (line 770 of Makefile).
*** Error code 1

Stop in /usr/src/memcached-1.4.0 (line 276 of Makefile).

Please help me to solve this problem.

Best regards,
Artur

Dustin

unread,
Jul 11, 2009, 12:49:46 AM7/11/09
to memcached

On Jul 10, 6:53 pm, Artur <ar...@ybka.com> wrote:
> Hi,
>   I am using this great tool on by OpenBSD  box, but unfortunately there
> is problem during the compilation process of last stable 1.4 release
> (version 1.2.8 has no compilation problems):

Do you think you could run a builder? I don't have a handy OpenBSD
box that can do it, but would certainly like OpenBSD actively
supported.

Adam Thomason

unread,
Jul 11, 2009, 2:37:01 AM7/11/09
to memc...@googlegroups.com
I can repo this issue on OpenBSD 4.4... it seems that /usr/include/sys/endian.h has an existing macro definition for "swap64". I can fix this problem by either renaming the function or by wrapping the decl and def in memcached.c with "#ifndef swap64", since the system version does the same thing.

Separately, I had to pass --disable-coverage to configure since -lgcov is unavailable (at least on a stock system).

Finally, the tests fail with a complaint about rlimit; apparently "-c 1021" is ok but >=1022 fails. Changing the default value for settings.maxconns in memcached.c (and correspondingly fixing up the tests that check it in binary.t and stats.t) does away with the problem.

The test suite then passes, if rather noisily.

Cheers,
Adam

fenidik

unread,
Jul 11, 2009, 3:49:07 AM7/11/09
to memcached
Debian 5.0. livevent 1.4.8 Works fine. Thanks.

Artur

unread,
Jul 11, 2009, 9:14:56 AM7/11/09
to memc...@googlegroups.com
Hi Dustin,
thank You for Your replay.
Hmm I do not know what tool do You mean "builder" (for eg. C++ Builder )
- what I have to do to help You to resolve this problem (I am not C/C++
developer unfortunately) ?
Of course this is very good idea to support OpenBSD (the most secure OS
on the world ;).
Please be patient because of my ignorance in some IT fields ;).

Best regards,
Artur

Dustin pisze:


> On Jul 10, 6:53 pm, Artur <ar...@ybka.com> wrote:
>
>> Hi,

>> I am using this great tool on my OpenBSD box, but unfortunately there

Dustin

unread,
Jul 11, 2009, 1:37:07 PM7/11/09
to memcached

On Jul 11, 6:14 am, Artur <ar...@ybka.com> wrote:
> Hi Dustin,
>    thank You for Your replay.
> Hmm I do not know what tool do You mean "builder" (for eg. C++ Builder )
> - what I have to do to help You to resolve this problem (I am not C/C++
> developer unfortunately) ?

It sounds like a workaround is already published here, but what I'm
asking for is a a place where we can consistently run builds.

Basically, a shell on one of your OpenBSD boxes with enough dev
tools for us to build and test memcached so we (for lack of a better
word) certify that each change that we make works on OpenBSD.

Artur

unread,
Jul 12, 2009, 7:35:47 PM7/12/09
to memc...@googlegroups.com
Hi,
thank You Adam for Your replay.
I have no luck - using conf. option from Your tip (under OpenBSD 4.5)
there is no success.
The output from ./configure and make are at the and of this post.

I am going to prepare account on my box or vmware image for Dustin to
help solve this problem.

Best regards,
Artur

Adam Thomason pisze:


> I can repo this issue on OpenBSD 4.4... it seems that
> /usr/include/sys/endian.h has an existing macro definition for
> "swap64". I can fix this problem by either renaming the function or by
> wrapping the decl and def in memcached.c with "#ifndef swap64", since
> the system version does the same thing.
>
> Separately, I had to pass --disable-coverage to configure since -lgcov
> is unavailable (at least on a stock system).
>
> Finally, the tests fail with a complaint about rlimit; apparently "-c
> 1021" is ok but >=1022 fails. Changing the default value for
> settings.maxconns in memcached.c (and correspondingly fixing up the
> tests that check it in binary.t and stats.t) does away with the problem.
>
> The test suite then passes, if rather noisily.
>
> Cheers,
> Adam
>

# ./configure --disable-coverage

Adam Thomason

unread,
Jul 14, 2009, 1:52:03 AM7/14/09
to memc...@googlegroups.com
On Sat, Jul 11, 2009 at 10:37 AM, Dustin <dsal...@gmail.com> wrote:

 It sounds like a workaround is already published here, but what I'm
asking for is a a place where we can consistently run builds.

 Basically, a shell on one of your OpenBSD boxes with enough dev
tools for us to build and test memcached so we (for lack of a better
word) certify that each change that we make works on OpenBSD.

Hey Dustin, I can volunteer buildslaves for the following (all amd64):
* openbsd 4.5
* freebsd 7.2
* opensolaris 5.11
Let me know if any would be useful.
Cheers,
Adam

Dustin

unread,
Jul 14, 2009, 2:02:37 AM7/14/09
to memcached

On Jul 13, 10:52 pm, Adam Thomason <athoma...@gmail.com> wrote:

> Hey Dustin, I can volunteer buildslaves for the following (all amd64):
> * openbsd 4.5
> * freebsd 7.2
> * opensolaris 5.11

I'll take this off list for details and report back what we got
working. Thanks much. :)

Gary Z

unread,
Jul 19, 2009, 7:29:14 PM7/19/09
to memcached
In order to make it work for Solaris10 x86 (not opensolaris), I had to
make following minor changes, two issues:

1. using standard C prototype

2. solaris seems to return ETIME instead of EWOULDBLOCK for non-
blocking read
In errno.h:
#define EAGAIN 11 /* Resource temporarily unavailable */
#define EWOULDBLOCK EAGAIN
#define ETIME 62 /* timer expired */

With following changes, it built with GNU Make 3.80, SFW gcc 3.4.3 on
Solaris 10-u7-ga-x86, linked with libevent-1.4.6-stable.


diff -U2 ./solaris_priv.c ../memcached-1.4.0-sol10/./solaris_priv.c
--- ./solaris_priv.c Thu Jul 9 09:43:42 2009
+++ ../memcached-1.4.0-sol10/./solaris_priv.c Wed Jul 15 21:49:01
2009
@@ -3,4 +3,5 @@
#include <stdio.h>

+extern void drop_privileges(void);
/*
* this section of code will drop all (Solaris) privileges including


diff -U2 ./memcached.h ../memcached-1.4.0-sol10/./memcached.h
--- ./memcached.h Thu Jul 9 10:16:24 2009
+++ ../memcached-1.4.0-sol10/./memcached.h Wed Jul 15 21:48:07
2009
@@ -465,5 +465,5 @@

#if HAVE_DROP_PRIVILEGES
-extern void drop_privileges();
+extern void drop_privileges(void);
#else
#define drop_privileges()


diff -U2 ./memcached.c ../memcached-1.4.0-sol10/./memcached.c
--- ./memcached.c Thu Jul 9 10:16:24 2009
+++ ../memcached-1.4.0-sol10/./memcached.c Wed Jul 15 22:14:20
2009
@@ -3016,5 +3016,5 @@
}
if (res == -1) {
- if (errno == EAGAIN || errno == EWOULDBLOCK) {
+ if (errno == EAGAIN || errno == EWOULDBLOCK || errno ==
ETIME) {
break;
}
@@ -3115,5 +3115,5 @@
return TRANSMIT_INCOMPLETE;
}
- if (res == -1 && (errno == EAGAIN || errno == EWOULDBLOCK)) {
+ if (res == -1 && (errno == EAGAIN || errno == EWOULDBLOCK ||
errno == ETIME)) {
if (!update_event(c, EV_WRITE | EV_PERSIST)) {
if (settings.verbose > 0)
@@ -3267,5 +3267,4 @@
}
}
-
/* now try reading from the socket */
res = read(c->sfd, c->ritem, c->rlbytes);
@@ -3285,5 +3284,5 @@
break;
}
- if (res == -1 && (errno == EAGAIN || errno ==
EWOULDBLOCK)) {
+ if (res == -1 && (errno == EAGAIN || errno == EWOULDBLOCK
|| errno == ETIME)) {
if (!update_event(c, EV_READ | EV_PERSIST)) {
if (settings.verbose > 0)
@@ -3297,5 +3296,5 @@
/* otherwise we have a real error, on which we close the
connection */
if (settings.verbose > 0)
- fprintf(stderr, "Failed to read, and not due to
blocking\n");
+ fprintf(stderr, "Failed to read, and not due to
blocking %d\n", errno);
conn_set_state(c, conn_closing);
break;
@@ -3330,5 +3329,5 @@
break;
}
- if (res == -1 && (errno == EAGAIN || errno ==
EWOULDBLOCK)) {
+ if (res == -1 && (errno == EAGAIN || errno == EWOULDBLOCK
|| errno == ETIME)) {
if (!update_event(c, EV_READ | EV_PERSIST)) {
if (settings.verbose > 0)

Dustin

unread,
Jul 20, 2009, 1:06:01 AM7/20/09
to memcached


On Jul 19, 4:29 pm, Gary Z <g...@ironplanet.com> wrote:
> In order to make it work for Solaris10 x86 (not opensolaris), I had to
> make following minor changes, two issues:

Hey, we have a Solaris 10 sparc builder and OpenSolaris x86
builders. Apparently that's not enough to cover it.

... or are you talking about something that's not breaking any of
our current tests? If it doesn't, then it'd be really good to get a
test case for this.

Any chance you can create a zone or something to run a buildbot
slave so we can keep this platform properly supported? :)

Matt Ingenthron

unread,
Jul 20, 2009, 2:21:29 AM7/20/09
to memc...@googlegroups.com
Dustin wrote:
>
> On Jul 19, 4:29 pm, Gary Z <g...@ironplanet.com> wrote:
>
>> In order to make it work for Solaris10 x86 (not opensolaris), I had to
>> make following minor changes, two issues:
>>
>
> Hey, we have a Solaris 10 sparc builder and OpenSolaris x86
> builders. Apparently that's not enough to cover it.
>

I believe our SPARC builder is using Sun Studio, not gcc. With the
first one, it could be something gcc is catching (correctly?) which
studio is not. The second one shouldn't cause a difference with
compilers though.

Looking at the man page for syscalls (man -s 2 intro), I see the following:

62 ETIME Timer expired

The timer set for a STREAMS ioctl(2)
call has expired. The cause of this
error is device-specific and could
indicate either a hardware or
software failure, or perhaps a
timeout value that is too short for
the specific operation. The status
of the ioctl() operation is indeter-
minate. This is also returned in the
case of _lwp_cond_timedwait(2) or
cond_timedwait(3C).

This doesn't seem to apply in the current context, does it? Did you get
some sort of error during compliation, or were you just looking at
errno.h for something you thought was equivalent?

Hmm, but looking deeper... there it is in port_getn().
http://src.opensolaris.org/source/xref/onnv/onnv-gate/usr/src/lib/libc/port/gen/event_port.c#96

This defines errno as

ETIME The time interval expired before the expected
number of events have been posted to the port
(original value in nget), or nget is updated with
the number of returned port_event_t structures in
list[].

But... that return is to libevent from a port_getn().... which seems to
handle the return value:
http://src.opensolaris.org/source/xref/sfw/usr/src/lib/libevent/libevent-1.3e/evport.c#355
Sun would generally configure it to use /dev/poll rather than event port
completion since it was an interface with more miles on it and it
supports both. Event port completion is more useful if you're writing
multithreaded code and don't want to have to dance around /dev/poll with
your threads.

The section of code you're referring to has just a read(2)... and the
man page for read(2) says nothing about returning ETIME. How did you
see a need for this?

Gary Z

unread,
Jul 20, 2009, 11:54:55 AM7/20/09
to memcached
The difference of opensolaris x86 vs. solaris x86 is like Fedora vs.
RedHat. Sorry, I won't be able to setup a buildbot, but I can provide
the executable for anyone who wants it.

On the extern prototype change, this only affects Solaris, and it's
nice to have standard prototype format.

On the ETIME change, that was runtime thing, when I was testing with
command line, I noticed the error code ETIME in conn_nread. Though
it's not an issue for real application, since the data are always
ready. So you can ignore this one, since it "may" affect behaviours on
other platforms.








Reply all
Reply to author
Forward
0 new messages