Re: Problems with progress on large files
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Slava S. Kardakov wrote: Wget aborts on huge files: $ wget ftp://ftp.fsn.hu/testfiles/128T'http://bouncer.i-rs.ru/?product=OpenOffice.orglang=ruversion=2.3.1os=linuxinteltarball http://bouncer.i-rs.ru/?product=OpenOffice.orglang=ruversion=2.3.1os=linuxinteltarball' get: progress.c:972: create_image: Assertion `p - bp-buffer = bp-width' failed. Aborted But wget -q 'http://bouncer.i-rs.ru/?product=OpenOffice.orglang=ruversion=2.3.1os=linuxinteltarball http://bouncer.i-rs.ru/?product=OpenOffice.orglang=ruversion=2.3.1os=linuxinteltarball' works fine. I tried Wget 1.11 compiled with gcc 4.2.2 on 32-bit GNU/Linux system with glibc-2.7. Yeah; this was reported earlier today. Seems to be locale-dependent (if you set LC_ALL=C, it doesn't show up; at least not for the other reporter). - -- Micah J. Cowan Programmer, musician, typesetting enthusiast, gamer... http://micah.cowan.name/ -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.6 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFHoD077M8hyUobTrERAn2RAJ0YQSk7BSRQf3iAPgJ5SRNLs9Q9egCggIyZ +W628VoPC4zmTv4CJbnph+U= =+GOo -END PGP SIGNATURE-
Re: Addition to problems with progress on large files
Thanks for the report. This patch fixes the problem: 2007-01-23 Hrvoje Niksic [EMAIL PROTECTED] * progress.c (create_image): Check for ETA overflow. (print_row_stats): Ditto. Index: src/progress.c === --- src/progress.c (revision 2202) +++ src/progress.c (working copy) @@ -320,8 +320,10 @@ wgint bytes_remaining = dp-total_length - bytes_displayed; /* The quantity downloaded in this download run. */ wgint bytes_sofar = bytes_displayed - dp-initial_length; - int eta = (int) (dltime * bytes_remaining / bytes_sofar + 0.5); - logprintf (LOG_VERBOSE, %s, eta_to_human_short (eta, true)); + double eta = dltime * bytes_remaining / bytes_sofar; + if (eta INT_MAX - 1) + logprintf (LOG_VERBOSE, %s, + eta_to_human_short ((int) (eta + 0.5), true)); } } else @@ -932,7 +934,10 @@ I found that doing that results in a very jerky and ultimately unreliable ETA. */ wgint bytes_remaining = bp-total_length - size; - eta = (int) (dl_total_time * bytes_remaining / bp-count + 0.5); + double eta_ = dl_total_time * bytes_remaining / bp-count; + if (eta_ = INT_MAX - 1) + goto skip_eta; + eta = (int) (eta_ + 0.5); bp-last_eta_value = eta; bp-last_eta_time = dl_total_time; } @@ -944,6 +949,7 @@ } else if (bp-total_length 0) { + skip_eta: APPEND_LITERAL ( ); } }
Problems with progress on large files
Wget aborts on huge files: $ wget ftp://ftp.fsn.hu/testfiles/128T get: progress.c:965: create_image: Assertion `p - bp-buffer = bp-width' failed. Aborted But wget -q ftp://ftp.fsn.hu/testfiles/128T works fine. I tried Wget 1.10+devel from svn trunk branch, Revision 2202. Compiled with gcc 3.4.6 on 32-bit GNU/Linux system with glibc-2.3.6. $ uname -a Linux slack 2.6.19.2 #1 Thu Jan 11 11:40:47 MSK 2007 i686 pentium4 i386 GNU/Linux -- With Best Regards, Stas. All You Need Is Love! Homo sum et nihil humani a me alienum puto.
Addition to problems with progress on large files
I've noticed problem is related with ETA calculating and on systems with high bandwidth it may not fail. It better to test something like $ wget --limit-rate=1024 ftp://ftp.fsn.hu/testfiles/128T -- With Best Regards, Stas. All You Need Is Love! Homo sum et nihil humani a me alienum puto.