From owner-freebsd-hackers@freebsd.org Tue May 3 22:41:38 2016 Return-Path: Delivered-To: freebsd-hackers@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 507B9B2CC4D for ; Tue, 3 May 2016 22:41:38 +0000 (UTC) (envelope-from dieterbsd@gmail.com) Received: from mail-io0-x22d.google.com (mail-io0-x22d.google.com [IPv6:2607:f8b0:4001:c06::22d]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 200ED1A18 for ; Tue, 3 May 2016 22:41:38 +0000 (UTC) (envelope-from dieterbsd@gmail.com) Received: by mail-io0-x22d.google.com with SMTP id f89so37642531ioi.0 for ; Tue, 03 May 2016 15:41:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:date:message-id:subject:from:to; bh=dCD+sL1aEHCV4tb1dGReOwJ5vC6yJegoF/W6ZQXB8Ro=; b=xsPRgBAjpb+QoAvJ9LWe5XnedxDi42OQyNoHXYvNHcg88GxlkndZKGGc34Bi/fuxJR qkqncL03kJmuGp+5Aofyzfsx3grlJoZV6Z7ogXofwqjptBNEqCaBD0Z/pa4n/kpjeCDd EmhhGYZognOfoAknbB1Mm7JrTXzsXSA74hJ0qkGnG/d2x/j8wt33gWdeianPDOWqNWtt xsr6cuikxDxQQnnB3eOrXjncGuhu9uHCBXwpFO+rhBQ0LKpoPY28e3dHBl+EIdsUMPvD IURkoLexz5gUjq6Fs65nuBhqIvg6EQAhqNaAm2pjDOQr9AMiiR9IXT8g4sBKVaCmAqRx 5E8g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:date:message-id:subject:from:to; bh=dCD+sL1aEHCV4tb1dGReOwJ5vC6yJegoF/W6ZQXB8Ro=; b=Il1v1w1yKHFs6lRwSngKLtpR32NAz1QKbtXsPWwCoIKkC2DUohJlZdV63DTf1Sugis XLrxEpXojEHQqYONtidwX3h4Cxaw9JWDrclwIuby/KOpCTLzp16UZMREwzwS7ndhMtHE fq+BG89Gv4Eos4OTfOEEPcVlPHAfzT0P6Zyc/f7NJM4QuNInUVUo7VjLDSYLFsuQhz26 hcYkhmTY9ZeCPgrTEgvaBZcvBb2BMmBaUHoMYvjqWLHqXE5fR+4Y93z1KAFmRt52Jcl3 4v2oJKqbeRYz2heoj74OkJFpObpsE3Ahgd6dMg627Ea80vWr8Tc9IbeN6etlBbPSstUF Nn/Q== X-Gm-Message-State: AOPr4FWd7kBJoS4UNVmfwfPE1LNMzjIHe40y9ITd+KMZK7lkBY/5nmMdgyP2DIfm2DZ6ZL8FytIDDA85EhqExQ== MIME-Version: 1.0 X-Received: by 10.107.190.131 with SMTP id o125mr6065431iof.68.1462315297148; Tue, 03 May 2016 15:41:37 -0700 (PDT) Received: by 10.64.89.101 with HTTP; Tue, 3 May 2016 15:41:37 -0700 (PDT) Date: Tue, 3 May 2016 15:41:37 -0700 Message-ID: Subject: TCP problems From: Dieter BSD To: freebsd-hackers@freebsd.org Content-Type: text/plain; charset=UTF-8 X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 03 May 2016 22:41:38 -0000 I have suddenly started seeing TCP problems on a machine "G": running FreeBSD 10.1 Gigabyte UD5 amd64 2 Ethernet controllers, re0 and ue0: re0: port 0xb000-0xb0ff mem 0xfe600000-0xfe600fff,0xd0000000-0xd0003fff irq 16 at device 0.0 on pci6 re0: Using 1 MSI-X message re0: turning off MSI enable bit. re0: Chip rev. 0x4c000000 re0: MAC rev. 0x00000000 rgephy0: PHY 1 on miibus0 ue0 is Siig USB-to-Ethernet Chipset: AX88179 Problem 1: bind(2) fails Problem 2: copying large files via Ethernet results in data corruption 1) Bind: C program containing: bzero(&server, sizeof(struct sockaddr_in)); server.sin_family=AF_INET; server.sin_port=htons((unsigned short)port_number); (void) memcpy((char*)&server.sin_addr, (char*)host->h_addr, sizeof(server.sin_addr)); return_code = socket(PF_INET, SOCK_STREAM, 0); if (return_code == -1) { fprintf(stderr, "%s: ERROR ", argv[0]); perror("socket() failed"); fflush(stderr); exit(-1); } fd = return_code; return_code = bind(fd, (struct sockaddr*)&server, sizeof(server)); if (return_code == -1) { fprintf(stderr, "%s: ERROR ", argv[0]); perror("bind() failed"); fflush(stderr); exit(-1); } gives: ERROR bind() failed: Can't assign requested address The same binary has been working perfectly on another machine (running 8.2) for years. A UDP version of the program is working ok. Rebooting didn't help. 2) Data corruption: rcp large file from machine T (running 8.2) to machine G (10.1) rcp the file back from G to T compare the two copies of the file on machine T to verify integrity This worked fine until yesterday. Now suddenly most large files have data corruption, thus cmp(1) fails. The first difference occurs at various places in the file. Both machine have 2 gigabit Ethernet controllers (2 seperate networks). Both networks have the problem. I have also tried different sata disks on different disk controllers. Both machines are amd64 and have ECC memory. Cables are factory made cat6 or cat7 25 foot or shorter. Netgear gigabit switches. I tried using ftp instead of rcp. Rebooting didn't help. machine T: nfe0: flags=8843 metric 0 mtu 1500 options=8210b media: Ethernet autoselect (1000baseT ) bge0: flags=8843 metric 0 mtu 1500 options=8009b media: Ethernet autoselect (1000baseT ) machine G: re0: flags=8843 metric 0 mtu 1500 options=8209b media: Ethernet autoselect (1000baseT ) ue0: flags=8843 metric 0 mtu 1500 options=8000b media: Ethernet autoselect (1000baseT ) I tried ifconfig -rxcsum -txcsum. Machine T seems happy, but networking on machine G stopped working so I had to turn them back on. (problem #3?) Small files (2-4 KB) and things like telnet/rsh seem to work fine. It appears that *something* broke yesterday, probably something in machine G. But what? hardware? software?