Mailing List Archive

5.001m SEGV in pp_sselect
I have a Web robot based on LWP 5b5, too big to post here.
Once every few hours it crashes while doing an HTTP get
in select. This is not easily reproducible since many
calls to the same routine just work fine, you need hours
to get to this crash.

Here's the dbx output from the location of the crash
I searched the patches archive but the only patch that
is lexically close is related to Linux, and I'm running
on a big-endian machine with SGI IRIX. I printed what I think
are most of the relevant variables at the point of the crash
Any help on how to fix this will be appreciated, I will gladly
give more variable prints if anyone could give me their names:

Core from signal SIGSEGV: Segmentation violation
(dbx) use /home/usr/src/perl5.001m/
(dbx) l 560,580
560 # define ORDERBYTE (0x88888888 - BYTEORDER)
561 # else
562 # define ORDERBYTE (0x4444 - BYTEORDER)
563 # endif
564
565 #endif
566
567 SP -= 4;
568 for (i = 1; i <= 3; i++) {
569 if (!SvPOK(SP[i]))
570 continue;
* 571 j = SvCUR(SP[i]); <<< THIS IS APPARENTLY WHERE IT DIES
572 if (maxlen < j)
573 maxlen = j;
574 }
575
(dbx) p i
1
(dbx) where
> 0 pp_sselect() ["/home/usr/src/perl5.001m/pp_sys.c":571, 0x4326d4]
1 run() ["/home/usr/src/perl5.001m/run.c":54, 0x4a538c]
2 perl_run(sv_interp = 0x10016408) ["/home/usr/src/perl5.001m/perl.c":512,
0x499d2c]
3 main(argc = 4, argv = 0x7fffaf94, env = 0x7fffafa8)
["/home/usr/src/perl5.001m/perlmain.c":34, 0x41200c]
4 __istart() ["crt1tinit.s":13, 0x411ee0]
(dbx) p maxlen
0
(dbx) p j
268549680 p sv
0x1001be30
(dbx) p *sv
struct sv {
sv_any = (nil)
sv_refcnt = 0
sv_flags = 0
}
(dbx) p fd_sets
{
[0] 0x1000e2fc = ""
[1] 0x4000
[2] (nil)
[3] (nil)
}
(dbx) p maxlen
0
(dbx) p sp
0x1035b408
(dbx) p *sp
0x10015cf8
(dbx) p **sp
struct sv {
sv_any = (nil)
sv_refcnt = 0
sv_flags = 75759616
}

(dbx)
------- Output of myconfig (Passes all test successfully)
Summary of my perl5 (patchlevel 1) configuration:
Platform:
osname=irix_6, osver=, archname=IP19-irix_6
uname='irix64 info 6.2-alpha-1232410433 10091658 ip19 '
hint=recommended
Compiler:
cc='cc -woff 1009,1429,799', optimize='-g', ld='cc -woff 1009,1429,799'
cppflags='-ansiposix -D_POSIX_SOURCE -D_BSD_TYPES -D_BSD_SIGNALS'
ccflags ='-ansiposix -D_POSIX_SOURCE -D_BSD_TYPES -D_BSD_SIGNALS'
ldflags =''
stdchar='unsigned char', d_stdstdio=define, usevfork=false
voidflags=15, castflags=7, d_casti32=undef, d_castneg=undef
intsize=4, alignbytes=8, usemymalloc=y, randbits=15
Libraries:
so=so
libpth=/usr/lib /usr/local/lib /lib
libs=-lm -lc
libc=/usr/lib/libc.so
Dynamic Linking:
dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef
cccdlflags=' ', ccdlflags=' ', lddlflags='-shared'
--