GNOME Bugzilla – Bug 638468
Problem to serve large files
Last modified: 2011-06-29 16:18:08 UTC
The WD TV live requests some HD material and we serve it like ** (rygel:27857): DEBUG: rygel-http-get.vala:130: Following HTTP headers appended to response: ** (rygel:27857): DEBUG: rygel-http-get.vala:132: Date : Sat, 01 Jan 2011 20:02:19 GMT ** (rygel:27857): DEBUG: rygel-http-get.vala:132: Content-Type : video/x-matroska ** (rygel:27857): DEBUG: rygel-http-get.vala:132: Accept-Ranges : bytes ** (rygel:27857): DEBUG: rygel-http-get.vala:132: Content-Range : bytes 5678-8067343737/8067343738 ** (rygel:27857): DEBUG: rygel-http-get.vala:132: Content-Length : 8067338060 ** (rygel:27857): DEBUG: rygel-http-get.vala:132: contentFeatures.dlna.org : * the duration is ~2hrs and after 1 hour rygel or libsoup freaks out and spams the log with assertions. Log will be provided later. As this happens more or less exactly at the middle of the file, I assume that some uint32 somewhere overflows (4Gb), either within rygel or libsoup.
Log is at http://jensge.org/rygel.log.bz2 (~150Mb extracted)
Is this reproducible after latest changes in streaming code?
Have to check when I'm back home.
Created attachment 186975 [details] logfile
Still there
Backtrace from first critical, doesn't look very helpful :-/
+ Trace 227044
Failing part of the assertion is ((SoupBufferPrivate *)chunk2)->use == SOUP_MEMORY_TEMPORARY:
+ Trace 227045
$1 = (SoupBuffer *) 0x851b508 (gdb) print chunk2 $2 = (SoupBuffer *) 0x865f9b0 (gdb) print ((SoupBufferPrivate *)chunk2)->use $3 = SOUP_MEMORY_TAKE
Ok, I suspect SoupBuffer having a gsize as length which is 32bit on 32bit systems is the culprit. Patching libsoup now for verification (Good that it only takes 1.3hrs to reproduce this bug…)
Looks like a libsoup bug to me so re-assigning..
Created attachment 187459 [details] Sample code Example program. Able to serve the full 7.5 Gig on amd64, but fails on x86, roughly here (wget -O/dev/null http://localhost:12345/foo output): 53% [===============================================> ] 4,295,032,832 33.8M/s eta 67s
Created attachment 190642 [details] [review] Fix issue SoupMessageIOData.write_body_offset was overflowing on 32bit since gsize is only 32bit there. This patch makes it a goffset which is 64 bit.
fixed in git. thanks