curl -V
curl 7.19.7 (x86_64-unknown-linux-gnu) libcurl/7.19.7 OpenSSL/1.0.0d zlib/1.2.3
Protocols: tftp ftp telnet dict ldap http file https ftps
Features: IPv6 Largefile NTLM SSL libz
I implemented the progress status callback in my application to display the percentage of file transfer progress via libcurl. However, during my testing, there were many instances when the progress status did not get updated as expected. For example, when I polled a file upload once every second, the upload percentage remained at 0.3% even though the uploaded file size was getting larger. Once the file upload was completed, I did get an update for 100% from the callback. Note that this problem did not happen all the time, since I did get increased transfer percentage update in other cases.
Hi, and thanks for your report!
First, I'm sorry to say that I just don't believe you. I don't believe that kind of bug existed in that version of libcurl. I think you've seen this happen in your program's output, but the reason for that output is most likely to be found elsewhere.
But more importantly, you're using an outdated libcurl version and we're not really up to handle bug reports on that old versions. Please try the most recent libcurl version and if you can still repeat the problem then, please write a simple stand-alone example code for us to use to track down the problem.
The actual progress callback code has remained the same for a very long time.
No feedback, closing.
Hi,
Sorry I was out of the office for some time and did not get a chance to respond to your feedback. Even though I just read my emails and found out that the bug was closed, I would appreciate if you have some information that helps me to troubleshoot further.
I did write a small program (attached) with the callback routine that simply displays the percentage of downloading. This would show the issue where the callback is not invoked as expected. When I ran the test program, I found that it worked on one system but not on another:
On the system that worked, the callback was invoked regularly:
updateProgressStatus: Update progress for file=[./big.qcow], nowDownload=0.00, totalToDownload=3079602176.00, percentage=0.00
updateProgressStatus: Update progress for file=[./big.qcow], nowDownload=23293952.00, totalToDownload=3079602176.00, percentage=0.76
updateProgressStatus: Update progress for file=[./big.qcow], nowDownload=131215360.00, totalToDownload=3079602176.00, percentage=4.26
(...)
updateProgressStatus: Update progress for file=[./big.qcow], nowDownload=364511232.00, totalToDownload=3079602176.00, percentage=11.84
(...)
updateProgressStatus: Update progress for file=[./big.qcow], nowDownload=1117659136.00, totalToDownload=3079602176.00, percentage=36.29
(...)
updateProgressStatus: Update progress for file=[./big.qcow], nowDownload=1691000832.00, totalToDownload=3079602176.00, percentage=54.91
(...)
updateProgressStatus: Update progress for file=[./big.qcow], nowDownload=1936683008.00, totalToDownload=3079602176.00, percentage=62.89
(...)
updateProgressStatus: Update progress for file=[./big.qcow], nowDownload=2208083968.00, totalToDownload=3079602176.00, percentage=71.70
(...)
updateProgressStatus: Update progress for file=[./big.qcow], nowDownload=2999640064.00, totalToDownload=3079602176.00, percentage=97.40
(....)
updateProgressStatus: Update progress for file=[./big.qcow], nowDownload=3079602176.00, totalToDownload=3079602176.00, percentage=100.00
On the system that had the issue, the callback just stopped in between then suddenly I got the update progress status of 100%:
updateProgressStatus: Update progress for file=[./big.qcow], nowDownload=0.00, totalToDownload=3079602176.00, percentage=0.00
updateProgressStatus: Update progress for file=[./big.qcow], nowDownload=0.00, totalToDownload=3079602176.00, percentage=0.00
updateProgressStatus: Update progress for file=[./big.qcow], nowDownload=0.00, totalToDownload=3079602176.00, percentage=0.00
updateProgressStatus: Update progress for file=[./big.qcow], nowDownload=0.00, totalToDownload=3079602176.00, percentage=0.00
updateProgressStatus: Update progress for file=[./big.qcow], nowDownload=12206080.00, totalToDownload=3079602176.00, percentage=0.40
updateProgressStatus: Update progress for file=[./big.qcow], nowDownload=12206080.00, totalToDownload=3079602176.00, percentage=0.40
updateProgressStatus: Update progress for file=[./big.qcow], nowDownload=12206080.00, totalToDownload=3079602176.00, percentage=0.40
updateProgressStatus: Update progress for file=[./big.qcow], nowDownload=12206080.00, totalToDownload=3079602176.00, percentage=0.40
updateProgressStatus: Update progress for file=[./big.qcow], nowDownload=12206080.00, totalToDownload=3079602176.00, percentage=0.40
<no callback="" here="" at="" all="">
updateProgressStatus: Update progress for file=[./big.qcow], nowDownload=3079602176.00, totalToDownload=3079602176.00, percentage=100.00
updateProgressStatus: Update progress for file=[./big.qcow], nowDownload=3079602176.00, totalToDownload=3079602176.00, percentage=100.00
updateProgressStatus: Update progress for file=[./big.qcow], nowDownload=3079602176.00, totalToDownload=3079602176.00, percentage=100.00
updateProgressStatus: Update progress for file=[./big.qcow], nowDownload=3079602176.00, totalToDownload=3079602176.00, percentage=100.00</no>
Therefore on the system with problem, something in the environment affected the callback mechanism and blocked it from working as expected.
Thus, I would not say it is a libcurl problem at all, but I'd appreciate if you could tell me in general how the callback mechanism works. What kind of system resources (alarm, signal,...) that the callback logic relies on to function? The only difference that I could see is SELinux installed on the system that had issue, but it was not actually enforced.
Again, thank you for your support and any information that you could provide!
Minh Nguyen
From: Daniel Stenberg [mailto:bagder@users.sf.net]
Sent: Tuesday, June 04, 2013 1:57 PM
To: [curl:bugs]
Subject: [curl:bugs] #1229 Progress status not getting updated as expected
No feedback, closing.
[bugs:#1229]http://sourceforge.net/p/curl/bugs/1229/ Progress status not getting updated as expected
Status: closed-invalid
Created: Thu May 23, 2013 07:35 PM UTC by Minh Nguyen
Last Updated: Sun May 26, 2013 10:18 PM UTC
Owner: Daniel Stenberg
curl -V
curl 7.19.7 (x86_64-unknown-linux-gnu) libcurl/7.19.7 OpenSSL/1.0.0d zlib/1.2.3
Protocols: tftp ftp telnet dict ldap http file https ftps
Features: IPv6 Largefile NTLM SSL libz
I implemented the progress status callback in my application to display the percentage of file transfer progress via libcurl. However, during my testing, there were many instances when the progress status did not get updated as expected. For example, when I polled a file upload once every second, the upload percentage remained at 0.3% even though the uploaded file size was getting larger. Once the file upload was completed, I did get an update for 100% from the callback. Note that this problem did not happen all the time, since I did get increased transfer percentage update in other cases.
Sent from sourceforge.net because you indicated interest in https://sourceforge.net/p/curl/bugs/1229/
To unsubscribe from further messages, please visit https://sourceforge.net/auth/subscriptions/
Related
Bugs:
#1229Can you please try with a recent libcurl and see if the problem persists? There's no use to try to chase problems in libcurl versions from several years ago!
Hi,
I just tried my test program (attached in my previous email) with the latest libcurl (verison 7.31.0) and still got the same problem, ie. on a particular Linux system (RHEL 2.6.18), the callback was invoked up to 1.2% of the download amount then it stopped getting called. The callback resumed around 95% download and ran to completion. Again, I suspected that there must be some factor in the environment that blocked the callback for some time, but not sure where to look.
THANK YOU,
Minh Nguyen
From: Daniel Stenberg [mailto:bagder@users.sf.net]
Sent: Tuesday, June 25, 2013 1:40 PM
To: [curl:bugs]
Subject: [curl:bugs] #1229 Progress status not getting updated as expected
Can you please try with a recent libcurl and see if the problem persists? There's no use to try to chase problems in libcurl versions from several years ago!
[bugs:#1229]http://sourceforge.net/p/curl/bugs/1229/ Progress status not getting updated as expected
Status: closed-invalid
Created: Thu May 23, 2013 07:35 PM UTC by Minh Nguyen
Last Updated: Fri Jun 21, 2013 01:43 PM UTC
Owner: Daniel Stenberg
curl -V
curl 7.19.7 (x86_64-unknown-linux-gnu) libcurl/7.19.7 OpenSSL/1.0.0d zlib/1.2.3
Protocols: tftp ftp telnet dict ldap http file https ftps
Features: IPv6 Largefile NTLM SSL libz
I implemented the progress status callback in my application to display the percentage of file transfer progress via libcurl. However, during my testing, there were many instances when the progress status did not get updated as expected. For example, when I polled a file upload once every second, the upload percentage remained at 0.3% even though the uploaded file size was getting larger. Once the file upload was completed, I did get an update for 100% from the callback. Note that this problem did not happen all the time, since I did get increased transfer percentage update in other cases.
Sent from sourceforge.net because you indicated interest in https://sourceforge.net/p/curl/bugs/1229/
To unsubscribe from further messages, please visit https://sourceforge.net/auth/subscriptions/
Related
Bugs:
#1229