Overlap some content when using pppoe+httpd

Overlap some content when using pppoe+httpd

am 17.03.2010 10:03:29 von ChiaTzung.Liu

------_=_NextPart_001_01CAC5B0.B77F3FA8
Content-Type: text/plain;
charset="US-ASCII"
Content-Transfer-Encoding: quoted-printable

Hi,=20

=20

My pc is installed linux-2.6.24.4, httpd-2.2.9, rp-pppoe-3.8 and
ppp-2.4.4.

It connects to WAN by PPPoE, so it has both of WAN IP and LAN IP.

For example, 172.23.26.130(LAN) and 140.35.25.73(PPPoE).

=20

Then, I put a file which size is larger than 16396 bytes on my pc for
downloading.

After that, I use http://140.35.25.73/file and https://140.35.25.73/file
to download this file.

If I use https, the downloaded file is correct. But not for http.

For example, the file original content may be...

==================== =====3D=
========

abcdefghijklmnopqrstuvwxyz

==================== =====3D=
========

=20

And the downloaded file by http may be...

==================== =====3D=
========

abcdefghijklklmnopqrsrstuvwxyz

==================== =====3D=
========

=20

If use wireshark to watch packets, will see...

=20

Packet1(data part):

abcdefghijkl

Packet2(data part):

klmnopqrs

Packet3(data part):

rstuvwxyz

=20

It is easy to find that the returned data isn't correct, some overlap
happens. The interesting thing is...

1. It only happens when the file size is larger than 16396 bytes

2. https is ok, only http has this problem

3. Only when using PPPoE, if use http://172.23.26.130/file, it's
ok.

=20

However, a more interesting thing is...

http://140.35.25.73/file is ok if turn on DumpIOOutput.

=20

Is it a bug of httpd? Should I report it? Or anyone can give me any
suggestion about how to solve this issue?

=20

Thanks.

-----------------------------------------------

Regards,
Aslan Liu




------_=_NextPart_001_01CAC5B0.B77F3FA8
Content-Type: text/html;
charset="US-ASCII"
Content-Transfer-Encoding: quoted-printable

xmlns:o=3D"urn:schemas-microsoft-com:office:office" =
xmlns:w=3D"urn:schemas-microsoft-com:office:word" =
xmlns:m=3D"http://schemas.microsoft.com/office/2004/12/omml" =
xmlns=3D"http://www.w3.org/TR/REC-html40">


charset=3Dus-ascii">





style=3D'text-justify-trim:punctuation'>



Hi,



 



My pc is installed =
linux-2.6.24.4, httpd-2.2.9,
rp-pppoe-3.8 and ppp-2.4.4.



It connects to WAN by PPPoE, so =
it has both
of WAN IP and LAN IP.



For example, 172.23.26.130(LAN) =
and 140.35.25.73(PPPoE).



 



Then, I put a file which size is =
larger
than 16396 bytes on my pc for =
downloading.



After that, I use href=3D"http://140.35.25.73/file">http://140.35.25.73/file and href=3D"https://140.35.25.73/file">https://140.35.25.73/file to =
download this
file.



If I use https, the downloaded =
file is
correct. But not for http.



For example, the file original =
content may
be…



lang=3DEN-US>===============3D=3 D=====
=============3D



lang=3DEN-US>abcdefghijklmnopqrstuvwxyz



lang=3DEN-US>===============3D=3 D=====
=============3D



 



And the downloaded file by http =
may be…



lang=3DEN-US>===============3D=3 D=====
=============3D



abcdefghij style=3D'color:red'>klklmnopq style=3D'color:red'>rsrstuvwxyz



lang=3DEN-US>===============3D=3 D=====
=============3D



 



If use wireshark to watch =
packets, will see…



 



Packet1(data =
part):



abcdefghij style=3D'color:red'>kl



Packet2(data =
part):



style=3D'color:red'>kl lang=3DEN-US>mnopqrs style=3D'color:
red'>



Packet3(data =
part):



style=3D'color:red'>rs lang=3DEN-US>tuvwxyz



 



It is easy to find that the =
returned data
isn’t correct, some overlap happens. The interesting thing =
is…



style=3D'margin-left:18.0pt;mso-para-margin-left:0gd;
text-indent:-18.0pt;mso-list:l0 level1 lfo1'> lang=3DEN-US>1. "Times New Roman"'>     
It only happens when =
the file
size is larger than 16396 bytes



style=3D'margin-left:18.0pt;mso-para-margin-left:0gd;
text-indent:-18.0pt;mso-list:l0 level1 lfo1'> lang=3DEN-US>2. "Times New Roman"'>     
https is ok, only http =
has this
problem



style=3D'margin-left:18.0pt;mso-para-margin-left:0gd;
text-indent:-18.0pt;mso-list:l0 level1 lfo1'> lang=3DEN-US>3. "Times New Roman"'>     
Only when using PPPoE, =
if use href=3D"http://172.23.26.130/file">http://172.23.26.130/file, =
it’s ok.



 



However, a more interesting =
thing is…



