Perlbal - Perlbal crash

This is Interesting: Free IT Magazines  
Home > Archive > Perlbal > October 2007 > Perlbal crash





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author Perlbal crash
Anup Shukla

2007-10-19, 1:12 am

Hi All,

We have been running 2 instances of Perlbal successfully for several months.

However one of the instances has now suffered two crashes in a weeks time.

The first crash was without any message in the logs.

The second one (happened last night) has this in the logs:

<log-snip>
crash log: Negative length at
/usr/lib/perl5/site_perl/5.8.5/Danga/Socket.pm line 1133
</log-snip>

What do i need to check for?

Any help/pointers appreciated.

Thank you.

Regards.
A.S

Anup Shukla

2007-10-19, 1:12 am

Anup Shukla wrote:
> Hi All,
>
> We have been running 2 instances of Perlbal successfully for several
> months.
>
> However one of the instances has now suffered two crashes in a weeks time.
>
> The first crash was without any message in the logs.
>
> The second one (happened last night) has this in the logs:
>
> <log-snip>
> crash log: Negative length at
> /usr/lib/perl5/site_perl/5.8.5/Danga/Socket.pm line 1133
> </log-snip>
>
> What do i need to check for?
>
> Any help/pointers appreciated.
>
> Thank you.
>
> Regards.
> A.S
>


Ha.. replying to my own mail ;-)

Now, i dont know much of PERL (as a matter of fact, not one bit)

But reading through Socket.pm

<snip>
# if this is too high, PERL quits(!!). reports on mailing lists
# don't seem to point to a universal answer. 5MB worked for some,
# crashed for others. 1MB works for more people. let's go with 1MB
# for now. :/
my $req_bytes = $bytes > 1048576 ? 1048576 : $bytes;

my $res = sysread($sock, $buf, $req_bytes, 0);
</snip>

Is it that $bytes (and as a result) $req_bytes is having a value < 0 and
thats causing sysread() to get crazy?

If yes, can i simply make $req_bytes = 0 if $bytes < 0 ?

I dont know if what i think makes sense.
Just a speculation.

Regards,
A.S

komtanoo.pinpimai@livetext.com

2007-10-22, 7:12 pm

my $req_bytes =3D $bytes > 8096 ? 8096 : $bytes;

This works for me(debian something). Every time I install Danga::Socket, =
I
will need to make this change otherwise it will fail on large file
requests. I tried 512K once, but didn't work. I believe the golden number
that works for all systems must be in the range of [8096,512K).


On Thu, October 18, 2007 10:01 pm, Anup Shukla wrote:
> Anup Shukla wrote:
>
>
> Ha.. replying to my own mail ;-)
>
>
> Now, i dont know much of PERL (as a matter of fact, not one bit)
>
>
> But reading through Socket.pm
>
>
> <snip>
> # if this is too high, PERL quits(!!). reports on mailing lists
> # don't seem to point to a universal answer. 5MB worked for some,
> # crashed for others. 1MB works for more people. let's go with 1MB
> # for now. :/
> my $req_bytes =3D $bytes > 1048576 ? 1048576 : $bytes;
>
> my $res =3D sysread($sock, $buf, $req_bytes, 0); </snip>
>
>
> Is it that $bytes (and as a result) $req_bytes is having a value < 0 an=

d
> thats causing sysread() to get crazy?
>
> If yes, can i simply make $req_bytes =3D 0 if $bytes < 0 ?
>
>
> I dont know if what i think makes sense.
> Just a speculation.
>
>
> Regards,
> A.S
>
>




Sponsored Links






Free braindumps | Software forum | Database administration forum

Copyright 2003 - 2008 webservertalk.com