Hello David,
Thanks for your analysis of the problem.
Do you know why the write failed?
The attached patch should fix the infinite loop, could you try it and
let me know if it works.
Jean-Louis
On Thu, Jan 09, 2003 at 11:58:33PM +0000, David Trusty wrote:
> I think I may have found the cause of this problem.
>
> In dumper.c there is a loop, trying to write data. Here are the key lines
> where I think
> it's happening:
> --dumper.c--
> 663 while((size == 0 && dataout < datain) || datain >= datalimit) {
> ...
> 667 while(size > 0 && split_size > 0 && dumpsize >= split_size)
> {
> ...
> 833 rc = write_dataptr(outfd);
> (gdb) print rc
> $14 = 1
>
> What happens is that write_dataptr() is failing with a return code 1. It
> appears that the
> dumper.c code is not checking this return code, and it causes an infinite
> loop (until it runs
> out of memory).
>
> The other values for the key variables are:
> (gdb) print (int) datain
> $15 = 134680928
> (gdb) print (int) datalimit
> $16 = 134680928
> (gdb) print size
> $17 = 32768
> (gdb) print (int) dataout
> $18 = 134664544
>
> Can you check the dumper.c logic around line 833 and see if you concur?
>
> Thanks!!
>
> David
--
Jean-Louis Martineau email: martineau AT IRO.UMontreal DOT CA
Departement IRO, Universite de Montreal
C.P. 6128, Succ. CENTRE-VILLE Tel: (514) 343-6111 ext. 3529
Montreal, Canada, H3C 3J7 Fax: (514) 343-5834
dumper.c.rc.diff
Description: Text document
|