Do you have a question? Post it now! No Registration Necessary. Now with pictures!
- Posted on
- Jussi Mononen
July 16, 2004, 7:20 am
rate this thread
while running a program using Net::SFTP module for a longer period
(over half an hour in this case) the program bails out with the
following error message:
PARI: *** the PARI stack overflows !
current stack size: 4.0 Mbytes
[hint] you can increase GP stack with allocatemem()
I've tried to increase the stack size to 48MB within my program (which
uses the Net::SFTP, which uses the Math::PARI, which uses the PARI/GP)
but it does not seem to help. My allocatemem() function does not seem
to have any effect.
I've found some hints about PARI garbage collection which could help
me to keep the stack from filling up but none of my experiments have
My program should be able to run continuosly for really long periods
(up to several years) and I'd be glad for any hints how to keep the
stack from overflowing during that time. The amount of data flowing
through SFTP can be up to gigabytes per day so the need of SSH2
encryption/decryption can be quite large. I assume that the underlying
SSH encryption/decryption does not handle its (PARI) carbage as well
as it should since this error appears only during long connections.
Summary of my perl5 (revision 5.0 version 8 subversion 3)
osname=solaris, osvers=2.8, archname=sun4-solaris-thread-multi-64
uname='sunos sol8dev 5.8 generic_108528-14 sun4u sparc
hint=recommended, useposix=true, d_sigaction=define
usethreads=define use5005threads=undef useithreads=define
useperlio=define d_sfio=undef uselargefiles=define usesocks=undef
use64bitint=define use64bitall=define uselongdouble=undef
cc='cc', ccflags ='-D_REENTRANT -xarch=v9 -I/usr/local/include
cppflags='-D_REENTRANT -xarch=v9 -I/usr/local/include'
ccversion='Sun WorkShop 6 update 1 C 5.2 2000/09/11',
intsize=4, longsize=8, ptrsize=8, doublesize=8, byteorder=87654321
d_longlong=define, longlongsize=8, d_longdbl=define,
ivtype='long', ivsize=8, nvtype='double', nvsize=8, Off_t='off_t',
Linker and Libraries:
ld='cc', ldflags =' -xarch=v9 -L/usr/lib/sparcv9
-L/usr/ccs/lib/sparcv9 -L/opt/SUNWspro/WS6U1/lib/v9 -L/usr/local/lib '
/opt/SUNWspro/WS6U1/lib/v9 /usr/local/lib /usr/lib /usr/ccs/lib
libs=-lsocket -lnsl -ldl -lm -lpthread -lc
perllibs=-lsocket -lnsl -ldl -lm -lpthread -lc
libc=/usr/lib/sparcv9/libc.so, so=so, useshrplib=true,
dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags=' -R
cccdlflags='-KPIC', lddlflags=' -G -xarch=v9 -L/usr/lib/sparcv9
-L/usr/ccs/lib/sparcv9 -L/opt/SUNWspro/WS6U1/lib/v9 -L/usr/local/lib'
Characteristics of this binary (from libperl):
Compile-time options: MULTIPLICITY USE_ITHREADS USE_64_BIT_INT
USE_64_BIT_ALL USE_LARGE_FILES PERL_IMPLICIT_CONTEXT
Built under solaris
Compiled at Mar 30 2004 15:09:51
Re: PARI stack overflow during long Net::SFTP connection
> PARI: *** the PARI stack overflows !
> current stack size: 4.0 Mbytes
> [hint] you can increase GP stack with allocatemem()
The hint is for GP/PARI. I'm not sure that allocatemem() is supported
with Math::Pari. Put options on `use' line to set the stack size when
Math::Pari is loaded.
> I've found some hints about PARI garbage collection which could help
> me to keep the stack from filling up but none of my experiments have
> been successfull.
This may be a genuine problem with Math::Pari. I use a different
stack deallocation semantic (which should be much speed-effecient than
the GP/PARI one); it may have some glitches. (However, I saw no
problems in almost 10 years this code is unchanged.)
A way to reproduce this without SFTP would be very appreciated...
P.S. I still have severe mail problems. I think they are due to a
conflict between the mail redirector and the antivirus filter on the
recieving end; probably they cannot cope with 1:10000 signal/noise
ratio. Most probably the redirector notices that a lot of messages
are refused by the recieving end, and disables the redirection. Do
not know what to do with this, but ilyaz.org addresses are all affected.
Meanwhile use my address at math berkeley edu. Sorry...
- » Need to find a module which can remove attachment from emails
- — Previous thread in » PERL Modules Announcements