href=3D"http://140.35.25.73/file">http://140.35.25.73/file
is ok if turn on style=3D'color:red'>DumpIOOutput.



 



Is it a bug of httpd? Should I =
report it?
Or anyone can give me any suggestion about how to solve this =
issue?



 



Thanks.



style=3D'mso-margin-top-alt:auto;mso-margin-bottom-alt:auto' > lang=3DEN-US =
style=3D'font-family:"新細明體","serif";
color:black'>----------------------------------------------- span>



style=3D'mso-margin-top-alt:auto;mso-margin-bottom-alt:auto' > lang=3DEN-US =
style=3D'font-family:"新細明體","serif";
color:black'>Regards,

Aslan Liu











------_=_NextPart_001_01CAC5B0.B77F3FA8--

Re: Overlap some content when using pppoe+httpd

am 17.03.2010 12:26:31 von Jeff Trawick

On Wed, Mar 17, 2010 at 5:03 AM, ChiaTzung Liu
wrote:
> Hi,
>
>
>
> My pc is installed linux-2.6.24.4, httpd-2.2.9, rp-pppoe-3.8 and ppp-2.4.=
4.
>
> It connects to WAN by PPPoE, so it has both of WAN IP and LAN IP.
>
> For example, 172.23.26.130(LAN) and 140.35.25.73(PPPoE).
>
>
>
> Then, I put a file which size is larger than 16396 bytes on my pc for
> downloading.
>
> After that, I use http://140.35.25.73/file and https://140.35.25.73/file =
to
> download this file.
>
> If I use https, the downloaded file is correct. But not for http.
>
> For example, the file original content may be=85
>
> ==================== =====
=========3D
>
> abcdefghijklmnopqrstuvwxyz
>
> ==================== =====
=========3D
>
>
>
> And the downloaded file by http may be=85
>
> ==================== =====
=========3D
>
> abcdefghijklklmnopqrsrstuvwxyz
>
> ==================== =====
=========3D
>
>
>
> If use wireshark to watch packets, will see=85
>
>
>
> Packet1(data part):
>
> abcdefghijkl
>
> Packet2(data part):
>
> klmnopqrs
>
> Packet3(data part):
>
> rstuvwxyz
>
>
>
> It is easy to find that the returned data isn=92t correct, some overlap
> happens. The interesting thing is=85
>
> 1.    =A0 It only happens when the file size is larger than 16396=
bytes
>
> 2.    =A0 https is ok, only http has this problem
>
> 3.    =A0 Only when using PPPoE, if use http://172.23.26.130/file=
, it=92s ok.
>
>
>
> However, a more interesting thing is=85
>
> http://140.35.25.73/file is ok if turn on DumpIOOutput.
>
>
>
> Is it a bug of httpd?

Probably not.

> Should I report it? Or anyone can give me any
> suggestion about how to solve this issue?

Use strace to dump the full I/O buffers passed by httpd to the TCP
layer (see the text "-e write=3Dset" in the strace man page). If httpd
passes bad data, open a bug with the Apache Bugzilla. Otherwise, ask
for debug help on a Linux mailing list.

(Isn't "fix the MTU" the answer to any weird networking issue? (only
half joking))

------------------------------------------------------------ ---------
The official User-To-User support forum of the Apache HTTP Server Project.
See for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
" from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org

RE: Overlap some content when using pppoe+httpd

am 17.03.2010 15:08:22 von ChiaTzung.Liu

I used strace to watch httpd, I found it use sendfile64 to write date to =
socket.
But my cpu doesn't 64bits. Does anyone know sendfile64 whether can work =
on 32bits cpu?
Or how can I do to let httpd not to use sendfile64?

-----------------------------------------------
Regards,
Aslan Liu


-----Original Message-----
From: Jeff Trawick [mailto:trawick@gmail.com]=20
Sent: Wednesday, March 17, 2010 7:27 PM
To: users@httpd.apache.org
Subject: Re: [users@httpd] Overlap some content when using pppoe+httpd

On Wed, Mar 17, 2010 at 5:03 AM, ChiaTzung Liu
wrote:
> Hi,
>
>
>
> My pc is installed linux-2.6.24.4, httpd-2.2.9, rp-pppoe-3.8 and =
ppp-2.4.4.
>
> It connects to WAN by PPPoE, so it has both of WAN IP and LAN IP.
>
> For example, 172.23.26.130(LAN) and 140.35.25.73(PPPoE).
>
>
>
> Then, I put a file which size is larger than 16396 bytes on my pc for
> downloading.
>
> After that, I use http://140.35.25.73/file and =
https://140.35.25.73/file to
> download this file.
>
> If I use https, the downloaded file is correct. But not for http.
>
> For example, the file original content may be...
>
> =
==================== =====3D=
========
>
> abcdefghijklmnopqrstuvwxyz
>
> =
==================== =====3D=
========
>
>
>
> And the downloaded file by http may be...
>
> =
==================== =====3D=
========
>
> abcdefghijklklmnopqrsrstuvwxyz
>
> =
==================== =====3D=
========
>
>
>
> If use wireshark to watch packets, will see...
>
>
>
> Packet1(data part):
>
> abcdefghijkl
>
> Packet2(data part):
>
> klmnopqrs
>
> Packet3(data part):
>
> rstuvwxyz
>
>
>
> It is easy to find that the returned data isn't correct, some overlap
> happens. The interesting thing is...
>
> 1.    =A0 It only happens when the file size is larger than =
16396 bytes
>
> 2.    =A0 https is ok, only http has this problem
>
> 3.    =A0 Only when using PPPoE, if use =
http://172.23.26.130/file, it's ok.
>
>
>
> However, a more interesting thing is...
>
> http://140.35.25.73/file is ok if turn on DumpIOOutput.
>
>
>
> Is it a bug of httpd?

