Help wanted for "No sock found" crash

Jamie McCarthy jamie at mccarthy.vg
Sat Aug 11 19:47:43 UTC 2007


I upgraded memcached, Cache::Memcached, and libevent to the latest
tarballs and suddenly my application started hitting the
die("No sock found") in _load_multi.  Presumably _dead_sock or
_close_sock is getting called, or sock_to_host is messed up,
because %cache_sock is empty (no keys).

The only workaround I've found is using only 1 server instead of the
4 I was using before.  I assume this indicates some part of the
_single_sock code path works where the regular code doesn't.

I'll keep looking for what's causing it, but if this error jumps out
at anyone and they know what the issue is, you could probably save
me a lot of time.  :)


This debug code:

if (!$cache_sock{$ipport}) { use Data::Dumper; my $in = 
Dumper($_); $in =~ s/\s+/ /g; my $cs_str = Dumper(\%cache_sock); 
$cs_str =~ s/\s+/ /g; print STDERR scalar(gmtime) . " $$ 
_load_multi ipport='$ipport' \$_='$in' cache_sock: '$cs_str'\n"; }
         my $sock   = $cache_sock{$ipport} or die "No sock found 
for $ipport";

Emits this:

Sat Aug 11 04:41:58 2007 [ircslash.pl] Sat Aug 11 04:41:58 2007 
23913 _load_multi ipport='10.2.37.152:11211' $_='$VAR1 = 
'GLOB(0x875c38c)'; ' cache_sock: '$VAR1 = {}; '
Sat Aug 11 04:41:58 2007 [ircslash.pl] No sock found for 
10.2.37.152:11211 at 
/usr/local/lib/perl5/site_perl/5.8.6/Cache/Memcached.pm line 673.
-- 
   Jamie McCarthy
  http://mccarthy.vg/
   jamie at mccarthy.vg



More information about the memcached mailing list