Bug#639825: Apache2 seek broken
2011/9/5 Stefan Fritsch : > On Monday 05 September 2011, Takis Issaris wrote: >> 2011/9/2 Julien Cristau : >> > On Wed, Aug 31, 2011 at 16:03:47 +0200, Takis Issaris wrote: >> > >> > [...] >> > >> >> Then the log shows these syscalls happening over and over again >> >> and it doesn't stop until I kill the client. >> >> poll([{fd=37, events=POLLIN}], 1, 100) = 1 ([{fd=37, >> >> revents=POLLIN}]) recvfrom(37, "", 32516, 0, NULL, NULL) = 0 >> >> poll([{fd=37, events=POLLIN}], 1, 100) = 1 ([{fd=37, >> >> revents=POLLIN}]) recvfrom(37, "", 32516, 0, NULL, NULL) = 0 >> >> ... >> > >> > That seems completely broken. When recvfrom returns 0, it means >> > the connection has been shutdown on the other end, the client >> > should just close it at that point, not start an infinite >> > loop... >> >> I just noticed Stefan's fix in the FFmpeg GIT repository, so that's >> even better: >> http://git.videolan.org/?p=ffmpeg.git;a=commit;h=346ea9e22240b4442 >> f479518f6c3b40c9bec9487 > > This fixes only the detection of range support. The looping is a > different bug in libavformat which is not fixed by the above commit. > But maybe it is not triggered if range support works. For now, I haven't seen it reappear, but two bugs would explain why I indeed sometimes seemed to get crashes and sometimes "hangs" (looping). -- To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Bug#639825: Apache2 seek broken
2011/9/2 Julien Cristau : > On Wed, Aug 31, 2011 at 16:03:47 +0200, Takis Issaris wrote: > > [...] >> Then the log shows these syscalls happening over and over again and it >> doesn't stop until I kill the client. >> poll([{fd=37, events=POLLIN}], 1, 100) = 1 ([{fd=37, revents=POLLIN}]) >> recvfrom(37, "", 32516, 0, NULL, NULL) = 0 >> poll([{fd=37, events=POLLIN}], 1, 100) = 1 ([{fd=37, revents=POLLIN}]) >> recvfrom(37, "", 32516, 0, NULL, NULL) = 0 >> ... >> > That seems completely broken. When recvfrom returns 0, it means the > connection has been shutdown on the other end, the client should just > close it at that point, not start an infinite loop... > I just noticed Stefan's fix in the FFmpeg GIT repository, so that's even better: http://git.videolan.org/?p=ffmpeg.git;a=commit;h=346ea9e22240b4442f479518f6c3b40c9bec9487 With friendly regards, Takis -- To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Bug#639825: Apache2 seek broken
2011/9/1 Stefan Fritsch : > On Thursday 01 September 2011, Stefan Fritsch wrote: >> Can you rebuild apache2 ...lenny10 with the attached patch and try >> if it fixes your problem? > > If you use i386, you can get built packages here: > http://people.debian.org/~sf/639825/ My apologies for the delay, but these packages indeed do fix the libavformat seeking issues I was having. With friendly regards, Takis -- To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Bug#639825: Apache2 seek broken
2011/9/1 Stefan Fritsch : > On Wednesday 31 August 2011, Takis Issaris wrote: > >> Range: bytes=0- > > I suspect that your client tries this first request, and when it sees > the 200 instead of the 206, it assumes that the server doesn't support > ranges at all. > > Can you rebuild apache2 ...lenny10 with the attached patch and try if > it fixes your problem? Thanks in advance. Yes, I will be able to do so this evening. > > Stefan > > With friendly regards, Takis -- To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Bug#639825: Apache2 seek broken
Hi Stefan, 2011/8/30 Stefan Fritsch : > On Tuesday 30 August 2011, Takis Issaris wrote: >> Package: apache2.2-common >> Version: 2.2.9-10+lenny10 >> >> Yesterday evenings update broke our Apache server setup, which is >> serving video files. Our application uses partial GET's (Range: >> byte=...) to implement seeking in the video. Seeking stopped >> working this morning, I haven't figured out yet what exactly is >> going wrong, but reverting to 2.2.9-10+lenny9 fixed the issue for >> me. >> >> The patch fixing CVE-2011-3192 involves ranges, which gave me the >> impression that this might have caused our seeking issues: > > Yes, that seems very likely. > > What would be most interesting to me is the complete Range header your > application sends to the server when seeking. This is a part of the strace: socket(PF_INET, SOCK_STREAM, IPPROTO_TCP) = 37 fcntl(37, F_GETFL) = 0x2 (flags O_RDWR) fcntl(37, F_SETFL, O_RDWR|O_NONBLOCK) = 0 connect(37, {sa_family=AF_INET, sin_port=htons(80), sin_addr=inet_addr("172.19.11.42")}, 16) = -1 EINPROGRESS (Operation now in progress) poll([{fd=37, events=POLLOUT}], 1, 100) = 1 ([{fd=37, revents=POLLOUT}]) getsockopt(37, SOL_SOCKET, SO_ERROR, [0], [4]) = 0 poll([{fd=37, events=POLLOUT}], 1, 100) = 1 ([{fd=37, revents=POLLOUT}]) sendto(37, "GET /takis/ffmpeg-ultrafast-s3840x2160-1024_0-4_0.ts HTTP/1.1\r\nUser-Agent: Lavf53.9.0\r\nAccept: */*\r\nRange: bytes=0-\r\nConnection: close\r\nHost: somehost.edm.uhasselt.be\r\n\r\n", 216, 0, NULL, 0) = 216 poll([{fd=37, events=POLLIN}], 1, 100) = 1 ([{fd=37, revents=POLLIN}]) recvfrom(37, "HTTP/1.1 200 OK\r\nDate: Tue, 30 Aug 2011 09:38:48 GMT\r\nServer: Apache/2.2.9 (Debian) PHP/5.2.6-1+lenny13 with Suhosin-Patch\r\nLast-Modified: Wed, 01 Jun 2011 12:12:27 GMT\r\nETag: \"8e005a-5000fc-4a4a56f1440c0\"\r\nAccept-Ranges: bytes\r\nContent-Length: 5243132\r\nConnection: close\r\nContent-Type: text/texmacs\r\n\r\nG...H.264/MPEG-4 AVC codec - Copyle", 1024, 0, NULL, NULL) = 1024 This is followed by a lot (2842) of recvfrom/poll pairs, each recvfrom actually receiving several kilobytes of data. Then the log shows these syscalls happening over and over again and it doesn't stop until I kill the client. poll([{fd=37, events=POLLIN}], 1, 100) = 1 ([{fd=37, revents=POLLIN}]) recvfrom(37, "", 32516, 0, NULL, NULL) = 0 poll([{fd=37, events=POLLIN}], 1, 100) = 1 ([{fd=37, revents=POLLIN}]) recvfrom(37, "", 32516, 0, NULL, NULL) = 0 ... > Also, the HTTP status > code returned for the requests both with 2.2.9-10+lenny9 and > 2.2.9-10+lenny10 (probably either 200 or 206). The 2.2.9-10+lenny9 seems to return 206 while the new one returns 200: ... recvfrom(49, "HTTP/1.1 206 Partial Content\r\nDate: Wed, 31 Aug 2011 14:00:26 GMT\r\nServer: Apache/2.2.9 (Debian) PHP/5.2.6-1+lenny13 with Suhosin-Patch\r\nLast-Modified: Tue, 30 Aug 2011 15:57:18 GMT\r\nETag: \"2fc103-e77c22-4abbb10ec5380\"\r\nAccept-Ranges: bytes\r\nContent-Length: 14993762\r\nContent-Range: bytes 176832-15170593/15170594\r\nConnection: close\r\nContent-Type: text/plain\r\\n\r\n2\260.;BS", 1024, 0, NULL, NULL) = 1024 > Are the video files > static files or are they generated by some application? They are all static. > Thanks for your help. > > Cheers, > Stefan With friendly regards, Takis -- To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Bug#639825: Apache2 seek broken
My previous reply (including the strace info) seems to have been lost, so I have trimmed the strace output some more, hoping that it will get through this time. 2011/8/30 Stefan Fritsch : > On Tuesday 30 August 2011, Takis Issaris wrote: >> Package: apache2.2-common >> Version: 2.2.9-10+lenny10 >> >> Yesterday evenings update broke our Apache server setup, which is >> serving video files. Our application uses partial GET's (Range: >> byte=...) to implement seeking in the video. Seeking stopped >> working this morning, I haven't figured out yet what exactly is >> going wrong, but reverting to 2.2.9-10+lenny9 fixed the issue for >> me. >> >> The patch fixing CVE-2011-3192 involves ranges, which gave me the >> impression that this might have caused our seeking issues: > > Yes, that seems very likely. > > What would be most interesting to me is the complete Range header your > application sends to the server when seeking. Also, the HTTP status > code returned for the requests both with 2.2.9-10+lenny9 and > 2.2.9-10+lenny10 (probably either 200 or 206). Are the video files > static files or are they generated by some application? This is a part of the strace: sendto(37, "GET /takis/ffmpeg-ultrafast-s3840x2160-1024_0-4_0.ts HTTP/1.1\r\nUser-Agent: Lavf53.9.0\r\nAccept: */*\r\nRange: bytes=0-\r\nConnection: close\r\nHost: somehost.edm.uhasselt.be\r\n\r\n", 216, 0, NULL, 0) = 216 ... recvfrom(37, "HTTP/1.1 200 OK\r\nDate: Tue, 30 Aug 2011 09:38:48 GMT\r\nServer: Apache/2.2.9 (Debian) PHP/5.2.6-1+lenny13 with Suhosin-Patch\r\nLast-Modified: Wed, 01 Jun 2011 12:12:27 GMT\r\nETag: \"8e005a-5000fc-4a4a56f1440c0\"\r\nAccept-Ranges: bytes\r\nContent-Length: 5243132\r\nConnection: close\r\nContent-Type: text/texmacs\r\n\r\nG...H.264/MPEG-4 AVC codec - Copyle", 1024, 0, NULL, NULL) = 1024 This is followed by a lot (2842) of recvfrom/poll pairs, each recvfrom actually receiving several kilobytes of data. Then the log shows these syscalls happening over and over again and it doesn't stop until I kill the client. poll([{fd=37, events=POLLIN}], 1, 100) = 1 ([{fd=37, revents=POLLIN}]) recvfrom(37, "", 32516, 0, NULL, NULL) = 0 The 2.2.9-10+lenny9 seems to return 206 while the 2.2.9-10+lenny10 returns 200: recvfrom(49, "HTTP/1.1 206 Partial Content\r\nDate: Wed, 31 Aug 2011 14:00:26 GMT\r\nServer: Apache/2.2.9 (Debian) PHP/5.2.6-1+lenny13 with Suhosin-Patch\r\nLast-Modified: Tue, 30 Aug 2011 15:57:18 GMT\r\nETag: \"2fc103-e77c22-4abbb10ec5380\"\r\nAccept-Ranges: bytes\r\nContent-Length: 14993762\r\nContent-Range: bytes 176832-15170593/15170594\r\nConnection: close\r\nContent-Type: text/plain\r\\n\r\n2\260.;BS", 1024, 0, NULL, NULL) = 1024 All video files are all static. > > Thanks for your help. Glad to help! > Cheers, > Stefan With friendly regards, Takis -- To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Bug#639825: Apache2 seek broken
Hi Stefan, 2011/8/31 Stefan Fritsch : > On Tue, 30 Aug 2011, Stefan Fritsch wrote: >> What would be most interesting to me is the complete Range header your >> application sends to the server when seeking. Also, the HTTP status >> code returned for the requests both with 2.2.9-10+lenny9 and >> 2.2.9-10+lenny10 (probably either 200 or 206). Are the video files >> static files or are they generated by some application? > > I forgot: The actual size of the requested file is also important. The size in bytes is 5243132. > You can log the Range header with a custom log format or with > mod_log_forensic. If the Range info from the strace log turn out to be inadequate I will try using mod_log_forensic. With friendly regards, Takis -- To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Bug#639825: Apache2 seek broken
Package: apache2.2-common Version: 2.2.9-10+lenny10 Yesterday evenings update broke our Apache server setup, which is serving video files. Our application uses partial GET's (Range: byte=...) to implement seeking in the video. Seeking stopped working this morning, I haven't figured out yet what exactly is going wrong, but reverting to 2.2.9-10+lenny9 fixed the issue for me. The patch fixing CVE-2011-3192 involves ranges, which gave me the impression that this might have caused our seeking issues: http://anonscm.debian.org/viewvc/pkg-apache/trunk/apache2/patches/083_CVE-2011-3192.dpatch?revision=1341&view=co http://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2011-3192 I am using an up-to-date Debian Lenny, with Linux kernel 2.6.26-2-686 #1 SMP. I can provide strace output or any other useful information. With friendly regards, Takis -- To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org