Probably not.

> Should I report it? Or anyone can give me any
> suggestion about how to solve this issue?

Use strace to dump the full I/O buffers passed by httpd to the TCP
layer (see the text "-e write=3Dset" in the strace man page). If httpd
passes bad data, open a bug with the Apache Bugzilla. Otherwise, ask
for debug help on a Linux mailing list.

(Isn't "fix the MTU" the answer to any weird networking issue? (only
half joking))

------------------------------------------------------------ ---------
The official User-To-User support forum of the Apache HTTP Server =
Project.
See for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
" from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


------------------------------------------------------------ ---------
The official User-To-User support forum of the Apache HTTP Server Project.
See for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
" from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org

Re: Overlap some content when using pppoe+httpd

am 17.03.2010 15:12:09 von Jeff Trawick

On Wed, Mar 17, 2010 at 10:08 AM, ChiaTzung Liu
wrote:
> I used strace to watch httpd, I found it use sendfile64 to write date to socket.
> But my cpu doesn't 64bits. Does anyone know sendfile64 whether can work on 32bits cpu?

yes; sendfile64 has large file support for 32-bit applications (to
handle files over 2GB in size)

> Or how can I do to let httpd not to use sendfile64?

put "EnableSendfile Off" in httpd.conf

------------------------------------------------------------ ---------
The official User-To-User support forum of the Apache HTTP Server Project.
See for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
" from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org

RE: Overlap some content when using pppoe+httpd

am 17.03.2010 16:17:41 von ChiaTzung.Liu

Oh my god.. It works if I close sendfile.
So, this means there exists some bugs in system call "sendfile64"..

GOD...

Thanks, Jeff. Very thanks.

-----------------------------------------------
Regards,
Aslan Liu

-----Original Message-----
From: Jeff Trawick [mailto:trawick@gmail.com]=20
Sent: Wednesday, March 17, 2010 10:12 PM
To: users@httpd.apache.org
Subject: Re: [users@httpd] Overlap some content when using pppoe+httpd

On Wed, Mar 17, 2010 at 10:08 AM, ChiaTzung Liu
wrote:
> I used strace to watch httpd, I found it use sendfile64 to write date
to socket.
> But my cpu doesn't 64bits. Does anyone know sendfile64 whether can
work on 32bits cpu?

yes; sendfile64 has large file support for 32-bit applications (to
handle files over 2GB in size)

> Or how can I do to let httpd not to use sendfile64?

put "EnableSendfile Off" in httpd.conf

------------------------------------------------------------ ---------
The official User-To-User support forum of the Apache HTTP Server
Project.
See for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
" from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


------------------------------------------------------------ ---------
The official User-To-User support forum of the Apache HTTP Server Project.
See for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
" from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org

Re: Overlap some content when using pppoe+httpd

am 17.03.2010 16:49:34 von Jeff Trawick

On Wed, Mar 17, 2010 at 11:17 AM, ChiaTzung Liu
wrote:
> Oh my god.. It works if I close sendfile.
> So, this means there exists some bugs in system call "sendfile64"..

It is much more likely to be in the lower layers of the network stack.

------------------------------------------------------------ ---------
The official User-To-User support forum of the Apache HTTP Server Project.
See for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
" from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org

RE: Overlap some content when using pppoe+httpd

am 18.03.2010 01:53:18 von ChiaTzung.Liu

This issue maybe introduce to more bugs in kernel. I decide close
sendfile as temporary solution to fix this issue.
Thanks=20

-----------------------------------------------
Regards,
Aslan Liu


-----Original Message-----
From: Jeff Trawick [mailto:trawick@gmail.com]=20
Sent: Wednesday, March 17, 2010 11:50 PM
To: users@httpd.apache.org
Subject: Re: [users@httpd] Overlap some content when using pppoe+httpd

On Wed, Mar 17, 2010 at 11:17 AM, ChiaTzung Liu
wrote:
> Oh my god.. It works if I close sendfile.
> So, this means there exists some bugs in system call "sendfile64"..

It is much more likely to be in the lower layers of the network stack.

------------------------------------------------------------ ---------
The official User-To-User support forum of the Apache HTTP Server
Project.
See for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
" from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


------------------------------------------------------------ ---------
The official User-To-User support forum of the Apache HTTP Server Project.
See for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
" from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org