After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 656650 - Discard request chunks, if application takes care of resending request data incase of failures.
Discard request chunks, if application takes care of resending request data i...
Status: RESOLVED FIXED
Product: libsoup
Classification: Core
Component: Misc
2.35.x
Other All
: Normal major
: ---
Assigned To: libsoup-maint@gnome.bugs
libsoup-maint@gnome.bugs
Depends on:
Blocks:
 
 
Reported: 2011-08-16 12:33 UTC by Sukanya ChandraSekar
Modified: 2011-08-17 14:23 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
As per Mr. Dan Winship's suggestion, added a resend flag to inform libsoup that app takes care of resending request. If the resend flag is set to FALSE, then libsoup can discard the request chunks. (4.02 KB, patch)
2011-08-16 12:33 UTC, Sukanya ChandraSekar
none Details | Review
Add SOUP_MESSAGE_CAN_REBUILD, for regeneratable streamed request bodies (11.59 KB, patch)
2011-08-16 14:02 UTC, Dan Winship
committed Details | Review

Description Sukanya ChandraSekar 2011-08-16 12:33:30 UTC
Created attachment 193935 [details] [review]
As per Mr. Dan Winship's suggestion, added a resend flag to inform libsoup that app takes care of resending request. If the resend flag is set to FALSE, then libsoup can discard the request chunks.

We are using Libsoup for an Application, that is capable of sending and receiving mails.

The issue is that though the huge mail data is sent in the form of chunks, libsoup consumes more memory.

The reason being that, as per the link "http://mail.gnome.org/archives/commits-list/2009-July/msg07959.html", the libsoup doesn't discard the request body till the request is completely sent, even if accumulate flag is set to FALSE.

But, while sending huge size of data to the Network, this results in high memory consumption.

If the application takes care of resending the data in case of failure, then  libsoup can discard the request chunks.
Comment 1 Dan Winship 2011-08-16 14:02:43 UTC
Oops, I'd already written most of a patch for this before you filed
the bug. It's now committed to master (but not libsoup 2.35.5 /
GNOME 3.1.5).

The following fix has been pushed:
f8e0491 Add SOUP_MESSAGE_CAN_REBUILD, for regeneratable streamed request bodies
Comment 2 Dan Winship 2011-08-16 14:02:46 UTC
Created attachment 193944 [details] [review]
Add SOUP_MESSAGE_CAN_REBUILD, for regeneratable streamed request bodies

Long ago, soup_message_body_set_accumulate() was made into a no-op on
request bodies, because otherwise there would be no body available to
send if the request was restarted. Add a SOUP_MESSAGE_CAN_REBUILD
flag, that indicates that the caller takes responsibility for handling
this, and properly discard chunks if that is set.

Also update chunk-test to test this, and (finally!) remove the FIXME
there, since we are now testing the !accumulate codepath again
properly.
Comment 3 Sukanya ChandraSekar 2011-08-17 11:34:18 UTC
Thanks for your patch. Please let us know, when the next version can be released, so that we can plan for our libsoup upgrade.
Comment 4 Dan Winship 2011-08-17 14:23:40 UTC
GNOME 3.1.90 will be released next Wednesday. The stable release (GNOME 3.2, with libsoup 2.36.0) will be September 28.