I'm trying to get memcached running on an IBM power6 machine running
Redhat Enterprise Linux 4 (update 7). 

I got the sources for libevent-1.4.9-stable and memcached-1.2.6 and
compiled them locally without any special options. I tried both a 32-bit
and a 64 bit (compiled with cc -m64) executable with the same results.

It seems that memcached cannot find the data which has been stored, but
it's different for get and delete operations - sometimes a get operation
for a given key succeeds and the delete operation fails, sometimes both
fail (haven't yet found a key which can be deleted but not retrieved).
The results are reproducable. For example:

#!/usr/local/bin/perl
use warnings;
use strict;

use Cache::Memcached;
use Data::Dumper;

my $server = '127.0.0.1';
my $key = 'dal/dataset/2973662382/downlinks';

my $memd = new Cache::Memcached {
   servers => [ "$server:11211" ],
 };

my $data = $memd->get($key);
if ($data) {
    print "key already exists with data: $data\n";
} else {
    print "key doesn't exist - good\n";
}
my $rc = $memd->set($key, 'bla', 60);
print "set: rc=$rc\n";

$data = $memd->get($key);
if ($data) {
    print "key exists with data: $data\n";
} else {
    print "key doesn't exist - bad\n";
}

$rc = $memd->delete($key);
print "delete: rc=$rc\n";

$data = $memd->get($key);
if ($data) {
    print "key still exists with data: $data\n";
} else {
    print "key doesn't exist - good\n";
}
__END__

always prints:

key doesn't exist - good
set: rc=1
key exists with data: bla
delete: rc=
key still exists with data: bla

but if I change $key to 'x', it prints:

key doesn't exist - good
set: rc=1
key doesn't exist - bad
delete: rc=
key doesn't exist - good


Needless to say, on x86 architecture it works like a charm (I have been
using memcached since 2007, and I just installed 1.2.6 on a test machine
to make sure that I have the same version).

The most obvious difference between Power and x86 is endianness, so
before I start digging into the code I would like to ask if there are
known problems with big-endian machines or if anybody else is using
memcached on a big-endian machine.

        hp

-- 
   _  | Peter J. Holzer    | Openmoko has already embedded
|_|_) | Sysadmin WSR       | voting system.
| |   | [email protected]         | Named "If you want it -- write it"
__/   | http://www.hjp.at/ |  -- Ilja O. on [email protected]

Attachment: signature.asc
Description: Digital signature

Reply via email to