Subject: | segmentation fault using send |
Using gdb I get the following backtrace when using a script that has a
problem with zmq send after about 1800 message sends.
Program received signal EXC_BAD_ACCESS, Could not access memory.
Reason: KERN_INVALID_ADDRESS at address: 0x0000000136373831
0x0000000100001d47 in Perl_malloc ()
(gdb) bt
#0 0x0000000100001d47 in Perl_malloc ()
#1 0x0000000100002eaf in Perl_calloc ()
#2 0x00000001017b6098 in XS_ZeroMQ__Raw_zmq_send (cv=0x104aa3fd0) at
perl_zeromq.xs:537
#3 0x00000001000874ae in Perl_pp_entersub ()
#4 0x000000010007f456 in Perl_runops_standard ()
#5 0x000000010007bc35 in perl_run ()
#6 0x00000001000010bc in main ()
This ZeroMQ 0.20 with Perl 5.10.0 on OS X SnowLeopard. The perl was built with Perl's malloc.
Summary of my perl5 (revision 5 version 10 subversion 0) configuration:
Platform:
osname=darwin, osvers=10.8.0, archname=darwin-2level
uname='darwin markimac.fairfx.local 10.8.0 darwin kernel version 10.8.0: tue jun 7
16:33:36 pdt 2011; root:xnu-1504.15.3~1release_i386 i386 '
config_args='-de -Dprefix=/Volumes/cs/MBlackman/perl5/perlbrew/perls/perl-5.10.0 -
Dusemymalloc -Accflags=-DPERL_DEBUGGING_MSTATS'
hint=recommended, useposix=true, d_sigaction=define
useithreads=undef, usemultiplicity=undef
useperlio=define, d_sfio=undef, uselargefiles=define, usesocks=undef
use64bitint=define, use64bitall=define, uselongdouble=undef
usemymalloc=y, bincompat5005=undef
Compiler:
cc='cc', ccflags ='-fno-common -DPERL_DARWIN -DPERL_DEBUGGING_MSTATS -fno-
strict-aliasing -pipe -I/usr/local/include -I/opt/local/include',
optimize='-O3',
cppflags='-fno-common -DPERL_DARWIN -DPERL_DEBUGGING_MSTATS -fno-strict-
aliasing -pipe -I/usr/local/include -I/opt/local/include'
ccversion='', gccversion='4.2.1 (Apple Inc. build 5666) (dot 3)', gccosandvers=''
intsize=4, longsize=8, ptrsize=8, doublesize=8, byteorder=12345678
d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=16
ivtype='long', ivsize=8, nvtype='double', nvsize=8, Off_t='off_t', lseeksize=8
alignbytes=8, prototype=define
Linker and Libraries:
ld='env MACOSX_DEPLOYMENT_TARGET=10.3 cc', ldflags =' -L/usr/local/lib -L/opt/local/
lib'
libpth=/usr/local/lib /opt/local/lib /usr/lib
libs=-lgdbm -ldbm -ldl -lm -lutil -lc
perllibs=-ldl -lm -lutil -lc
libc=, so=dylib, useshrplib=false, libperl=libperl.a
gnulibc_version=''
Dynamic Linking:
dlsrc=dl_dlopen.xs, dlext=bundle, d_dlsymun=undef, ccdlflags=' '
cccdlflags=' ', lddlflags=' -bundle -undefined dynamic_lookup -L/usr/local/lib -L/opt/
local/lib'
Characteristics of this binary (from libperl):
Compile-time options: MYMALLOC PERL_DONT_CREATE_GVSV PERL_MALLOC_WRAP
USE_64_BIT_ALL USE_64_BIT_INT USE_LARGE_FILES
USE_PERLIO
Built under darwin
Compiled at Dec 15 2011 11:07:41
%ENV:
PERL5LIB="FX/lib:/Volumes/cs/MBlackman/perl5/profiles/main/lib/perl5/darwin-2level:/
Volumes/cs/MBlackman/perl5/profiles/main/lib/perl5"
PERLBREW_HOME="/Volumes/cs/MBlackman/.perlbrew"
PERLBREW_PATH="/Volumes/cs/MBlackman/perl5/perlbrew/bin:/Volumes/cs/MBlackman/
perl5/perlbrew/perls/perl-5.10.0/bin"
PERLBREW_PERL="perl-5.10.0"
PERLBREW_ROOT="/Volumes/cs/MBlackman/perl5/perlbrew"
PERLBREW_VERSION="0.29"
PERL_LOCAL_LIB_ROOT="/Volumes/cs/MBlackman/perl5/profiles/main"
PERL_MB_OPT="--install_base /Volumes/cs/MBlackman/perl5/profiles/main"
PERL_MM_OPT="INSTALL_BASE=/Volumes/cs/MBlackman/perl5/profiles/main"
@INC:
FX/lib
/Volumes/cs/MBlackman/perl5/profiles/main/lib/perl5/darwin-2level
/Volumes/cs/MBlackman/perl5/profiles/main/lib/perl5/darwin-2level
/Volumes/cs/MBlackman/perl5/profiles/main/lib/perl5
/Volumes/cs/MBlackman/perl5/perlbrew/perls/perl-5.10.0/lib/5.10.0/darwin-2level
/Volumes/cs/MBlackman/perl5/perlbrew/perls/perl-5.10.0/lib/5.10.0
/Volumes/cs/MBlackman/perl5/perlbrew/perls/perl-5.10.0/lib/site_perl/5.10.0/
darwin-2level
/Volumes/cs/MBlackman/perl5/perlbrew/perls/perl-5.10.0/lib/site_perl/5.10.0