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: [EMAIL PROTECTED] 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
--- server-src/dumper.c.orig 2003-01-09 21:09:55.000000000 -0500 +++ server-src/dumper.c 2003-01-09 21:11:32.000000000 -0500 @@ -662,7 +662,7 @@ datain += size; - while((size == 0 && dataout < datain) || datain >= datalimit) { + while(rc == 0 && ((size == 0 && dataout < datain) || datain >= datalimit)) { NAUGHTY_BITS;