Kind of weird: we're using the EPEL build [memcached-1.2.3-4.el5], but I also built from scratch and get the same issue. On 4 brand new machines (Dell Poweredge 1950s, RHEL 5, 8 gigs RAM, 2xQuad-Core Intel(R) Xeon(R) CPU L5320 @
1.86GHz), we get segfaults after memcached writes the PID file:<div><div><br> </div><div><div><div>memcached[5634]: segfault at 0000000000007889 rip 0000003583c03223 rsp 00007fff63cd5698 error 4</div><div>memcached[5651]: segfault at 0000000000007889 rip 0000003583c03223 rsp 00007fff24b1e4d8 error 4
</div><div>memcached[5734]: segfault at 0000000000007889 rip 0000003583c03223 rsp 00007ffff51ae7a8 error 4</div><div><br> </div><div>I played with options taking things in and out, and it's definitely the PID (-P) option:the file writes, contains a PID but it looks like write after it's written memcached fails. If I remove the -P option, the server starts up cleanly and runs fine. Also played with memory allocation and max connections, but it's definitely the PID option...
</div><div><br class="webkit-block-placeholder"></div><div><br class="webkit-block-placeholder"></div><div>Here's the relevant Strace output:</div><div><br class="webkit-block-placeholder"></div><div><br class="webkit-block-placeholder">
</div><div><div>mmap(NULL, 528384, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x2aaaaacc4000</div><div>rt_sigaction(SIGPIPE, {SIG_IGN}, NULL, 8) = 0</div><div>epoll_ctl(4, EPOLL_CTL_ADD, 3, {EPOLLIN, {u32=487064496, u64=487064496}}) = 0
</div><div>open("/var/run/memcached/memcached.pid", O_WRONLY|O_CREAT|O_TRUNC, 0666) = 7</div><div>fstat(7, {st_mode=S_IFREG|0644, st_size=0, ...}) = 0</div><div>mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x2aaaaad45000
</div><div>write(7, "10070\n", 6) = 6</div><div>close(7) = 0</div><div>munmap(0x2aaaaad45000, 4096) = 0</div><div>pipe([7, 8]) = 0
</div><div>epoll_ctl(4, EPOLL_CTL_ADD, 7, {EPOLLIN, {u32=487064560, u64=487064560}}) = 0</div><div>pipe([9, 10]) = 0</div><div>getrlimit(RLIMIT_NOFILE, {rlim_cur=1024, rlim_max=1024}) = 0</div><div>
epoll_create(1024) = 11</div><div>fcntl(11, F_SETFD, FD_CLOEXEC) = 0</div><div>socketpair(PF_FILE, SOCK_STREAM, 0, [12, 13]) = 0</div><div>fcntl(12, F_SETFD, FD_CLOEXEC) = 0</div><div>
fcntl(13, F_SETFD, FD_CLOEXEC) = 0</div><div>epoll_ctl(11, EPOLL_CTL_ADD, 9, {EPOLLIN, {u32=487107392, u64=487107392}}) = 0</div><div>pipe([14, 15]) = 0</div><div>--- SIGSEGV (Segmentation fault) @ 0 (0) ---
</div><div>Process 10070 detached</div><div><br class="webkit-block-placeholder"></div><div>Just as I was about to send this I had a thought, and tried something else: IF I build without --enable-threads -P works fine. I haven't played with
1.2.2 yet as I'm trying to get these machines online and into production for a release, but any insight into what's doing this would be great. These machines are basically stock RedHat 5, with lighttpd pulled from EPEL.
</div></div></div></div></div>