[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

[info@ruediger-kuhlmann.de: [M68k-build] hydra and oddities... ehm... not eventities]



Hi!

May be someone here can answer Ruedigers questions?

----- Forwarded message from Rüdiger Kuhlmann <info@ruediger-kuhlmann.de> -----

From: Rüdiger Kuhlmann <info@ruediger-kuhlmann.de>
Reply-To: Rüdiger Kuhlmann <replyto-sK4PTgGKQqap@ruediger-kuhlmann.de>
Subject: [M68k-build] hydra and oddities... ehm... not eventities

Hi!

I'm the one with the Amiga that constantly refuses to work with Debian...

Anyway, besides that it has troubles with stuff in non-blocking mode, I found the
following reproducible:

ipmsun1:~# echo -e "GET http://www.heise.de/ HTTP/1.0\n" | socket proxy1.rz.uni-karlsruhe.de 3128
ipmsun1:~# echo -e "GET http://www.heise.de/ HTTP/1.0\n\n\n" | socket proxy1.rz.uni-karlsruhe.de 3128
ipmsun1:~# echo -e "GET /  HTTP/1.0\n" | socket -c www.heise.de 80
ipmsun1:~# 

while

ipmsun1:~# echo -e "GET http://www.heise.de/ HTTP/1.0\n\n\n" | socket proxy1.rz.uni-karlsruhe.de 3128
HTTP/1.0 200 OK
[...]
ipmsun1:~# echo -e "GET http://www.heise.de/ HTTP/1.0\n\n\n\n" | socket proxy1.rz.uni-karlsruhe.de 3128 | head
HTTP/1.0 200 OK
[...]
ipmsun1:~# echo -e "GET / HTTP/1.0\n" | socket -c www.heise.de 80 | head
HTTP/1.1 200 OK
[...]
ipmsun1:~#

In other words: Packets get lost, if they have the wrong length modulo 2.

Looking into the hydra.c code, a layman's look shows the following comment:

| /* hydra memory can only be read or written as words or longwords.  */
| /* that will mean that we'll have to write a special memcpy for it. */
| /* this one here relies on the fact that _writes_ to hydra memory   */
| /* are guaranteed to be of even length. (reads can be arbitrary)    */

Before and after are two functionally not equivalent versions of memcpyw(),
one in asm and another in C. Again: They're obviously not functionally
equivalent! It doesn't mean That it causes the trouble, though.

Now, lets do a
ipmsun1:~# echo -e "GET /  HTTP/1.0\n" | socket -c www.heise.de 80 | head
socket: read: Connection reset by peer
ipmsun1:~#

and look what tcpdump says (I had to compile one since this SuSE crap tcpdump doesn't
have -X):

root@ipmpc2:~/tcpdump-3.6.2# ./tcpdump -xX -s 10000 host ipmsun1 and port http
tcpdump: listening on eth0
21:42:06.283993 ipmsun1.mathematik.uni-karlsruhe.de.3244 > www.heise.de.http: S 993746754:993746754(0) win 16320 <mss 960,sackOK,timestamp 107211165 0,nop,wscale 0> (DF)
0x0000   4500 003c f42d 4000 4006 0127 810d 72af        E..<.-@.@..'..r.
0x0010   c163 9047 0cac 0050 3b3b 5f42 0000 0000        .c.G...P;;_B....
0x0020   a002 3fc0 2d59 0000 0204 03c0 0402 080a        ..?.-Y..........
0x0030   0663 e99d 0000 0000 0103 0300                  .c..........
21:42:06.306797 www.heise.de.http > ipmsun1.mathematik.uni-karlsruhe.de.3244: S 1143927841:1143927841(0) ack 993746755 win 8192 <mss 1460> [tos 0x80]
0x0000   4580 002c 3fa7 0000 3606 ff3d c163 9047        E..,?...6..=.c.G
0x0010   810d 72af 0050 0cac 442e f421 3b3b 5f43        ..r..P..D..!;;_C
0x0020   6012 2000 52e4 0000 0204 05b4 0000             ...R.........
21:42:06.308258 ipmsun1.mathematik.uni-karlsruhe.de.3244 > www.heise.de.http: . ack 1 win 16320 (DF)
0x0000   4500 0028 f42e 4000 4006 013a 810d 72af        E..(..@.@..:..r.
0x0010   c163 9047 0cac 0050 3b3b 5f43 442e f422        .c.G...P;;_CD.."
0x0020   5010 3fc0 4ae1 0000 0000 0000 0000 0000        P.?.J...........
0x0030   0000                                           ..
21:42:06.313999 ipmsun1.mathematik.uni-karlsruhe.de.3244 > www.heise.de.http: P 1:20(19) ack 1 win 16320 (DF)
0x0000   4500 003b f42f 4000 4006 0126 810d 72af        E..;./@.@..&..r.
                ^^
0x0010   c163 9047 0cac 0050 3b3b 5f43 442e f422        .c.G...P;;_CD.."
0x0020   5018 3fc0 462c 0000 4745 5420 2f20 2048        P.?.F,..GET./..H
0x0030   5454 502f 312e 300d 0a0d 2a00                  TTP/1.0...*.
                                    ^^
21:42:06.333216 www.heise.de.http > ipmsun1.mathematik.uni-karlsruhe.de.3244: . ack 20 win 32640 (DF) [tos 0x80]
0x0000   4580 0028 4cec 4000 3506 b2fc c163 9047        E..(L.@.5....c.G
0x0010   810d 72af 0050 0cac 442e f422 3b3b 5f56        ..r..P..D..";;_V
0x0020   5010 7f80 0b0e 0000 0000 0000 0000             P.............

Now, the 21:42:06.313999 packet claims it length to be 3b = 59 bytes, but in
reality, 60 bytes are send! So when heise ack's 20 bytes of user data,
something must have gotten confused as only 19 bytes where supposed to be
sent - there are no further packets sent.

So now my questions: is the kernel compiled with USE_ASM? Do I need patches
for m68k, i.e. what patches for the SCSI crippling do I need? Can I use the
kernel 2.2.19 sources? Can I cross-compile the kernel, as that would be a
heckuvalot faster?

Yours, Rüdiger.

-- 
A "No" uttered from deepest conviction is better and greater than a
"Yes" merely uttered to please, or what is worse, to avoid trouble.
                -- Mahatma Ghandi

_______________________________________________
M68k-build mailing list
M68k-build@nocrew.org
http://mailman.nocrew.org/cgi-bin/mailman/listinfo/m68k-build


----- End forwarded message -----

-- 
Ciao...                    // PowerAnimator & Maya Operator
      Ingo               \X/  To boldly design where noone designed before!



Reply to: