Skip Menu |

This queue is for tickets about the Sphinx-Search CPAN distribution.

Report information
The Basics
Id: 44690
Status: resolved
Priority: 0/
Queue: Sphinx-Search

People
Owner: Nobody in particular
Requestors: gmayes [...] vmware.com
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)



Subject: 'Bad arg length for Socket::pack_sockaddr_in' error when host is empty or not in DNS
Date: Mon, 30 Mar 2009 20:15:48 -0700
To: "bug-Sphinx-Search [...] rt.cpan.org" <bug-Sphinx-Search [...] rt.cpan.org>
From: Geoff Mayes <gmayes [...] vmware.com>
Hi Jon, When the host passed to ->SetServer is empty or does not resolve in DNS, the following error is generated by our Bugzilla installation via Apache: "Bad arg length for Socket::pack_sockaddr_in, length is 0, should be 4 at /usr/lib/perl5/5.8.8/i386-linux-thread-multi/Socket.pm line 373." I can workaround this by only doing a Sphinx::Search if $host is non-empty and Net::Ping tells me the host is alive, but could this be something that Sphinx::Search handles directly? Thanks and regards, Geoff Mayes == ENVIRONMENT == OS: CentOS release 5.2 (Final) Kernel: Linux gmayes-bz3.eng.vmware.com 2.6.18-92.1.22.el5 #1 SMP Tue Dec 16 12:03:43 EST 2008 i686 i686 i386 GNU/Linux Module version: Module id = Sphinx::Search DESCRIPTION Perl API client for Sphinx search engine CPAN_USERID JJSCHUTZ (Jon Schutz <CENSORED>) CPAN_VERSION 0.15 CPAN_FILE J/JJ/JJSCHUTZ/Sphinx-Search-0.15.tar.gz DSLI_STATUS bdpO (beta,developer,perl,object-oriented) MANPAGE Sphinx::Search - Sphinx search engine API Perl client INST_FILE /usr/lib/perl5/site_perl/5.8.8/Sphinx/Search.pm INST_VERSION 0.12 Sphinx searchd version: 0.9.8-1 Perl version: Summary of my perl5 (revision 5 version 8 subversion 8) configuration: Platform: osname=linux, osvers=2.6.18-53.1.14.el5pae, archname=i386-linux-thread-multi uname='linux builder16.centos.org 2.6.18-53.1.14.el5pae #1 smp wed mar 5 12:07:47 est 2008 i686 athlon i386 gnulinux ' config_args='-des -Doptimize=-O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m32 -march=i386 -mtune=generic -fasynchronous-unwind-tables -Dversion=5.8.8 -Dmyhostname=localhost -Dperladmin=root@localhost -Dcc=gcc -Dcf_by=Red Hat, Inc. -Dinstallprefix=/usr -Dprefix=/usr -Darchname=i386-linux -Dvendorprefix=/usr -Dsiteprefix=/usr -Duseshrplib -Dusethreads -Duseithreads -Duselargefiles -Dd_dosuid -Dd_semctl_semun -Di_db -Ui_ndbm -Di_gdbm -Di_shadow -Di_syslog -Dman3ext=3pm -Duseperlio -Dinstallusrbinperl=n -Ubincompat5005 -Uversiononly -Dpager=/usr/bin/less -isr -Dd_gethostent_r_proto -Ud_endhostent_r_proto -Ud_sethostent_r_proto -Ud_endprotoent_r_proto -Ud_setprotoent_r_proto -Ud_endservent_r_proto -Ud_setservent_r_proto -Dinc_version_list=5.8.7 5.8.6 5.8.5 -Dscriptdir=/usr/bin' hint=recommended, useposix=true, d_sigaction=define usethreads=define use5005threads=undef useithreads=define usemultiplicity=define useperlio=define d_sfio=undef uselargefiles=define usesocks=undef use64bitint=undef use64bitall=undef uselongdouble=undef usemymalloc=n, bincompat5005=undef Compiler: cc='gcc', ccflags ='-D_REENTRANT -D_GNU_SOURCE -fno-strict-aliasing -pipe -Wdeclaration-after-statement -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -I/usr/include/gdbm', optimize='-O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m32 -march=i386 -mtune=generic -fasynchronous-unwind-tables', cppflags='-D_REENTRANT -D_GNU_SOURCE -fno-strict-aliasing -pipe -Wdeclaration-after-statement -I/usr/local/include -I/usr/include/gdbm' ccversion='', gccversion='4.1.2 20071124 (Red Hat 4.1.2-42)', gccosandvers='' intsize=4, longsize=4, ptrsize=4, doublesize=8, byteorder=1234 d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=12 ivtype='long', ivsize=4, nvtype='double', nvsize=8, Off_t='off_t', lseeksize=8 alignbytes=4, prototype=define Linker and Libraries: ld='gcc', ldflags =' -L/usr/local/lib' libpth=/usr/local/lib /lib /usr/lib libs=-lresolv -lnsl -lgdbm -ldb -ldl -lm -lcrypt -lutil -lpthread -lc perllibs=-lresolv -lnsl -ldl -lm -lcrypt -lutil -lpthread -lc libc=/lib/libc-2.5.so, so=so, useshrplib=true, libperl=libperl.so gnulibc_version='2.5' Dynamic Linking: dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags='-Wl,-E -Wl,-rpath,/usr/lib/perl5/5.8.8/i386-linux-thread-multi/CORE' cccdlflags='-fPIC', lddlflags='-shared -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m32 -march=i386 -mtune=generic -fasynchronous-unwind-tables -L/usr/local/lib' Characteristics of this binary (from libperl): Compile-time options: MULTIPLICITY PERL_IMPLICIT_CONTEXT PERL_MALLOC_WRAP USE_ITHREADS USE_LARGE_FILES USE_PERLIO USE_REENTRANT_API Built under linux Compiled at Sep 17 2008 13:37:09 @INC: /usr/lib/perl5/site_perl/5.8.8/i386-linux-thread-multi /usr/lib/perl5/site_perl/5.8.7/i386-linux-thread-multi /usr/lib/perl5/site_perl/5.8.6/i386-linux-thread-multi /usr/lib/perl5/site_perl/5.8.5/i386-linux-thread-multi /usr/lib/perl5/site_perl/5.8.8 /usr/lib/perl5/site_perl/5.8.7 /usr/lib/perl5/site_perl/5.8.6 /usr/lib/perl5/site_perl/5.8.5 /usr/lib/perl5/site_perl /usr/lib/perl5/vendor_perl/5.8.8/i386-linux-thread-multi /usr/lib/perl5/vendor_perl/5.8.7/i386-linux-thread-multi /usr/lib/perl5/vendor_perl/5.8.6/i386-linux-thread-multi /usr/lib/perl5/vendor_perl/5.8.5/i386-linux-thread-multi /usr/lib/perl5/vendor_perl/5.8.8 /usr/lib/perl5/vendor_perl/5.8.7 /usr/lib/perl5/vendor_perl/5.8.6 /usr/lib/perl5/vendor_perl/5.8.5 /usr/lib/perl5/vendor_perl /usr/lib/perl5/5.8.8/i386-linux-thread-multi /usr/lib/perl5/5.8.8 .
Subject: Re: [rt.cpan.org #44690] 'Bad arg length for Socket::pack_sockaddr_in' error when host is empty or not in DNS
Date: Tue, 31 Mar 2009 12:55:23 +0930
To: bug-Sphinx-Search [...] rt.cpan.org
From: Jon Schutz <jon [...] jschutz.net>
Hi Geoff, I'll look into the error, but I'm surprised you have anything working at all as Sphinx::Search version 0.15 is not compatible with searchd version 0.9.8. Have you tried Sphinx::Search version 0.12? Regards, -- Jon Schutz My tech notes http://notes.jschutz.net Chief Technology Officer http://www.youramigo.com YourAmigo On Mon, 2009-03-30 at 23:16 -0400, Geoff Mayes via RT wrote: Show quoted text
> Mon Mar 30 23:16:12 2009: Request 44690 was acted upon. > Transaction: Ticket created by gmayes@vmware.com > Queue: Sphinx-Search > Subject: 'Bad arg length for Socket::pack_sockaddr_in' error when host is empty or not in DNS > Broken in: (no value) > Severity: (no value) > Owner: Nobody > Requestors: gmayes@vmware.com > Status: new > Ticket <URL: http://rt.cpan.org/Ticket/Display.html?id=44690 > > > > Hi Jon, > > When the host passed to ->SetServer is empty or does not resolve in DNS, the following error is generated by our Bugzilla installation via Apache: > "Bad arg length for Socket::pack_sockaddr_in, length is 0, should be 4 at /usr/lib/perl5/5.8.8/i386-linux-thread-multi/Socket.pm line 373." > > I can workaround this by only doing a Sphinx::Search if $host is non-empty and Net::Ping tells me the host is alive, but could this be something that Sphinx::Search handles directly? > > Thanks and regards, Geoff Mayes > > == ENVIRONMENT == > > OS: > CentOS release 5.2 (Final) > > Kernel: > Linux gmayes-bz3.eng.vmware.com 2.6.18-92.1.22.el5 #1 SMP Tue Dec 16 12:03:43 EST 2008 i686 i686 i386 GNU/Linux > > Module version: > Module id = Sphinx::Search > DESCRIPTION Perl API client for Sphinx search engine > CPAN_USERID JJSCHUTZ (Jon Schutz <CENSORED>) > CPAN_VERSION 0.15 > CPAN_FILE J/JJ/JJSCHUTZ/Sphinx-Search-0.15.tar.gz > DSLI_STATUS bdpO (beta,developer,perl,object-oriented) > MANPAGE Sphinx::Search - Sphinx search engine API Perl client > INST_FILE /usr/lib/perl5/site_perl/5.8.8/Sphinx/Search.pm > INST_VERSION 0.12 > > Sphinx searchd version: > 0.9.8-1 > > Perl version: > Summary of my perl5 (revision 5 version 8 subversion 8) configuration: > Platform: > osname=linux, osvers=2.6.18-53.1.14.el5pae, archname=i386-linux-thread-multi > uname='linux builder16.centos.org 2.6.18-53.1.14.el5pae #1 smp wed mar 5 12:07:47 est 2008 i686 athlon i386 gnulinux ' > config_args='-des -Doptimize=-O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m32 -march=i386 -mtune=generic -fasynchronous-unwind-tables -Dversion=5.8.8 -Dmyhostname=localhost -Dperladmin=root@localhost -Dcc=gcc -Dcf_by=Red Hat, Inc. -Dinstallprefix=/usr -Dprefix=/usr -Darchname=i386-linux -Dvendorprefix=/usr -Dsiteprefix=/usr -Duseshrplib -Dusethreads -Duseithreads -Duselargefiles -Dd_dosuid -Dd_semctl_semun -Di_db -Ui_ndbm -Di_gdbm -Di_shadow -Di_syslog -Dman3ext=3pm -Duseperlio -Dinstallusrbinperl=n -Ubincompat5005 -Uversiononly -Dpager=/usr/bin/less -isr -Dd_gethostent_r_proto -Ud_endhostent_r_proto -Ud_sethostent_r_proto -Ud_endprotoent_r_proto -Ud_setprotoent_r_proto -Ud_endservent_r_proto -Ud_setservent_r_proto -Dinc_version_list=5.8.7 5.8.6 5.8.5 -Dscriptdir=/usr/bin' > hint=recommended, useposix=true, d_sigaction=define > usethreads=define use5005threads=undef useithreads=define usemultiplicity=define > useperlio=define d_sfio=undef uselargefiles=define usesocks=undef > use64bitint=undef use64bitall=undef uselongdouble=undef > usemymalloc=n, bincompat5005=undef > Compiler: > cc='gcc', ccflags ='-D_REENTRANT -D_GNU_SOURCE -fno-strict-aliasing -pipe -Wdeclaration-after-statement -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -I/usr/include/gdbm', > optimize='-O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m32 -march=i386 -mtune=generic -fasynchronous-unwind-tables', > cppflags='-D_REENTRANT -D_GNU_SOURCE -fno-strict-aliasing -pipe -Wdeclaration-after-statement -I/usr/local/include -I/usr/include/gdbm' > ccversion='', gccversion='4.1.2 20071124 (Red Hat 4.1.2-42)', gccosandvers='' > intsize=4, longsize=4, ptrsize=4, doublesize=8, byteorder=1234 > d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=12 > ivtype='long', ivsize=4, nvtype='double', nvsize=8, Off_t='off_t', lseeksize=8 > alignbytes=4, prototype=define > Linker and Libraries: > ld='gcc', ldflags =' -L/usr/local/lib' > libpth=/usr/local/lib /lib /usr/lib > libs=-lresolv -lnsl -lgdbm -ldb -ldl -lm -lcrypt -lutil -lpthread -lc > perllibs=-lresolv -lnsl -ldl -lm -lcrypt -lutil -lpthread -lc > libc=/lib/libc-2.5.so, so=so, useshrplib=true, libperl=libperl.so > gnulibc_version='2.5' > Dynamic Linking: > dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags='-Wl,-E -Wl,-rpath,/usr/lib/perl5/5.8.8/i386-linux-thread-multi/CORE' > cccdlflags='-fPIC', lddlflags='-shared -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m32 -march=i386 -mtune=generic -fasynchronous-unwind-tables -L/usr/local/lib' > > > Characteristics of this binary (from libperl): > Compile-time options: MULTIPLICITY PERL_IMPLICIT_CONTEXT > PERL_MALLOC_WRAP USE_ITHREADS USE_LARGE_FILES > USE_PERLIO USE_REENTRANT_API > Built under linux > Compiled at Sep 17 2008 13:37:09 > @INC: > /usr/lib/perl5/site_perl/5.8.8/i386-linux-thread-multi > /usr/lib/perl5/site_perl/5.8.7/i386-linux-thread-multi > /usr/lib/perl5/site_perl/5.8.6/i386-linux-thread-multi > /usr/lib/perl5/site_perl/5.8.5/i386-linux-thread-multi > /usr/lib/perl5/site_perl/5.8.8 > /usr/lib/perl5/site_perl/5.8.7 > /usr/lib/perl5/site_perl/5.8.6 > /usr/lib/perl5/site_perl/5.8.5 > /usr/lib/perl5/site_perl > /usr/lib/perl5/vendor_perl/5.8.8/i386-linux-thread-multi > /usr/lib/perl5/vendor_perl/5.8.7/i386-linux-thread-multi > /usr/lib/perl5/vendor_perl/5.8.6/i386-linux-thread-multi > /usr/lib/perl5/vendor_perl/5.8.5/i386-linux-thread-multi > /usr/lib/perl5/vendor_perl/5.8.8 > /usr/lib/perl5/vendor_perl/5.8.7 > /usr/lib/perl5/vendor_perl/5.8.6 > /usr/lib/perl5/vendor_perl/5.8.5 > /usr/lib/perl5/vendor_perl > /usr/lib/perl5/5.8.8/i386-linux-thread-multi > /usr/lib/perl5/5.8.8 > .
From: gmayes [...] vmware.com
On Mon Mar 30 23:35:29 2009, jon@jschutz.net wrote: Show quoted text
> Hi Geoff, > > I'll look into the error, but I'm surprised you have anything working
at Show quoted text
> all as Sphinx::Search version 0.15 is not compatible with searchd > version 0.9.8. Have you tried Sphinx::Search version 0.12?
Hi Jon, I'm very appreciative of your quick reply! It was confusing of me to include the full CPAN output of i /Sphinx::Search/ (which lists the available version 0.15 first and the installed version 0.12 last) instead of simply stating that I'm using version 0.12. My apologies. Thank you, Geoff
Subject: Re: [rt.cpan.org #44690] 'Bad arg length for Socket::pack_sockaddr_in' error when host is empty or not in DNS
Date: Wed, 08 Apr 2009 22:45:11 +0930
To: bug-Sphinx-Search [...] rt.cpan.org
From: Jon Schutz <Jon.Schutz [...] YourAmigo.com>
Hi Geoff, Sorry about the version 0.12/0.15 confusion; I should have read it more carefully. I have been able to reproduce your error on 0.9.8.1 + 0.12. Please find attached a patch for Sphinx-Search-0.12 that will fix this issue. The socket code was reworked post-0.12; later versions (and now the patched 0.12) also produce an error, but don't die. The error can be captured at the application level by code such as: if (! $sphinx->Query('a')) { .. handle error ... } Of course, the alternative to upgrading or applying the patch is to change your application code to: eval { $sphinx->Query(...) } HTH. Regards, -- Jon Schutz My tech notes http://notes.jschutz.net Chief Technology Officer http://www.youramigo.com YourAmigo On Tue, 2009-03-31 at 01:39 -0400, Geoff Mayes via RT wrote: Show quoted text
> Queue: Sphinx-Search > Ticket <URL: https://rt.cpan.org/Ticket/Display.html?id=44690 > > > On Mon Mar 30 23:35:29 2009, jon@jschutz.net wrote:
> > Hi Geoff, > > > > I'll look into the error, but I'm surprised you have anything working
> at
> > all as Sphinx::Search version 0.15 is not compatible with searchd > > version 0.9.8. Have you tried Sphinx::Search version 0.12?
> > Hi Jon, > > I'm very appreciative of your quick reply! It was confusing of me to > include the full CPAN output of i /Sphinx::Search/ (which lists the > available version 0.15 first and the installed version 0.12 last) > instead of simply stating that I'm using version 0.12. My apologies. > > Thank you, Geoff

Message body is not shown because sender requested not to inline it.