Memcached-1.4.5 Solaris 10 Error

2011-03-03 Thread Felipe Cerqueira
Hi All,

After some problems, i have success in compiling memcached on solaris
sparc.

libmemcached was very hard to get working too. I have a version here
with some patches to detect and implement unsuported features on
solaris like getopt_long and etc...

Now, its compiled successfuly and working well on solaris sparc 9.

On solaris sparc 10, I'm getting the follow error:

-bash-3.00$ uname -a
SunOS server 5.10 Generic_118833-33 sun4u sparc SUNW,Sun-Fire-V490
-bash-3.00$ ./memcached
[warn] ioctl: DP_POLL: Invalid argument
[warn] ioctl: DP_POLL: Invalid argument
[warn] ioctl: DP_POLL: Invalid argument
[warn] ioctl: DP_POLL: Invalid argument
[warn] ioctl: DP_POLL: Invalid argument
-bash-3.00$

-bash-3.00$ ulimit -a
core file size(blocks, -c) unlimited
data seg size (kbytes, -d) unlimited
file size (blocks, -f) unlimited
open files(-n) 256
pipe size  (512 bytes, -p) 10
stack size(kbytes, -s) 8192
cpu time (seconds, -t) unlimited
max user processes(-u) 29995
virtual memory(kbytes, -v) unlimited
-bash-3.00$

-bash-3.00$ truss ./memcached
...
/1: setsockopt(39, SOL_SOCKET, SO_SNDBUF, 0xFFBFF4FC, 4, SOV_DEFAULT)
= 0
/1: setsockopt(39, SOL_SOCKET, SO_SNDBUF, 0xFFBFF4FC, 4, SOV_DEFAULT)
Err#132 ENOBUFS
/1: bind(39, 0x0003C0A0, 16, SOV_SOCKBSD)   = 0
/1: write(9, \0, 1)   = 1
/1: write(16, \0, 1)  = 1
/1: write(23, \0, 1)  = 1
/1: write(30, \0, 1)  = 1
/1: pwrite(3, \0\0\004\001\0\0\0\0\0 $.., 24, 0)  = 24
/1: ioctl(3, DP_POLL, 0xFFBFF490)   Err#22 EINVAL
/1: mmap(0x0001, 65536, PROT_READ|PROT_WRITE|PROT_EXEC,
MAP_PRIVATE|MAP_ANON|MAP_ALIGN, -1, 0) = 0xFEFA
[/1:write(2,  [, 1)   = 1
warn/1: write(2,  w a r n, 4) = 4
] /1:   write(2,  ]  , 2) = 2
ioctl: DP_POLL: Invalid argument/1: write(2,  i o c t l :   D P _ P
O.., 32)   = 32

/1: write(2, \n, 1)   = 1
/1: lwp_unpark(6)   = 0
/6: lwp_park(0x, 0) = 0
/6: lwp_sigmask(SIG_SETMASK, 0xFFBFFEFF, 0xFFF7) = 0xFFBFFEFF
[0x]
/6: lwp_exit()
/1: lwp_wait(6, 0xFFBFF584) = 0
_exit(0)


I have look around for some problems on libevent on solaris 10 but
cant find any solution.

Thanks in advance


Re: Memcached-1.4.5 Solaris 10 Error

2011-03-03 Thread Matt Ingenthron
Hi Felipe,

Do note that the memcached build on Solaris works best when using Sun's
cc, not gcc.  Last I checked, it was still freely available (but
required registration).

Which version of libevent did you use?  Solaris 10 has libevent built in
over in the SFW repository, and that one has been well tested.  It
should be compatible with 1.4.5.  I'd really recommend using it if at
all possible. 

Also, note that just to get you going, you can set different envvars to
have libevent use different event mechanisms with the OS.  I believe
both event ports and /dev/poll are supported with Solaris.

Hope that helps,

Matt

