Perlbal crash

komtanoo.pinpimai at livetext.com komtanoo.pinpimai at livetext.com
Mon Oct 22 20:04:07 UTC 2007


my $req_bytes = $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:
>
>> 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
>
>




More information about the perlbal mailing list