cURL
Haxx ad
libcurl

curl's project page on SourceForge.net

Sponsors:
Haxx

cURL > Mailing List > Monthly Index > Single Mail

curl-tracker Archives

[curl:bugs] Re: #1229 Progress status not getting updated as expected

From: Minh Nguyen <mnguyen_at_users.sf.net>
Date: Tue, 25 Jun 2013 19:20:40 +0000

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

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_at_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/

---
** [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/>
Received on 2013-06-25

These mail archives are generated by hypermail.

donate! Page updated May 06, 2013.
web site info

File upload with ASP.NET