On 3/3/11 9:33 AM, Felipe Cerqueira wrote:
 Hi All,

 After some problems, i have success in compiling memcached on solaris
 sparc.

 libmemcached was very hard to get working too. I have a version here
 with some patches to detect and implement unsuported features on
 solaris like getopt_long and etc...

 Now, its compiled successfuly and working well on solaris sparc 9.

 On solaris sparc 10, I'm getting the follow error:

 -bash-3.00$ uname -a
 SunOS server 5.10 Generic_118833-33 sun4u sparc SUNW,Sun-Fire-V490
 -bash-3.00$ ./memcached
 [warn] ioctl: DP_POLL: Invalid argument
 [warn] ioctl: DP_POLL: Invalid argument
 [warn] ioctl: DP_POLL: Invalid argument
 [warn] ioctl: DP_POLL: Invalid argument
 [warn] ioctl: DP_POLL: Invalid argument
 -bash-3.00$

 -bash-3.00$ ulimit -a
 core file size(blocks, -c) unlimited
 data seg size (kbytes, -d) unlimited
 file size (blocks, -f) unlimited
 open files(-n) 256
 pipe size  (512 bytes, -p) 10
 stack size(kbytes, -s) 8192
 cpu time (seconds, -t) unlimited
 max user processes(-u) 29995
 virtual memory(kbytes, -v) unlimited
 -bash-3.00$

 -bash-3.00$ truss ./memcached
 ...
 /1:   setsockopt(39, SOL_SOCKET, SO_SNDBUF, 0xFFBFF4FC, 4, SOV_DEFAULT)
 = 0
 /1:   setsockopt(39, SOL_SOCKET, SO_SNDBUF, 0xFFBFF4FC, 4, SOV_DEFAULT)
 Err#132 ENOBUFS
 /1:   bind(39, 0x0003C0A0, 16, SOV_SOCKBSD)   = 0
 /1:   write(9, \0, 1)   = 1
 /1:   write(16, \0, 1)  = 1
 /1:   write(23, \0, 1)  = 1
 /1:   write(30, \0, 1)  = 1
 /1:   pwrite(3, \0\0\004\001\0\0\0\0\0 $.., 24, 0)  = 24
 /1:   ioctl(3, DP_POLL, 0xFFBFF490)   Err#22 EINVAL
 /1:   mmap(0x0001, 65536, PROT_READ|PROT_WRITE|PROT_EXEC,
 MAP_PRIVATE|MAP_ANON|MAP_ALIGN, -1, 0) = 0xFEFA
 [/1:  write(2,  [, 1)   = 1
 warn/1:   write(2,  w a r n, 4) = 4
 ] /1: write(2,  ]  , 2) = 2
 ioctl: DP_POLL: Invalid argument/1:   write(2,  i o c t l :   D P _ P
 O.., 32) = 32

 /1:   write(2, \n, 1)   = 1
 /1:   lwp_unpark(6)   = 0
 /6:   lwp_park(0x, 0) = 0
 /6:   lwp_sigmask(SIG_SETMASK, 0xFFBFFEFF, 0xFFF7) = 0xFFBFFEFF
 [0x]
 /6:   lwp_exit()
 /1:   lwp_wait(6, 0xFFBFF584) = 0
 _exit(0)


 I have look around for some problems on libevent on solaris 10 but
 cant find any solution.

 Thanks in advance



Re: Memcached-1.4.5 Solaris 10 Error

2011-03-03 Thread Dagobert Michelsen
Hi Felipe,

Am 03.03.2011 um 20:01 schrieb Felipe Cerqueira:
 thanks for your reply.
 
 I'm using libevent-2.0.10-stable.
 

 I have compiled everything on solaris 9 with gcc version 3.4.0.
 
 Now, trying to resolv the problem, I have download from SFW
 memcached-1.2.6-sol10-sparc-local.gz. Its too old and depends of
 libevent 1.2a (older than memcached). rs
 
 But, installing from this packages, its works fine.
 
 So, I think its a problem with cross compilation of libevent between
 solaris 9 and 10.
 
 I'll compile on solaris 10 and return here the result.

I have prepared a full libevent 2.0.10 in both 32 and 64 bit for
Solaris 9 and 10, both x86 and Sparc for OpenCSW:
  http://www.opencsw.org/packages/CSWlibevent2-0-5/
The only critical thing to note is that the tests must be run with a bash
instead of /bin/sh.

Memcached had some issue which you can see from my build recipe:
  http://sourceforge.net/apps/trac/gar/browser/csw/mgar/pkg/memcached/trunk
Experimental packages for Solaris 9 and additional ones for Solaris 10 x86 with
DTrace support both 32/64 bit are available from
  http://buildfarm.opencsw.org/experimental.html#memcached
However, as Sparc on Solaris 10 does not pass the testsuite in 64 bit
completely I don't know if there are other issue, so tests are definitely
welcome. You can do so easiest by
  pkgadd -d http://mirror.opencsw.org/opencsw/pkgutil-`uname -p`.pkg
  /opt/csw/bin/pkgutil -t 
http://buildfarm.opencsw.org/opencsw/experimental/memcached -i memcached

The current version officially distributed from OpenCSW is 1.4.3, also 32/64 
bit,
which should run fine. It was the last version btw. to compile OOTB on Solaris.

It would be nice if you would give them a try and let me know if you
encounter any issues.


Best regards

  -- Dago